davidguttman / cssify

Simple middleware for Browserify to add css styles to the browser.
122 stars 19 forks source link

Tests #28

Closed faergeek closed 8 years ago

faergeek commented 8 years ago

I would like to setup some code style using eslint, did you use it or something like jscs/jshint?

I just generally do not understand code style (2 or 4 spaces, space before function keyword and such things).

faergeek commented 8 years ago

Also what about using ES6 with Babel or just a subset which is supported by latest Node?

davidguttman commented 8 years ago

If we do code style it should be https://www.npmjs.com/package/standard

As for ES6 I'd prefer not to pull in Babel, so either use the node subset or stay with ES5.

faergeek commented 8 years ago

Almost done writing tests, take a look, please :-)

davidguttman commented 8 years ago

Looking way better!

Since we're now using ES6, be sure to set "engines" in package.json: https://docs.npmjs.com/files/package.json#engines

If you want to avoid using the private tape method to show coverage, we can just put that it in it's own "test" at the end called "coverage" or whatever. tape will make sure it runs after everything else.

One minor thing -- the node convention is to use all lower case in file names. So lib/processCss.js should be lib/process-css.js.

Nice work!

faergeek commented 8 years ago

I would like it to be compatible with Node 4, will test a little later.

About using private method, it's not just to collect coverage, we should close the window after running tests. Without explicit window.close it just leaves it open and process waits.

Will fix filenames a little later, Thanks! :+1:

faergeek commented 8 years ago

Fixed filenames and added "engines" field. Not sure what to do about "private" interface of tape.

davidguttman commented 8 years ago

Not a big deal, fine with using the private interface.

In package.json did you mean to do "node" : ">= 4.0.0" instead of "npm" : ">= 4.0.0"?

faergeek commented 8 years ago

Yes, sorry, will fix it right now

faergeek commented 8 years ago

Done

faergeek commented 8 years ago

It's probably better to squash some commits, right?

davidguttman commented 8 years ago

Probably, want me to wait on that?

faergeek commented 8 years ago

Done

davidguttman commented 8 years ago

Nice work!

faergeek commented 8 years ago

Thanks, I'm going to add support for css modules now :-)