Skip to content

Commit

Permalink
Redux Package Compilation Issues (#915)
Browse files Browse the repository at this point in the history
* Transpile react-server-redux code

* Change dest to target/

* Add npm ignore file

* Cleanup
  • Loading branch information
sresant committed Apr 7, 2017
1 parent 43316fd commit 5cf2ced
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/react-server-redux/.babelrc
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "react"]
}
4 changes: 4 additions & 0 deletions packages/react-server-redux/.gitignore
@@ -0,0 +1,4 @@
node_modules
target/
.npmignore
.gitignore
5 changes: 5 additions & 0 deletions packages/react-server-redux/.npmignore
@@ -0,0 +1,5 @@
/src
gulpfile.babel.js
.*
npm-debug.log*
/test
23 changes: 23 additions & 0 deletions packages/react-server-redux/gulpfile.babel.js
@@ -0,0 +1,23 @@
const gulp = require("gulp");
const babel = require("gulp-babel");
const eslint = require("gulp-eslint");

const SRC = ["src/*.js", "!node_modules/**"];

const DEST = "target/";

gulp.task("eslint", [], () => gulp.src(SRC)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError())
);

gulp.task("compile", () => gulp.src(SRC)
.pipe(babel())
.pipe(gulp.dest(DEST))
);


gulp.task("build", ["eslint", "compile"]);

gulp.task("travis-ci", ["build"]);
9 changes: 7 additions & 2 deletions packages/react-server-redux/package.json
Expand Up @@ -2,9 +2,10 @@
"name": "react-server-redux",
"version": "0.6.1",
"description": "Redux support for React-Server",
"main": "index.js",
"main": "target/index.js",
"scripts": {
"test": "ava test/*.spec.js && eslint *.js"
"test": "ava test/*.spec.js && gulp eslint",
"prepublish": "gulp build"
},
"repository": {
"type": "git",
Expand All @@ -29,6 +30,10 @@
},
"devDependencies": {
"ava": "^0.17.0",
"gulp": "^3.9.1",
"gulp-eslint": "^3.0.1",
"gulp-babel": "^6.1.2",
"babel-preset-es2015": "^6.18.0",
"eslint": "^3.8.1",
"eslint-plugin-react": "^6.4.1",
"babel-eslint": "^7.0.0"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/react-server-redux/test/ReduxAdapter.spec.js
@@ -1,6 +1,6 @@
const test = require('ava');
const {createStore} = require('redux');
const {ReduxAdapter} = require('../index.js');
const {ReduxAdapter} = require('../src/index.js');

const TEST_ACTION_TYPE = 'ACTION_TEST_VALUE';

Expand Down

0 comments on commit 5cf2ced

Please sign in to comment.