Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move defaultRules to a separate module? #14

Open
max-degterev opened this issue Jun 30, 2016 · 3 comments
Open

Move defaultRules to a separate module? #14

max-degterev opened this issue Jun 30, 2016 · 3 comments

Comments

@max-degterev
Copy link

Hi!

I'm facing a task of implementing a subset of markdown for our webapp, that basically includes making links clickable, link images becoming images, having bold and italic texts. That's about as much as we need. I tried to find an existing library that does that, and your repo is the closest thing to it. However, since I will only need a subset of defaultRules, it looks like an overhead to load all of them on the browser. Do you think it would be possible to extract defaultRules to a separate repo to make it more modular/customizable?

@ariabuckles
Copy link
Owner

Hey!

Sorry for not getting back to this sooner.

This seems like a good idea but I'm not sure how I'd implement it without making some other things more annoying yet. A lot of modules have a -core they depend on, and then the general simple-markdown package would depend on simple-markdown-core and simple-markdown-rules, but that is inherently a bit in conflict with a single file containing all of simple-markdown, which can be important for people without fancy build systems just using the html output (and a webpack/babel combined file here doesn't seem as accessible as a single file people can just copy into their project if they need to).

@faergeek
Copy link
Contributor

What about bundling with support for tree shaking with e.g. rollup, so it will become more modular automagically and yet will support usage without build tools? I would try to setup this and submit a PR, if it's ok.

@ariabuckles
Copy link
Owner

@faergeek that would be neat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants