Commit Graph

7 Commits

Author SHA1 Message Date
petehunt
8d259093bf Merge pull request #34 from zpao/npm-ship-modules
Ship CJS modules instead of browserified build
2013-05-31 15:41:59 -07:00
Paul O’Shannessy
0c6bbf275b Ship CJS modules instead of browserified build
It turns out that if you try to browserify a file requiring react-tools,
it doesn't work. This is because browserify just visits the require
statements in the file and looks for files in that path.
./ReactCompositeComponent doesn't exist and that's the point that fails.
So the fix is to actually ship each of our CJS modules as individual
files like browserify expects. This should have no negative side effects
- we still only export React (though the rest of our modules are now
actually accessible, which might make it easier to do more with the
module).

The other change here is to move source-map to dependencies since it's
required in the transform code.

Test Plan:

```
$ npm pack .
$ cd /tmp
$ npm install path/to/react-tools-0.3.1.tgz
$ echo "require('react-tools')" > test.js
$ browserify test.js
```
2013-05-31 10:57:40 -07:00
Ben Newman
60a6665bbd Provide grunt npm:test for verifying NPM package functionality.
This basically calls `npm pack`, installs the resulting package in a temporary directory, then requires it and attempts to use the .transform method.

Closes #12.
2013-05-31 10:35:39 -04:00
Paul O’Shannessy
d40704ab85 Bump to 0.3.1 2013-05-30 14:57:32 -07:00
Paul O’Shannessy
4f7380c4d7 Fix react-tools module
I messed this up pretty badly and didn't include react *at all*.

Test Plan: npm pack && npm install <packed.tgz>, then require('react-tools')`
2013-05-29 21:20:04 -07:00
Paul O’Shannessy
12e1bb1daa Add grunt-cli to devDependencies to make sure it's installed for travisci 2013-05-29 16:17:49 -07:00
Paul O’Shannessy
75897c2dcd Initial public release 2013-05-29 12:54:02 -07:00