From bf24b7fe40c6b1709d214309cdebd206106e1781 Mon Sep 17 00:00:00 2001 From: jiangmu Date: Tue, 22 Nov 2016 20:43:43 +0800 Subject: [PATCH 1/2] fix: typo --- webpack-production.config.js => webpack.production.config.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename webpack-production.config.js => webpack.production.config.js (100%) diff --git a/webpack-production.config.js b/webpack.production.config.js similarity index 100% rename from webpack-production.config.js rename to webpack.production.config.js From 5b587da5ef273cbd49e9b65ff7e12a46f4c91e21 Mon Sep 17 00:00:00 2001 From: jiangmu Date: Tue, 22 Nov 2016 20:56:13 +0800 Subject: [PATCH 2/2] build: add dev scripts --- README.md | 4 ++-- package.json | 1 + webpack.config.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b291826b..3c82f46c 100755 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ More stuff coming soon. Stay tuned! - Fork or clone this repo. Alternatively - if you have NPM installed, you can also do `npm install adminlte-reactjs`. - Install nodejs and NPM - Go to the project's root folder from your terminal and run `npm install` -- Run `node server.js` +- Run `npm run dev` - Going to [http://localhost:8000](http://localhost:8000) will render an empty dashboard skeleton in the client-side using ReactJS. Clicking on one of the dashboard options on the left pane displays the original dashboards from AdminLTE. - Go to [http://localhost:8000/widgets.html](http://localhost:8000/widgets.html) to see available widgets in ReactJS. - Use [React Developer Tools Chrome Extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) to understand the components hierarchy and structure and to track down bugs. @@ -105,4 +105,4 @@ After you've finished writing a component and testing it out, you can include it - You can learn more about these tips in detail [here](https://guides.github.com/activities/contributing-to-open-source/#contributing) -##### If you have any further queries that you may have on how to contribute, or you have just general questions about how to use the components in your app - feel free to shoot an email. I'll help you out! :smile_cat: \ No newline at end of file +##### If you have any further queries that you may have on how to contribute, or you have just general questions about how to use the components in your app - feel free to shoot an email. I'll help you out! :smile_cat: diff --git a/package.json b/package.json index be67811b..b866f6db 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "webpack-dev-server": "~1.14.1" }, "scripts": { + "dev": "node server.js", "test": "mocha test -u bdd -R spec", "build": "webpack -p --config ./webpack.production.config.js" } diff --git a/webpack.config.js b/webpack.config.js index b121c14c..4527e0bf 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -49,7 +49,7 @@ var config = { new webpack.optimize.CommonsChunkPlugin('vendors', 'dist/js/vendors.js', Infinity), new webpack.DefinePlugin({ 'process.env': { - 'NODE_ENV': JSON.stringify('production') + 'NODE_ENV': JSON.stringify('development') } }), new webpack.optimize.UglifyJsPlugin({ @@ -135,4 +135,4 @@ WebPack that whenever we try to require something that ends with .js it should r "dev": "webpack-dev-server --devtool eval --progress --colors --content-base views/" }, -*/ \ No newline at end of file +*/