Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompiled lib, use webpack and update dependency versions #32

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
node_modules/
node_modules
npm-debug.log
lib/
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(grunt) {
src: ['example/boot.jsx'],
dest: 'example/bundle.js',
options: {
transform: ['reactify']
transform: ['babelify']
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ This value is overridden by the `collapsible` prop value set on the root `<TreeM

If the node is collapsible, whether or not the node is collapsed. Defaults to false.

## Development

`npm run watch` - For local development, run the example from localhost with live reloading of change. Then load up http://localhost:8080/ to see the code in example/ in your browser.

`npm run lib` - Update the precompiled code in lib/ with changes to src/

`npm run bundle` - Update the example/bundle.js for the example

`npm run prepublish` - Update both the precompiled code in lib/ and example/bundle.js




Expand Down
8 changes: 4 additions & 4 deletions example/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var React = require('react'),
TreeMenu = require('../index'),
TreeNode = require('../index').TreeNode,
TreeMenuUtils = require('../index').Utils,
TreeMenu = require('../src/index'),
TreeNode = require('../src/index').TreeNode,
TreeMenuUtils = require('../src/index').Utils,
Immutable = require('immutable'),
_ = require('lodash');

Expand Down Expand Up @@ -587,4 +587,4 @@ var App = React.createClass({
});


module.exports = App;
module.exports = App;
Loading