Skip to content

Commit

Permalink
[changed] Build Tools to use babel
Browse files Browse the repository at this point in the history
- cleaned up webpack config, since it's only used in tests
- removed unused build folder
- removed webpack folder
- updated travis config to run all commands
- added mt-changelog and release-script
- added eslintignore
- removed unused run-babel
- updated babelrc to be loose: all
  • Loading branch information
dozoisch committed Oct 15, 2015
1 parent 253dbf2 commit 4920f59
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 142 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
"runtime",
"es7.objectRestSpread",
],
"loose": "all",
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/**
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
sudo: false
language: node_js
node_js:
- "iojs"
- "4.0"
- "0.10"
- "0.12"

script:
- npm run test
- npm run lint
- npm run build
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use strict";
require("babel/register");

var webpackConfig = require("./webpack/test.config.js");
var webpackConfig = require("./webpack.config.test.js");
var isCI = process.env.CONTINUOUS_INTEGRATION === "true";

module.exports = function (config) {
Expand Down
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
"description": "A composition mixin for loading scripts asynchronously for React",
"main": "lib/async-script-loader.js",
"scripts": {
"build": "node run-babel tools/build.js",
"lint": "eslint src test tools webpack karma.conf.js",
"test": "karma start --single-run && npm run build",
"test-watch": "karma start"
"build": "rm -rf lib && babel src --out-dir lib",
"lint": "eslint ./",
"test": "karma start --single-run",
"test-watch": "karma start",
"patch": "release patch --run",
"minor": "release minor --run",
"major": "release major --run"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,9 +49,10 @@
"karma-phantomjs-launcher": "~0.2.1",
"karma-sourcemap-loader": "~0.3.5",
"karma-webpack": "~1.7.0",
"lodash": "~3.10.1",
"mocha": "~2.2.5",
"mt-changelog": "^0.6.2",
"react": "~0.13.3",
"release-script": "^0.5.3",
"webpack": "~1.11.0",
"yargs": "~3.19.0"
},
Expand Down
9 changes: 0 additions & 9 deletions run-babel

This file was deleted.

22 changes: 0 additions & 22 deletions tools/build.js

This file was deleted.

16 changes: 0 additions & 16 deletions tools/lib/build.js

This file was deleted.

20 changes: 20 additions & 0 deletions webpack.config.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { DefinePlugin } from "webpack";
export default {
output: {
pathinfo: true,
},
devtool: "inline-source-map",

module: {
loaders: [
{ test: /\.js/, loader: "babel", exclude: /node_modules/ },
],
},
plugins: [
new DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production"),
},
}),
],
};
5 changes: 0 additions & 5 deletions webpack/strategies/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions webpack/strategies/test.js

This file was deleted.

3 changes: 0 additions & 3 deletions webpack/test.config.js

This file was deleted.

63 changes: 0 additions & 63 deletions webpack/webpack.config.js

This file was deleted.

0 comments on commit 4920f59

Please sign in to comment.