diff --git a/.gitignore b/.gitignore index dbb9d4c83b..ecb01c5ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -node_modules -npm-debug.log .DS_Store +*.log +node_modules dist lib coverage diff --git a/.npmignore b/.npmignore index 2eba144fa9..f5c0a99ca5 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,5 @@ +.DS_Store +*.log examples test coverage diff --git a/package.json b/package.json index cc2955e334..6c4b443531 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,19 @@ "description": "Atomic Flux with hot reloading", "main": "lib/index.js", "scripts": { - "browser": "scripts/browser", - "build": "scripts/build", - "clean": "scripts/clean", - "lint": "scripts/lint", - "prepublish": "scripts/prepublish", - "test": "scripts/test", - "test:watch": "scripts/test-watch", - "test:cov": "scripts/test-cov" + "clean": "rimraf lib dist coverage", + "lint": "eslint src test examples", + "test": "NODE_ENV=test mocha --compilers js:babel/register --recursive", + "test:watch": "npm test -- --watch", + "test:cov": "babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive", + "check": "npm run lint && npm run test", + "build:lib": "babel src --out-dir lib", + "build:umd": "webpack src/index.js dist/redux.js && NODE_ENV=production webpack src/index.js dist/redux.min.js", + "build": "npm run build:lib && npm run build:umd", + "preversion": "npm run clean && npm run check", + "version": "npm run build", + "postversion": "git push && git push --tags && npm run clean", + "prepublish": "npm run clean && npm run build" }, "repository": { "type": "git", diff --git a/scripts/browser b/scripts/browser deleted file mode 100755 index 22bad9a9fe..0000000000 --- a/scripts/browser +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -WEBPACK_CMD=node_modules/.bin/webpack - -mkdir -p dist - -$WEBPACK_CMD src/index.js dist/redux.js -NODE_ENV=production $WEBPACK_CMD src/index.js dist/redux.min.js diff --git a/scripts/build b/scripts/build deleted file mode 100755 index 50a3a47dcd..0000000000 --- a/scripts/build +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e - -rm -rf lib -`npm bin`/babel src --out-dir lib diff --git a/scripts/clean b/scripts/clean deleted file mode 100755 index 4f674f6e10..0000000000 --- a/scripts/clean +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -`npm bin`/rimraf ./lib diff --git a/scripts/lint b/scripts/lint deleted file mode 100755 index a109587ffa..0000000000 --- a/scripts/lint +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -`npm bin`/eslint src test examples diff --git a/scripts/prepublish b/scripts/prepublish deleted file mode 100755 index 00260c55fa..0000000000 --- a/scripts/prepublish +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -e - -sh scripts/lint -sh scripts/clean -sh scripts/browser -sh scripts/build diff --git a/scripts/test b/scripts/test deleted file mode 100755 index 8f4715ad68..0000000000 --- a/scripts/test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -NODE_ENV=test `npm bin`/mocha --compilers js:babel/register --recursive \ No newline at end of file diff --git a/scripts/test-cov b/scripts/test-cov deleted file mode 100755 index f9be36d7a1..0000000000 --- a/scripts/test-cov +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -`npm bin`/babel-node `npm bin`/isparta cover `npm bin`/_mocha -- --recursive diff --git a/scripts/test-watch b/scripts/test-watch deleted file mode 100755 index ce4725bedb..0000000000 --- a/scripts/test-watch +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -NODE_ENV=test `npm bin`/mocha --compilers js:babel/register --recursive --watch \ No newline at end of file