Skip to content

npm compatibility, console testability & pre-generated parser - #2

Open
jaz303 wants to merge 3 commits into
joewalnes:masterfrom
jaz303:npm-module
Open

jaz303 wants to merge 3 commits into
joewalnes:masterfrom
jaz303:npm-module

Conversation

@jaz303

@jaz303 jaz303 commented May 14, 2014

Copy link
Copy Markdown
  1. npm compatibility

The core filtrex library has been modified so it can be installed and
require()’d by node.js projects. The previous primary build artifact
filtrex.js (and new filtrex.min.js) remains as a UMD-compatible module,
generated by browserify (and uglify-js).

  1. Console testability

The test suite has been minimally modified to allow the running of tests via
npm test.

  1. Pre-generated parser

To improve runtime efficiency and file-size, the Jison parser is precompiled
into src/parser.js.

1. npm compatibility

The core filtrex library has been modified so it can be installed and require()’d by node.js projects. The previous primary build artifact `filtrex.js` (and new filtrex.min.js) remains as a UMD-compatible module, generated by browserify (and uglify-js).

2. Console testability

The test suite has been minimally modified to allow the running of tests via `npm test`.

3. Pre-generated parser

To improve runtime efficiency and file-size, the Jison parser is precompiled into src/parser.js.
@thrashr888

Copy link
Copy Markdown

+1 I could use this. A bower config would be nice, too.

@joewalnes

Copy link
Copy Markdown
Owner

Thanks for this.

I tried the examples and they don't seem to work. I don't see any loading errors or JS console errors. Any idea what's happening?
http://rawgit.com/jaz303/filtrex/npm-module/example/highlight.html

Does any of this stuff affect end users? If so, can you add it to the README.

Thanks
-Joe

@jaz303

jaz303 commented May 15, 2014

Copy link
Copy Markdown
Author

Sorry my bad I had misnamed the exported function - please retry. There should be no change for end users.

@joewalnes

Copy link
Copy Markdown
Owner

Makefile doesn't work out of the box:

$ make
./node_modules/.bin/browserify -s compileExpression index.js > filtrex.js
/bin/sh: 1: ./node_modules/.bin/browserify: not found
make: *** [filtrex.js] Error 127

@seabre

seabre commented May 16, 2014

Copy link
Copy Markdown

@joewalnes, make works for me. Make sure you run npm install before you run make.

@joewalnes

Copy link
Copy Markdown
Owner

That should be in the makefile.

On Thu, May 15, 2014 at 9:40 PM, Sean Brewer notifications@github.comwrote:

@joewalnes https://github.com/joewalnes, make works for me. Make sure
you run npm install before you run make.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-43289753
.

@seabre

seabre commented May 16, 2014

Copy link
Copy Markdown

@jaz303 @joewalnes OK, how about something like this?: https://gist.github.com/seabre/d9dc5039ff9f31471934

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

Successfully merging this pull request may close these issues.

4 participants