Skip to content

Commit d47a785

Browse files
authored
Refactor Build Process (#107)
* add babel-eslint as eslint parser * add node v6.x to travis * replace makefile with npm scripts * remove lodash.isplainobject from dev dependencies * use explicit import of expect in tests
1 parent e7bdb2f commit d47a785

File tree

8 files changed

+18
-32
lines changed

8 files changed

+18
-32
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": "airbnb-base",
3+
"parser": "babel-eslint",
34
"env": {
45
"mocha": true,
56
"node": true

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: node_js
22
node_js:
3-
- "4"
3+
- "6"
44
- "5"
5+
- "4"

Makefile

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"description": "Flux Standard Action utlities for Redux",
55
"main": "lib/index.js",
66
"scripts": {
7-
"test": "make test",
8-
"prepublish": "make clean build"
7+
"build": "npm run clean && babel src --out-dir lib --ignore *-test.js",
8+
"clean": "rimraf lib",
9+
"lint": "esw src --color",
10+
"lint:watch": "npm run lint -- --watch",
11+
"prepublish": "npm run lint && npm run test && npm run build",
12+
"test": "mocha --compilers js:babel-register src/**/*-test.js",
13+
"test:watch": "npm run test -- --watch src/**/*-test.js"
914
},
1015
"files": [
11-
"lib/*.js"
16+
"lib"
1217
],
1318
"keywords": [
1419
"flux",
@@ -29,16 +34,18 @@
2934
"devDependencies": {
3035
"babel-cli": "^6.7.7",
3136
"babel-core": "^6.7.7",
37+
"babel-eslint": "^6.1.1",
3238
"babel-preset-es2015": "^6.6.0",
3339
"babel-preset-stage-0": "^6.5.0",
3440
"babel-register": "^6.7.2",
3541
"chai": "^3.0.0",
3642
"eslint": "^2.8.0",
3743
"eslint-config-airbnb-base": "^1.0.3",
3844
"eslint-plugin-import": "^1.5.0",
39-
"lodash.isplainobject": "^3.2.0",
45+
"eslint-watch": "^2.1.13",
4046
"flux-standard-action": "^0.6.0",
41-
"mocha": "^2.2.5"
47+
"mocha": "^2.2.5",
48+
"rimraf": "^2.5.3"
4249
},
4350
"dependencies": {
4451
"reduce-reducers": "^0.1.0"

src/__tests__/createAction-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expect } from 'chai';
12
import { createAction } from '../';
23
import { isFSA } from 'flux-standard-action';
34

src/__tests__/handleAction-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expect } from 'chai';
12
import { handleAction, createAction } from '../';
23

34
describe('handleAction()', () => {

src/__tests__/handleActions-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expect } from 'chai';
12
import { handleActions, createAction } from '../';
23

34
describe('handleActions', () => {

src/__tests__/init.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)