xyz-data / redux-seeds

Redux Seeds : React family's all in one!
MIT License
0 stars 0 forks source link

NODE_ENV & JSON.stringify() #2

Open xgqfrms-GitHub opened 7 years ago

xgqfrms-GitHub commented 7 years ago

NODE_ENV & JSON.stringify()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

xgqfrms-GitHub commented 7 years ago

image

xgqfrms-GitHub commented 7 years ago

plugins for production

new webpack.optimize.OccurentOrderPlugin() new webpack.DefinePlugin(GLOBALS) new ExtractTextPlugin('styles.css') new webpack.optimize.DedupePlugin() new webpack.optimize.UglifyJsPlugin()

Dedupe 重复数据删除

xgqfrms-GitHub commented 7 years ago

Node ENV

process.env.NODE_ENV === 'production'

xgqfrms-GitHub commented 7 years ago

image

xgqfrms-GitHub commented 7 years ago

custom HTML

image

Cheerio

https://github.com/cheeriojs/cheerio

Fast, flexible, and lean implementation of core jQuery designed specifically for the server.

https://cheerio.js.org/

快速,灵活,精简的实现核心jQuery专为服务器而设计。

a handy way to interact with an in-memory DOM using jQuery selectors.

xgqfrms-GitHub commented 7 years ago

colors

import colors form 'colors';

bildHTML.js (file system)

import fs form 'fs';

xgqfrms-GitHub commented 7 years ago

dist Express Server

image

open

import open from 'open';

xgqfrms-GitHub commented 7 years ago

rimraf

The UNIX command rm -rf for node.

https://en.wikipedia.org/wiki/Rm_(Unix)

https://www.npmjs.com/package/rimraf

xgqfrms-GitHub commented 7 years ago

babel-node

ES6 => ES5

xgqfrms-GitHub commented 7 years ago

Express & gzip

import compression from 'ompression';

distServer

app.use(compression());