From 353e1028393acab4166bf0fa14484b3d91fa07d9 Mon Sep 17 00:00:00 2001 From: superjom Date: Mon, 25 Dec 2017 19:47:46 +0800 Subject: [PATCH] restore --- frontend/package.json | 5 ++++- frontend/tool/build.js | 1 - frontend/tool/entry.js | 1 - frontend/tool/webpack.config.js | 1 - frontend/tool/webpack.prod.config.js | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 5cd4c1f8..57dc9b6d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,9 @@ "release": "cross-env NODE_ENV=production node ./tool/build.js", "build": "cross-env NODE_ENV=dev node ./tool/build.js", "dev": "cross-env NODE_ENV=dev node tool/dev-server.js", - "lint": "./node_modules/fecs/bin/fecs --rule" + "lint": "./node_modules/fecs/bin/fecs --rule", + "precommit": "npm run lint", + "prepush": "npm run lint" }, "engines": { "node": ">= 6.4.0" @@ -52,6 +54,7 @@ "html-loader": "^0.4.4", "html-webpack-plugin": "^2.28.0", "http-proxy-middleware": "^0.17.4", + "husky": "^0.14.3", "json-loader": "^0.5.4", "opn": "^5.1.0", "optimize-css-assets-webpack-plugin": "^1.3.2", diff --git a/frontend/tool/build.js b/frontend/tool/build.js index 2590b887..d8a67b1f 100644 --- a/frontend/tool/build.js +++ b/frontend/tool/build.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const rm = require('rimraf'); const ora = require('ora'); diff --git a/frontend/tool/entry.js b/frontend/tool/entry.js index aba7919b..78754c6a 100644 --- a/frontend/tool/entry.js +++ b/frontend/tool/entry.js @@ -1,4 +1,3 @@ -"use strict"; const path = require('path'); const projectPath = path.resolve(__dirname, '..'); const HtmlWebpackPlugin = require('html-webpack-plugin'); diff --git a/frontend/tool/webpack.config.js b/frontend/tool/webpack.config.js index 90115251..24764208 100644 --- a/frontend/tool/webpack.config.js +++ b/frontend/tool/webpack.config.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const path = require('path'); const projectPath = path.resolve(__dirname, '..'); diff --git a/frontend/tool/webpack.prod.config.js b/frontend/tool/webpack.prod.config.js index 3d8bbbbc..fa73c783 100644 --- a/frontend/tool/webpack.prod.config.js +++ b/frontend/tool/webpack.prod.config.js @@ -1,4 +1,3 @@ -"use strict"; const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const path = require('path'); -- GitLab