noprompt / frak

Transform collections of strings into regular expressions.
1.13k stars 39 forks source link

Publish on npm #11

Closed mathiasbynens closed 7 years ago

mathiasbynens commented 10 years ago

It would be useful to have the Node version published on npm, so people can just npm install frak -g and then just use the frak binary.

In the future, a non-binary version (that exports a frak function for use in other scripts) could be made available though require('frak').

https://twitter.com/_munter_/status/388050796681891841 /cc @Munter

noprompt commented 10 years ago

Definitely. I was planning to do this but totally forgot! Looking at the repository for mori it looks like there are some scripts I'll need to add to this project to get that all set up. ATM I'm just a bit busy and might not be able to get to that right away. I'd be open to a PR if you have the chance to get to it before me.

BTW, It looks like someone is squatting on the frak package though. Not sure how I should approach that. Any thoughts?

mathiasbynens commented 10 years ago

@cujojs, Is that your package? If so, would you mind giving @noprompt access to it so he can publish frak properly?

If not, @izs can help removing the squatted package.

Munter commented 10 years ago

The usual convention when publishing libraries that also have a runnable binary, which seems to be the case here, is having the library itself in /lib and the runnable binary wraper in /bin. These are configurable with package.json so that should work fine.

I would make a PR for this, but for some reason I can't get leiningen to run the build targets in project.clj, so I would be working blind :(

isaacs commented 10 years ago

It's not documented, but it's not obvious the frak package is squatting. There IS code in it. Do the dance described at https://npmjs.org/doc/misc/npm-disputes.html to ask for the name.

noprompt commented 10 years ago

It's not documented, but it's not obvious the frak package is squatting. There IS code in it.

@isaacs Right. I couldn't find a repo for the project here and from the look of the package description on npm, it doesn't look like much is happening with it. Hence, I assumed they might be squatting on the package. Perhaps I'm an ass. :laughing:

@Munter No worries! If you feel like sharing the error here, go for it. If it's too much of a hassle I should be able to look in to it soon.

Munter commented 10 years ago

Regarding the build error I'm getting:

I follow the "with nodejs" guide: https://github.com/noprompt/frak#with-nodejs

✗ munter at pollex in ~/git/frak on master
$ lein do cljx once, cljsbuild once node
That's not a task. Use "lein help" to list all tasks.

The bin folder is empty

mathiasbynens commented 10 years ago

nudge

noprompt commented 10 years ago

@mathiasbynens I've been a bit on the busy side and haven't been able to make time to do this. I'd be open to merging a PR for this if you're able. I'd love to get a hold of the real frak package name on NPM if it's possible. frakjs or some other alternative is kind of lame but if the CujoJS guys aren't willing to give it up I'll live.

captn3m0 commented 8 years ago

I went ahead and pushed a frakjs package to npm. The code (pretty bare-bones) is at https://github.com/captn3m0/frakjs. Supports both the binary and the export versions.

In case anyone wants access to the package, let me know and I'll add you to the repo/package.

mathiasbynens commented 8 years ago

FWIW, I’ve been using https://github.com/alexeld/regex-trie.

mathiasbynens commented 7 years ago

…and now there’s https://github.com/devongovett/regexgen as well.