Browse Source

More dev and animation dependecies

Snow 8 years ago
parent
commit
890b7de13c
4 changed files with 1384 additions and 41 deletions
  1. 2 1
      .gitignore
  2. 30 2
      package.json
  3. 20 8
      webpack.config.js
  4. 1332 30
      yarn.lock

+ 2 - 1
.gitignore

@@ -1 +1,2 @@
-node_modules
+node_modules
+build

+ 30 - 2
package.json

@@ -17,15 +17,43 @@
     "babel-preset-es2015": "^6.24.1",
     "babel-preset-react": "^6.24.1",
     "babel-preset-stage-2": "^6.24.1",
+    "enzyme": "^2.8.2",
+    "enzyme-to-json": "^1.5.1",
+    "eslint": "^3.19.0",
+    "eslint-config-airbnb": "^15.0.1",
+    "eslint-plugin-import": "^2.3.0",
+    "eslint-plugin-jsx-a11y": "^5.0.3",
+    "eslint-plugin-react": "^7.1.0",
+    "husky": "^0.14.1",
+    "lint-staged": "^4.0.0",
+    "react-test-renderer": "^15.6.1",
     "webpack": "^3.0.0",
     "webpack-dev-server": "^2.5.0"
   },
   "scripts": {
-    "start": "webpack-dev-server --progress --colors --hot --config ./webpack.config.js"
+    "start": "webpack-dev-server --colors --hot --config ./webpack.config.js",
+    "build": "webpack --progress -p && cp ./public/* ./build",
+    "precommit": "lint-staged"
   },
   "dependencies": {
+    "prop-types": "^15.5.10",
     "react": "^15.6.1",
     "react-dom": "^15.6.1",
-    "react-hot-loader": "next"
+    "react-hot-loader": "next",
+    "react-motion": "^0.5.0",
+    "react-redux": "^5.0.5",
+    "react-router-dom": "4.1.1",
+    "redux": "^3.7.0",
+    "styled-components": "^2.1.0"
+  },
+  "lint-staged": {
+    "*.js": [
+      "prettier --single-quote --es5 --write",
+      "git add"
+    ],
+    "*.jsx": [
+      "prettier --single-quote --es5 --write",
+      "git add"
+    ]
   }
 }

+ 20 - 8
webpack.config.js

@@ -1,3 +1,5 @@
+const webpack = require('webpack');
+
 module.exports = {
   entry: [
     'webpack-dev-server/client?http://localhost:8080',
@@ -6,22 +8,32 @@ module.exports = {
     './src/index.js'
   ],
   module: {
-    loaders: [{
-      test: /\.jsx?$/,
-      exclude: /node_modules/,
-      loaders: ['react-hot-loader/webpack','babel-loader'],
-    }]
+    loaders: [
+      {
+        test: /\.jsx?$/,
+        exclude: /node_modules/,
+        loaders: ['react-hot-loader/webpack', 'babel-loader']
+      }
+    ]
   },
   resolve: {
     extensions: ['*', '.js', '.jsx']
   },
   output: {
-    path: __dirname + '/public',
+    path: __dirname + '/build',
     publicPath: '/',
     filename: 'bundle.js'
   },
   devServer: {
     contentBase: './public',
     hot: true
-  }
-};
+  },
+  plugins: [
+    new webpack.optimize.ModuleConcatenationPlugin(),
+    new webpack.DefinePlugin({
+      'process.env': {
+        NODE_ENV: JSON.stringify('production')
+      }
+    })
+  ]
+};

File diff suppressed because it is too large
+ 1332 - 30
yarn.lock