Last active
November 28, 2016 22:51
-
-
Save ccorcos/c10445374a242ee0b6b6a0a1a54c743c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/code ❯❯❯ mkdir react-test | |
~/code ❯❯❯ cd react-test | |
~/c/react-test ❯❯❯ npm init -y | |
Wrote to /Users/chetcorcos/code/react-test/package.json: | |
{ | |
"name": "react-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC" | |
} | |
~/c/react-test ❯❯❯ npm install --save react react-dom | |
react-test@1.0.0 /Users/chetcorcos/code/react-test | |
├─┬ react@15.4.1 | |
│ ├─┬ fbjs@0.8.6 | |
│ │ ├── core-js@1.2.7 | |
│ │ ├─┬ isomorphic-fetch@2.2.1 | |
│ │ │ ├─┬ node-fetch@1.6.3 | |
│ │ │ │ ├─┬ encoding@0.1.12 | |
│ │ │ │ │ └── iconv-lite@0.4.15 | |
│ │ │ │ └── is-stream@1.1.0 | |
│ │ │ └── whatwg-fetch@2.0.1 | |
│ │ ├─┬ promise@7.1.1 | |
│ │ │ └── asap@2.0.5 | |
│ │ └── ua-parser-js@0.7.12 | |
│ ├─┬ loose-envify@1.3.0 | |
│ │ └── js-tokens@2.0.0 | |
│ └── object-assign@4.1.0 | |
└── react-dom@15.4.1 | |
npm WARN react-test@1.0.0 No description | |
npm WARN react-test@1.0.0 No repository field. | |
~/c/react-test ❯❯❯ cat << 'EOF' > index.js | |
var React = require("react") | |
var ReactDOM = require("react-dom") | |
var root = document.getElementById("root") | |
ReactDOM.render(React.createElement('div', {}, 'hello world'), root) | |
EOF | |
~/c/react-test ❯❯❯ NODE_ENV='production' webpack -p index.js dist.js | |
Hash: 0616dbc337a954e35f33 | |
Version: webpack 1.13.0 | |
Time: 3742ms | |
Asset Size Chunks Chunk Names | |
dist.js 218 kB 0 [emitted] main | |
[0] ./index.js 177 bytes {0} [built] | |
+ 177 hidden modules | |
WARNING in dist.js from UglifyJs | |
Condition always true [./~/react-dom/lib/ReactDOMComponentTree.js:96,0] | |
Condition always true [./~/react-dom/lib/ReactNodeTypes.js:35,0] | |
Condition always true [./~/react-dom/lib/instantiateReactComponent.js:89,0] | |
Condition always true [./~/react-dom/lib/traverseAllChildren.js:144,0] | |
Condition always true [./~/react-dom/lib/ReactDOMComponent.js:970,0] | |
Condition always true [./~/react-dom/lib/ReactMultiChild.js:263,0] | |
Condition always true [./~/react-dom/lib/ReactMultiChild.js:283,0] | |
Condition always true [./~/react-dom/lib/findDOMNode.js:53,0] | |
Condition always true [./~/react-dom/lib/findDOMNode.js:55,0] | |
Condition always true [./~/react/lib/traverseAllChildren.js:144,0] | |
~/c/react-test ❯❯❯ la | |
total 448 | |
-rw-r--r-- 1 chetcorcos staff 213K Nov 28 14:43 dist.js | |
-rw-r--r-- 1 chetcorcos staff 177B Nov 28 14:43 index.js | |
drwxr-xr-x 19 chetcorcos staff 646B Nov 28 14:43 node_modules | |
-rw-r--r-- 1 chetcorcos staff 300B Nov 28 14:43 package.json | |
~/c/react-test ❯❯❯ gzip dist.js | |
~/c/react-test ❯❯❯ la | |
total 160 | |
-rw-r--r--@ 1 chetcorcos staff 6.0K Nov 28 14:46 .DS_Store | |
-rw-r--r-- 1 chetcorcos staff 62K Nov 28 14:46 dist.js.gz | |
-rw-r--r-- 1 chetcorcos staff 177B Nov 28 14:43 index.js | |
drwxr-xr-x 19 chetcorcos staff 646B Nov 28 14:43 node_modules | |
-rw-r--r-- 1 chetcorcos staff 300B Nov 28 14:43 package.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment