Skip to content

Update builds tools & deps #4

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

Merged
merged 4 commits into from
Oct 15, 2015
Merged
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
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/**
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
sudo: false
language: node_js
node_js:
- "iojs"
- "4.0"
- "0.10"
- "0.12"

branches:
only:
- master

script:
- npm run test
- npm run lint
- npm run build
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ With React 0.13, mixins are getting deprecated in favor of composition.
After reading this article, [Mixins Are Dead. Long Live Composition][dan_abramov],
I decided push react-script-loader a bit further and make a composition function that wraps component.


## Usage

The api is very simple `makeAsyncScriptLoader(Component, scriptUrl, options)`. Where options can contain exposeFuncs, callbackName and globalName.
Expand Down Expand Up @@ -64,7 +63,7 @@ let reCAPTCHAprops = {
};

React.render(
<ReCAPTHAWrapper onLoad={onLoad} {...reCAPTCHAprops} />,
<ReCAPTHAWrapper asyncScriptOnload={onLoad} {...reCAPTCHAprops} />,
document.body
);
```
Expand Down
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
34 changes: 18 additions & 16 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 All @@ -27,30 +30,29 @@
"devDependencies": {
"babel": "~5.8.21",
"babel-core": "~5.8.22",
"babel-eslint": "~4.0.8",
"babel-eslint": "~4.1.3",
"babel-loader": "~5.3.2",
"chai": "~3.2.0",
"chai": "~3.3.0",
"child-process-promise": "~1.1.0",
"colors": "~1.1.0",
"es5-shim": "~4.1.3",
"eslint": "~1.1.0",
"eslint-config-defaults": "~4.0.1",
"eslint-plugin-react": "~3.2.3",
"fs-promise": "~0.3.1",
"eslint": "~1.6.0",
"eslint-config-defaults": "~7.0.1",
"eslint-plugin-react": "~3.5.1",
"karma": "~0.13.9",
"karma-chai": "~0.1.0",
"karma-chrome-launcher": "~0.2.0",
"karma-cli": "~0.1.0",
"karma-mocha": "~0.2.0",
"karma-mocha-reporter": "~1.1.1",
"karma-phantomjs-launcher": "~0.2.1",
"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",
"react": "~0.13.3",
"webpack": "~1.11.0",
"yargs": "~3.19.0"
"mocha": "~2.3.3",
"mt-changelog": "^0.6.2",
"react": "~0.14.0",
"release-script": "^0.5.3",
"webpack": "~1.12.2"
},
"dependencies": {
"babel-runtime": "^5.8.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.