Skip to content

Commit

Permalink
Awww yeaaah babel time
Browse files Browse the repository at this point in the history
So excited just to use a transpiler
  • Loading branch information
chenglou committed Jun 21, 2015
1 parent 2d3c5b1 commit 7feb717
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
bower_components
node_modules
*.map
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
<div id="content1"></div>
<div id="content2"></div>

<script src="out.js"></script>
<script src="index.js"></script>
</body>
</html>
19 changes: 0 additions & 19 deletions examples/package.json

This file was deleted.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-bower": "./node_modules/.bin/browserify -s tweenState index.js > index-bower.js"
"build-bower": "./node_modules/.bin/browserify -s tweenState index.js > index-bower.js",
"build": "webpack -w -d"
},
"repository": {
"type": "git",
Expand All @@ -31,7 +32,11 @@
},
"homepage": "https://github.com/chenglou/react-tween-state",
"devDependencies": {
"browserify": "^6.3.2"
"babel-core": "^5.6.1",
"babel-loader": "^5.1.4",
"node-libs-browser": "^0.5.2",
"react": "^0.13.3",
"webpack": "^1.9.11"
},
"dependencies": {
"tween-functions": "^1.0.1"
Expand Down
21 changes: 21 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var webpack = require('webpack');

module.exports = {
entry: {
// https://github.com/webpack/webpack/issues/300
lib: ['./index.js'],
examples: './examples/index.jsx',
},
output: {
filename: './[name]/index.js',
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /build|node_modules/, loader: 'babel-loader?stage=0'},
]
},
resolve: {
extensions: ['', '.js', '.jsx']
}
};

0 comments on commit 7feb717

Please sign in to comment.