Bower/NPM publishing of JS Implementation?

#1

Discussion on this started here. We’d really like to be able to npm|bower install stmd. What’s the roadmap for that? Is it close to production ready?

0 Likes

#2

My impression - by looking at the code (and having written quite a few JS tokenizers / parsers in the past) - is that the current parser seems to be heavily regex based, so it’s going to be “relatively” slow. For real production code, there’s definitely the need for a optimized parser which does not use regular expressions and would be heavily optimized with use of the v8 tools to get rid of the JIT bottlenecks / GC pauses.

This is no small task though and would take at least a week or two of full time work. I would definitely welcome such a version on npm / bower, the current markdown modules out there all have their issues and having a really fast de facto standard version on NPM would help a lot to making it the actual standard :slight_smile:

If I find the time, I’ll start work on a fast version this weekend.

4 Likes

#3

+++ kentcdodds [Sep 03 14 20:41 ]:

Discussion on this started [2]here. We’d really like to be able to
npm|bower install stmd. What’s the roadmap for that? Is it close to
production ready?

It is well tested, but I’d like to have some javascript experts
look at the code. It’s also possible that the API should be different;
again, I’d welcome feedback here.

In due time I would definitely be in favor of putting it on npm.
But today is probably too early!

1 Like

"Spec" category, please!
#4

Give a holler if you need a hand. Not sure how much time I can put in, but I love the project and love parsers :slight_smile:

0 Likes

#5

I wouldn’t mind pitching in as well. I’m not a parser expert, but I’m anxious to see CommonMark succeed.

0 Likes

#6

I see that the JS implementation is available on npm. Will it be available on Bower as well?

0 Likes

#7

I don’t know much about bower. Looks like you can just do

bower install http://spec.commonmark.org/js/commonmark.js

and it works. Once we get further along, we’ll start using github releases for official semantically versioned releases of the libraries, and at this point it would be possible to add a bower.json and bower register the package.

0 Likes

#8

Please also register the package ‘properly’ with bower so we can install specific versions. Here’s the documentation for it: http://bower.io/docs/creating-packages/.

0 Likes

#9

+++ Bwasty [Jan 20 15 10:03 ]:

Please also register the package ‘properly’ with bower so we can install specific versions. Here’s the documentation for it: http://bower.io/docs/creating-packages/.

I’ll work on this. If you put an issue on the github tracker, it will help ensure it won’t be forgotten.

0 Likes

#10

Hm. Bower seems to require that we store the browserified js/commonmark.js in the git repository. I don’t like to store generated files in the repository unless there’s a good reason to do so. Any way around that?

0 Likes

#11

Doesn’t seem so: http://stackoverflow.com/questions/19029726/dealing-with-git-generated-files-and-bower

0 Likes

#12

Although jQuery has an interesting solution - the master doesn’t contain the generated files, but the tags used by bower do: https://github.com/jquery/jquery/commit/8f2a9d9272d6ed7f32d3a484740ab342c02541e0

0 Likes