Tooling

From Wiki2
Revision as of 12:27, 2 September 2016 by Tim (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

tooling tips

<markdown>

    1. ~8/10/16 wamp/www/redux/sb/hrs -> iot.sitebuilt.net/xtest


- http://moduscreate.com/optimizing-react-es6-webpack-production-build/ - https://github.com/babel/example-node-server

    1. webpack dev server

DOES NOT WORK in updating the bundle if index.html is outside of /dist. Keep yout index.html inside your /dist folder

      1. windows package.json quirks
    "deploy": "NODE_ENV=production webpack -p --config webpack.production.config.js",
    "deploy": "set NODE_ENV=production&& webpack -p --config webpack.production.config.js",
      1. react-babel
   npm init
   npm install --save react
   npm install --save-dev babel-loader
   mkdir public
   cd public
   touch index.html
      1. public/index.html

<!DOCTYPE html>

      1. webpack.config.js

module.exports = { entry: "./app/components/Main.js", output: { filename: "public/bundle.js" }, module: { loaders: [ { test: /\\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel' } ] } };

</markdown>

webpack