├── .gitignore
├── LICENSE
├── README.md
├── lerna.json
├── package.json
├── packages
├── create-react-scripts-babelrc
│ ├── README.md
│ ├── index.js
│ └── package.json
├── create-react-scripts-dll
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ └── yarn.lock
├── create-react-scripts-eslintrc
│ ├── README.md
│ ├── index.js
│ └── package.json
├── create-react-scripts-graphql
│ ├── README.md
│ ├── index.js
│ └── package.json
├── create-react-scripts-less
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ └── yarn.lock
├── create-react-scripts-sass
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ └── yarn.lock
├── create-react-scripts-ssr
│ ├── README.md
│ ├── config
│ │ └── webpack.config.server.js
│ ├── index.js
│ ├── package.json
│ ├── scripts
│ │ ├── build-server.js
│ │ └── start-server.js
│ └── utils
│ │ └── webpackHotDevClient.js
├── create-react-scripts-utils
│ ├── README.md
│ ├── getBabelLoader.js
│ ├── getCssLoader.js
│ ├── getEslintLoader.js
│ ├── getFileLoader.js
│ ├── getLoader.js
│ ├── getUrlLoader.js
│ ├── index.js
│ └── package.json
├── create-react-scripts-workbox
│ ├── README.md
│ ├── index.js
│ └── package.json
├── create-react-scripts
│ ├── README.md
│ ├── bin
│ │ └── create-react-scripts.js
│ ├── compose.js
│ ├── index.js
│ ├── package.json
│ ├── rewire.js
│ ├── scripts
│ │ ├── build.js
│ │ ├── start.js
│ │ └── test.js
│ └── yarn.lock
├── example-universal-react-app
│ ├── .gitignore
│ ├── README.md
│ ├── README.old.md
│ ├── crs.config.js
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ ├── offline.html
│ │ └── workbox-sw.js
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── logo.svg
│ │ ├── registerServiceWorker.js
│ │ └── server.js
│ └── yarn.lock
└── react-scripts-web
│ ├── README.md
│ ├── bin
│ └── react-scripts.js
│ ├── crs.config.js
│ └── package.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vscode/
3 | node_modules/
4 | build
5 | .DS_Store
6 | *.tgz
7 | lerna-debug.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 | /.changelog
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Sze Ka Wai Raymond
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Deprecated
2 | I am sorry that this project is not in active development and no plan to support react-scripts 2.0.
3 |
4 | The main purpose I created this project is to easily extend the cra configuration to support the server-side-rendering.
5 | Recently, I have moved all my private projects to nextJs that no longer depend on react-scripts anymore.
6 |
7 | I would welcome if anyone who are interested to take over this project.
8 |
9 | To support react-scripts 2.0, there are some promising libraries there.
10 |
11 | https://github.com/rescripts/rescripts
12 |
13 | https://github.com/sharegate/craco
14 |
15 | -----------------
16 | # Create React Scripts
17 | -----------------
18 | If you are faimilar with React, you must have heard of [create-react-app](https://github.com/facebookincubator/create-react-app) announced by Facebook.
19 | create-react-app is great, you don't have to worry about the babel and webpack configuration before you start learning React. Its a good tool for React beginner.
20 |
21 | How about experienced user? Is create-react-app still good? Yes and No. All the configuration are hidden by `create-react-app`. Configurations are put inside the sub package called `react-scripts`. How can we modify the configuration hidden by `create-react-app`.
22 |
23 | ## 1. Eject
24 | `create-react-app` provides an official way to do that, which is `react-scripts eject`. By doing this way, it means that you cannot enjoy any benefit `create-react-app` will provide in the future. You have to maintain the configuration yourself and you may need to keep track of the updates from create-react-app.
25 |
26 | ## 2. Fork
27 | Another way to extend the configuration is using a Fork of `create-react-app`. By doing this way, its just better, it would be *easier* to keep track of the updates from `create-react-app`. But... you still need to maintain the fork repository yourself. Is it worth to maintain the whole repository if you only need some modification on the configuration like *sass* and *less* supports?
28 |
29 | ## 3. React App Rewired
30 | [react-app-rewired](https://github.com/timarney/react-app-rewired) is a moudle that you can easily extends the webpack and babel configuration by using `config.override.js`. But the `config.override.js` must be along with your project, and it is hard to share your configuration to your teammates as you cannot publish the modification into another version of `react-script`.
31 |
32 | ## 4. Roll Your Own Boilerplate
33 | If you choose this way, then you don't even need create-react-app. But as a experienced user, setup webpack and babel configuration is a time consuming tasks. create-react-app is an official tool, I believe the choice she taken is good reference. Usually we only want to extend the configuration instead of completely rewrite.
34 |
35 | ## 5. Create React Scripts
36 | I believe there are **No Perfect Configurations Unless You Create Your Own**.
37 | This module helps you **easily extend the `react-scripts` to your own version of `react-scripts`**.
38 |
39 | # Features
40 | -----------------
41 | + **Easy to create your own `react-scripts` by just a simple configuration**
42 | + **Support similar way like what `react-app-rewired` did to modify the configuration**
43 | + **Able to customize script like building script `build:server` and `start:server` to support universal rendering**
44 | + **Composable react-scripts**
45 |
46 | # How it works?
47 | ----------------
48 | This module make use of **require.cache**, the following modules are replaced.
49 | Use this module at **Your Own Risk**.
50 |
51 | This method would be broken if the implementaion or location of following files changed.
52 | + react-scripts/config/paths.js
53 | + react-scripts/config/env.js
54 | + react-scripts/config/webpack.config.dev.js
55 | + react-scripts/config/webpack.config.prod.js
56 | + react-scripts/config/webpackDevServer.config.js
57 | + react-scripts/scripts/util/createJestConfig.js
58 |
59 | All the above are pre-required and the require.cache got replaced according to your setting in `crs.config.js`.
60 |
61 | To understand more, you can see the rewire [source code](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts/rewire.js) here.
62 |
63 | # Installation
64 | -----------------
65 | `npm i -D react-scripts create-react-scripts` or `yarn add --dev react-scripts create-react-scripts`
66 |
67 | # How to use?
68 | -----------------
69 | #### Option 1: Create your own react-scripts
70 | ##### Create a new node project
71 | use `npm init` or `yarn init`
72 | ##### Modify package.json
73 | Assume your script name is **custom-react-scripts**
74 | ```diff
75 | // package.json
76 | {
77 | "name": "custom-react-scripts",
78 | + "bin": {
79 | + custom-recat-scripts: "./bin/custom-react-scripts.js"
80 | + }
81 | + "main": "./crs.config.js"
82 | ...
83 | }
84 | ```
85 | ##### Add bin/custom-react-scripts.js
86 | Create file `bin/custom-react-scripts.js` with following content
87 | ```js
88 | // /bin/custom-react-scripts.js
89 | const path = require('path');
90 |
91 | // here we need to tell create-react-scripts whild folder to lookup crs.config.js
92 | require('create-react-scripts')(path.join(__dirname, '..'));
93 | ```
94 | ##### Add crs.config.js
95 | Create file `crs.config.js` with following content
96 | ```js
97 | // /crs-config.js
98 | // The rewire procedule follow this life cycle
99 | // NODE_ENV==='development' env --> paths --> webpack --> devServer
100 | // NODE_ENV==='production' env --> paths --> webpack
101 | // NODE_ENV==='test' env --> paths --> jest
102 |
103 | module.exports = {
104 | // Optional: Rewire the env
105 | // the env is the return result of getClientEnvironment from 'react-script/config/env.js'
106 | env(env, NODE_ENV, argv) {
107 | // modify env here...
108 | return env;
109 | },
110 | // Optional: Rewire the paths
111 | // the paths is from 'react-script/config/paths.js'
112 | paths(paths, NODE_ENV, argv) {
113 | // you can get the rewired env from 'this.env'
114 | // modify paths here...
115 | return paths;
116 | },
117 | // Optional: Rewire the webpack.config
118 | // if NODE_ENV === 'production'
119 | // the webpack config is from 'react-script/config/webpack.config.prod.js'
120 | // if NODE_ENV === 'development'
121 | // the webpack config is from 'react-script/config/webpack.config.dev.js'
122 | webpack(webpackConfig, NODE_ENV, argv) {
123 | // you can get the rewired env from 'this.env'
124 | // you can get the rewired paths from 'this.paths'
125 | // modify webpackConfig here...
126 | return webpackConfig;
127 | },
128 | // Optional: Rewire the webpackDevServer.config
129 | // the devServer is the return result of 'react-script/config/webpackDevServer.config.js'
130 | devServer: (webpackDevServerConfig, NODE_ENV, argv) {
131 | // you can get the rewired env from 'this.env'
132 | // you can get the rewired paths from 'this.paths'
133 | // you can get the rewired webpackConfig from 'this.webpack'
134 | // modify webpackDevServerConfig here...
135 | return webpackConfig;
136 | },
137 | // Optional: Rewire the jest configuration
138 | // the jestConfig is the return result of 'react-script/scripts/utils/createJestConfig.js'
139 | jest(jestConfig, NODE_ENV, argv) {
140 | // you can get the rewired env from 'this.env'
141 | // you can get the rewired paths from 'this.paths'
142 | // modify jestConfig here...
143 | return jestConfig;
144 | },
145 | // Optional: Add custom scripts
146 | scripts: {
147 | // you can add custom scripts here, for example
148 | // "start:server": path.join(__dirname, 'scripts/start-server.js')
149 | },
150 | };
151 | ```
152 | ##### Publish
153 | Choose either one
154 | 1. Publish your `custom-react-scripts` using `npm publish`
155 | 2. make use of [`lerna`](https://github.com/lerna) to connect pacakges.
156 |
157 | ##### Change package.json of your project
158 | Modify pacakge.json to use `custom-react-scripts` instead of `react-scripts`
159 | ```diff
160 | // package.json of your react app
161 | {
162 | - "start": "react-scripts start",
163 | + "start": "custom-react-scripts start",
164 | - "build": "react-scripts build",
165 | + "build": "custom-react-scripts build",
166 | - "test": "react-scripts test --env=jsdom",
167 | + "test": "custom-react-scripts test --env=jsdom"
168 | }
169 | ```
170 | #### Option 2: Customize configuration directly into your project.
171 | ##### Change package.json of your project
172 | Modify pacakge.json to use `custom-react-scripts` instead of `create-react-scripts`
173 | ```diff
174 | // package.json of your react app
175 | {
176 | - "start": "react-scripts start",
177 | + "start": "create-react-scripts start",
178 | - "build": "react-scripts build",
179 | + "build": "create-react-scripts build",
180 | - "test": "react-scripts test --env=jsdom",
181 | + "test": "create-react-scripts test --env=jsdom"
182 | }
183 | ```
184 | ##### Add crs.config.js
185 | Create file `crs.config.js` like what we did in **Option1**.
186 |
187 | #### Option 3: Mix Option 1 and Option 2
188 | Modify pacakge.json to use `custom-react-scripts` instead of `create-react-scripts`
189 | ```diff
190 | // package.json of your react app
191 | {
192 | - "start": "react-scripts start",
193 | + "start": "create-react-scripts start",
194 | - "build": "react-scripts build",
195 | + "build": "create-react-scripts build",
196 | - "test": "react-scripts test --env=jsdom",
197 | + "test": "create-react-scripts test --env=jsdom"
198 | }
199 | ```
200 | ##### Add crs.config.js
201 | Remember what we did in **Option1**'s package.json `"main": "./crs.config.js"`
202 | Now we can extend our `custom-react-scripts` in Option1.
203 | Create file `crs.config.js` with following content
204 | ```js
205 | // compose is a helper to merge multiple crs.config into one
206 | const { compose } = require('create-react-scripts');
207 | module.exports = compose(
208 | // extend from custom-react-scripts
209 | require('custom-react-scripts'),
210 | {
211 | // Optional: Rewire the env
212 | // the env is the return result of getClientEnvironment from 'react-script/config/env.js'
213 | env(env, NODE_ENV, argv) {
214 | // modify env here...
215 | return env;
216 | },
217 | // Optional: Rewire the paths
218 | // the paths is from 'react-script/config/paths.js'
219 | paths(paths, NODE_ENV, argv) {
220 | // you can get the rewired env from 'this.env'
221 | // modify paths here...
222 | return paths;
223 | },
224 | // Optional: Rewire the webpack.config
225 | // if NODE_ENV === 'production'
226 | // the webpack config is from 'react-script/config/webpack.config.prod.js'
227 | // if NODE_ENV === 'development'
228 | // the webpack config is from 'react-script/config/webpack.config.dev.js'
229 | webpack(webpackConfig, NODE_ENV, argv) {
230 | // you can get the rewired env from 'this.env'
231 | // you can get the rewired paths from 'this.paths'
232 | // modify webpackConfig here...
233 | return webpackConfig;
234 | },
235 | // Optional: Rewire the webpackDevServer.config
236 | // the devServer is the return result of 'react-script/config/webpackDevServer.config.js'
237 | devServer: (webpackDevServerConfig, NODE_ENV, argv) {
238 | // you can get the rewired env from 'this.env'
239 | // you can get the rewired paths from 'this.paths'
240 | // you can get the rewired webpackConfig from 'this.webpack'
241 | // modify webpackDevServerConfig here...
242 | return webpackConfig;
243 | },
244 | // Optional: Rewire the jest configuration
245 | // the jestConfig is the return result of 'react-script/scripts/utils/createJestConfig.js'
246 | jest(jestConfig, NODE_ENV, argv) {
247 | // you can get the rewired env from 'this.env'
248 | // you can get the rewired paths from 'this.paths'
249 | // modify jestConfig here...
250 | return jestConfig;
251 | },
252 | // Optional: Add custom scripts
253 | scripts: {
254 | // you can add custom scripts here, for example
255 | // "start:server": path.join(__dirname, 'scripts/start-server.js')
256 | },
257 | }
258 | );
259 | ```
260 |
261 | # API
262 | --------------------------------
263 | #### crs-config.js
264 | Rewire Target
265 | + [env](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/env.js) : The return result of *getClientEnvironment* of **react-scripts/config/env**
266 | + [paths](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/paths.js): The module.exports of **react-scripts/config/paths**
267 | + [webpack](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.dev.js): (NODE_ENV: development) The module.exports of **react-scripts/config/webpack.config.dev.js**
268 | + [webpack](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js): (NODE_ENV: production) The module.exports of **react-scripts/config/webpack.config.prod.js**
269 | + [devServer](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpackDevServer.config.js): The return result of module.exports of **react-scripts/config/webpackDevServer.config.js**
270 | + [jest](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/utils/createJestConfig.js): The return result of module.exports of **react-scripts/scripts/utils/createJestConfig.js**
271 |
272 | ### compose
273 | You can compose multiple crs-config together to a single crs-config.
274 | ```js
275 | const { compose } = require('create-react-scripts')
276 | const crsConfig1 = require('./crsConfig1');
277 | const crsConfig2 = require('./crsConfig2');
278 | ....
279 | const crsConfigN = require('./crsConfigN');
280 |
281 | module.exports = compose(crsConfig1, crsConfig2, ..., crsConfigN);
282 | ```
283 |
284 | ### rewire()
285 | ##### return: { env, paths, webpack, devServer, jest }
286 | + **env**: rewired createClientEnvironment function
287 | + **paths**: rewired paths
288 | + **webpack**: rewired webpackConfig
289 | + **devServer**: rewired createWebpackDevServerConfig function
290 | + **jest**: rewired createJestConfig function
291 |
292 | You can use the rewire function to obtain the rewired result.
293 | This function is useful for creating custom script.
294 | Example:
295 | **react-scripts-ssr/scripts/start-server.js** [[source](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-ssr/scripts/start-server.js)]
296 | **react-scripts-ssr/scripts/build-server.js** [[source](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-ssr/scripts/build-server.js)]
297 | ```js
298 | const { compose } = require('create-react-scripts')
299 | const crsConfig1 = require('./crsConfig1');
300 | const crsConfig2 = require('./crsConfig2');
301 | ....
302 | const crsConfigN = require('./crsConfigN');
303 |
304 | module.exports = compose(crsConfig1, crsConfig2, ..., crsConfigN);
305 | ```
306 |
307 | -----------------
308 | # Why This Project Exists
309 | -----------------
310 | #### Create React App - Zero Configuration?
311 | If you’re working with React, you’re probably familiar with the **create-react-app**. It’s an official command line interface for building React applications with **ZERO Configuration**.
312 | #### ZERO Configuration? How is it possible?
313 | **create-react-app** hides all the webpack configuration into a package **react-scripts**.
314 | With **create-react-app**, I can **enjoy all the configuration created by Facebook without any effort** and I don't need to configure myself.
315 |
316 | But... **you are not POSSIBLE to change the default configurations provided by Facebook create-react-app**.
317 | Facebook provided **2 options** to allow you to change the default configurations...
318 | 1. use the **eject** script, change the configuration.
319 | 2. **fork** the create-react-app, change and republish, keep the fork up-to-date.
320 |
321 | #### Eject or Fork?
322 | 1. **Eject**
323 | This is a one-way operation. Once you eject, you can’t go back!
324 | This command will remove the single build dependency from your project.
325 | So **you cannot enjoy any benefit or update from create-react-app in the future**.
326 |
327 | 2. **Fork**
328 | There are many fork versions of create-react-app. But normally **they only want some small changes to the configurations**... Why they need to **maintain a fork of create-react-app**?
329 |
330 | #### What most people want in create-react-app?
331 | 1. import sass support
332 | 2. import less support
333 | 3. server-side-rendering
334 | 4. vendor dll
335 | 5. ....
336 |
337 | However, all of them are postponed or even rejected **until the [Plugin System](https://github.com/facebookincubator/create-react-app/pull/2784) is supported by create-react-app.**
338 | But... **only plugin got approved by Facebook can be used**...
339 | >End-users (app developers) will only be able to use plugins which we approve and whitelist.
340 | Typically, this means it meets a set of criteria:
341 | 1.Use-case or functionality is popular
342 | 2.Adds value
343 | 3.Easy to maintain and underlying tools are stable
344 | 4.We have control to modify & publish updates to the package
345 |
346 | #### There are no perfect configurations unless you create your own
347 | I believe that **create-react-app is a good reference.** We just want to extend it to build our own react-scripts.... **Why I have to eject or fork?**
348 |
349 | #### react-app-rewired
350 | See the medium article https://medium.com/@timarney/but-i-dont-wanna-eject-3e3da5826e39
351 | This is a good tool that can just provide a **config.overrides.js** to modify the default configuration of **create-react-app**.
352 | But...
353 | The **config.overrides.js** must be along with your project... It is **not possible to create a custom version of react-scripts that could be shared with multiple projects**.
354 |
355 | #### How about create my own react-scripts based on create-react-app?
356 | This is why I created **create-react-scripts**.
357 | ##### create-react-scripts
358 | This package allow you to easily create your own 'react-scripts' based on 'react-scripts' package under create-react-app.
359 |
360 |
361 | ## Inspiration
362 | - [facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app)
363 | - [timarney/react-app-rewired](https://github.com/timarney/react-app-rewired)
364 | - [jaredpalmer/razzle](https://github.com/jaredpalmer/razzle)
365 | - [react-boilerplate/react-boilerplate](https://github.com/react-boilerplate/react-boilerplate)
366 | - [ctrlplusb/react-universally](https://github.com/ctrlplusb/react-universally)
367 |
368 | # Author
369 | -----------------
370 | - [Raymond Sze](https://github.com/raymondsze)
371 |
372 | # License
373 | -----------------
374 | MIT
375 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "lerna": "2.0.0-rc.5",
3 | "version": "independent",
4 | "packages": [
5 | "packages/*"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts",
3 | "version": "0.0.1",
4 | "private": true,
5 | "description": "Easily extend the react-scripts to your own version of react-scripts",
6 | "author": "Sze Ka Wai Raymond",
7 | "license": "MIT",
8 | "devDependencies": {
9 | "lerna": "^2.0.0-rc.5"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-babelrc/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-babelrc
2 | -----------------
3 | Mark **babelrc** option to true in [babel-loader](https://github.com/babel/babel-loader).
4 | This is very useful if you want to add some external babel feature into webpack build.
5 |
6 | Example Usage:
7 | ##### Modify crs.config
8 | Modify `crs.config` as below.
9 | ```js
10 | const { compose } = require('create-react-scripts');
11 | module.exports = compose(
12 | ...
13 | require('create-react-scripts-babelrc')(),
14 | );
15 | ```
16 |
17 | ##### Create .babelrc
18 | Create `.babelrc` under your application folder
19 | For example, I want to enable `stage-0` and `decorator` supports.
20 | ```
21 | {
22 | "presets": ["react-app", "stage-0"],
23 | "plugins": ["transform-decorators-legacy"]
24 | }
25 | ```
26 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-babelrc/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { getBabelLoader } = require('create-react-scripts-utils');
4 |
5 | module.exports = options => ({
6 | webpack(config, env) {
7 | // get the babel loader
8 | const loader = getBabelLoader(config);
9 | // obtain the options
10 | const options = loader.options || loader.query;
11 | // set the babelrc to true
12 | options.babelrc = true;
13 | return config;
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-babelrc/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-babelrc",
3 | "version": "0.1.4",
4 | "author": "Sze Ka Wai Raymond",
5 | "description": "Mark babelrc option to true to create-react-scripts",
6 | "license": "MIT",
7 | "repository": "raymondsze/create-react-scripts",
8 | "engines": {
9 | "node": ">=6"
10 | },
11 | "files": [
12 | "index.js"
13 | ],
14 | "bugs": {
15 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
16 | },
17 | "main": "index.js",
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-dll/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-dll
2 | -----------------
3 | Add [autodll-webpack-plugin](https://github.com/asfktz/autodll-webpack-plugin) support.
4 | This is useful to faster the webpack bundling time.
5 | Also, it make the code structing cleaner by separating the vendor related codes from your source codes.
6 | The pacakge specified in `vendor` section of `pacakge.json` would be bundled into `static/js/vendor:[hash:8].js`.
7 |
8 | ##### Modify crs.config
9 | Modify `crs.config` as below.
10 | ```js
11 | const { compose } = require('create-react-scripts')
12 |
13 | module.exports = compose(
14 | ...
15 | require('create-react-scripts-dll')(/* options passed to autodll-webpack-plugin */),
16 | );
17 | ```
18 |
19 | ##### Add vendor section to package.json
20 | Modify `package.json` under your application folder
21 | ```js
22 | {
23 | ...
24 | "vendor" [
25 | "react",
26 | "react-dom"
27 | ]
28 | }
29 | ```
30 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-dll/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const webpack = require('webpack');
5 | const AutoDllPlugin = require('autodll-webpack-plugin');
6 | const AssetsPlugin = require('assets-webpack-plugin');
7 |
8 | // Source maps are resource heavy and can cause out of memory issue for large source files.
9 | const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
10 |
11 | module.exports = options => ({
12 | webpack(config, env) {
13 | const appPackageJson = path.join(process.cwd(), 'package.json');
14 | const vendor = require(appPackageJson).vendor || [];
15 | const dllPlugins = [];
16 | // uglify the vendor js if in production mode
17 | if (env === 'production') {
18 | dllPlugins.push(new webpack.optimize.UglifyJsPlugin({
19 | compress: {
20 | warnings: false,
21 | comparisons: false,
22 | },
23 | output: {
24 | comments: false,
25 | ascii_only: true,
26 | },
27 | sourceMap: shouldUseSourceMap,
28 | }));
29 | }
30 | config.plugins.push(
31 | new AutoDllPlugin(Object.assign({
32 | inject: true,
33 | filename: '[name].[hash:8].js',
34 | path: './static/js/',
35 | entry: { vendor },
36 | plugins: dllPlugins,
37 | }, options))
38 | );
39 | return config;
40 | },
41 | });
42 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-dll/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-dll",
3 | "version": "0.1.5",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Add auto-dll-webpack-plugin to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "assets-webpack-plugin": "3.5.1",
20 | "autodll-webpack-plugin": "0.2.1",
21 | "webpack": "3.6.0",
22 | "webpack-dll-bundles-plugin": "^1.0.0-beta.5"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-eslintrc/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-eslintrc
2 | -----------------
3 | Mark **useEslintrc** option to true in [eslint-loader](https://github.com/MoOx/eslint-loader).
4 | This is very useful if you want to add some external eslint rules into webpack pre build.
5 |
6 | Example Usage:
7 | ##### Modify crs.config
8 | Modify `crs.config` as below.
9 | ```js
10 | const { compose } = require('create-react-scripts');
11 | module.exports = compose(
12 | ...
13 | require('create-react-scripts-eslintrc')(),
14 | );
15 | ```
16 |
17 | ##### Create .eslintrc
18 | Create `.eslintrc` under your application folder
19 | For example, I want to use `airbnb` eslint styling.
20 | ```
21 | {
22 | "parser": "babel-eslint",
23 | "extends": ["airbnb"]
24 | }
25 | ```
26 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-eslintrc/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { getEslintLoader } = require('create-react-scripts-utils');
4 |
5 | module.exports = options => ({
6 | webpack(config, env) {
7 | // get the eslint loader
8 | const loader = getEslintLoader(config);
9 | // obtain the options
10 | const options = loader.options || loader.query;
11 | // set the useEslintrc to true
12 | options.useEslintrc = true;
13 | return config;
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-eslintrc/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-eslintrc",
3 | "version": "0.1.4",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Mark useEslintrc option to true to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-graphql/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-graphql
2 | -----------------
3 | This is useful if you use Apollo and you want to enable `.graphql/.gql` extension support.
4 | Add [graphql-tag/loader](https://github.com/apollographql/graphql-tag) support.
5 | Add [jest-transform-graphql](https://github.com/remind101/jest-transform-graphql) support.
6 |
7 | Example Usage:
8 | ##### Modify crs.config
9 | Modify `crs.config` as below.
10 | ```js
11 | const { compose } = require('create-react-scripts');
12 | module.exports = compose(
13 | ...
14 | require('create-react-scripts-graphql')(/* options provided to graphql-tag/loader */),
15 | );
16 | ```
--------------------------------------------------------------------------------
/packages/create-react-scripts-graphql/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 | const { getFileLoader } = require('create-react-scripts-utils');
6 |
7 | module.exports = options => ({
8 | webpack(config, env) {
9 | const fileLoader = getFileLoader(config);
10 | fileLoader.exclude.push(/\.(graphql|gql)$/);
11 |
12 | const graphqlRules = {
13 | test: /\.(graphql|gql)$/,
14 | exclude: /node_modules/,
15 | loader: require.resolve('graphql-tag/loader'),
16 | options: options,
17 | };
18 | config.module.rules.push(graphqlRules);
19 |
20 | return config;
21 | },
22 | jest(config, env) {
23 | config.transform = Object.assign(config.transform, {
24 | '\\.(gql|graphql)$': require.resolve('jest-transform-graphql'),
25 | });
26 | return config;
27 | },
28 | });
29 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-graphql/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-graphql",
3 | "version": "0.1.5",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Enable graphql-loader to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4",
20 | "graphql": "0.10.5",
21 | "graphql-tag": "2.4.2",
22 | "jest-transform-graphql": "2.1.0"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-less/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-less
2 | -----------------
3 | Add [less-loader](https://github.com/webpack-contrib/less-loader) support.
4 |
5 | Example Usage:
6 | ##### Modify crs.config
7 | Modify `crs.config` as below.
8 | ```js
9 | const { compose } = require('create-react-scripts')
10 |
11 | module.exports = compose(
12 | require('create-react-scripts-less')(/* options passed to less-loader*/),
13 | ...
14 | );
15 | ```
--------------------------------------------------------------------------------
/packages/create-react-scripts-less/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const { getCssLoader, getFileLoader } = require('create-react-scripts-utils');
5 |
6 | module.exports = options => ({
7 | webpack(config, env) {
8 | const fileLoader = getFileLoader(config);
9 | fileLoader.exclude.push(/\.less$/);
10 |
11 | const cssRules = getCssLoader(config);
12 | let lessRules;
13 | if (env === 'production') {
14 | lessRules = {
15 | test: /\.less$/,
16 | loader: [].concat(
17 | cssRules.loader
18 | ).concat(
19 | [{
20 | loader: require.resolve('less-loader'),
21 | options,
22 | }]
23 | ).filter(l => l)
24 | };
25 | } else {
26 | lessRules = {
27 | test: /\.less$/,
28 | use: [].concat(
29 | cssRules.use
30 | ).concat(
31 | [{
32 | loader: require.resolve('less-loader'),
33 | options,
34 | }]
35 | ).filter(l => l)
36 | };
37 | }
38 | config.module.rules.push(lessRules);
39 | return config;
40 | },
41 | });
42 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-less/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-less",
3 | "version": "0.1.5",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Enable less-loader to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4",
20 | "less": "2.7.2",
21 | "less-loader": "4.0.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-sass/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-sass
2 | -----------------
3 | Add [sass-loader](https://github.com/webpack-contrib/sass-loader) support.
4 |
5 | Example Usage:
6 | ##### Modify crs.config
7 | Modify `crs.config` as below.
8 | ```js
9 | const { compose } = require('create-react-scripts')
10 |
11 | module.exports = compose(
12 | require('create-react-scripts-sass')(/* options passed to sass-loader*/),
13 | ...
14 | );
15 | ```
--------------------------------------------------------------------------------
/packages/create-react-scripts-sass/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const { getCssLoader, getFileLoader } = require('create-react-scripts-utils');
5 |
6 | module.exports = options => ({
7 | webpack(config, env) {
8 | const fileLoader = getFileLoader(config);
9 | fileLoader.exclude.push(/\.scss$/);
10 |
11 | const cssRules = getCssLoader(config);
12 | let sassRules;
13 | if (env === 'production') {
14 | sassRules = {
15 | test: /\.scss$/,
16 | loader: [].concat(
17 | cssRules.loader
18 | ).concat(
19 | [{
20 | loader: require.resolve('sass-loader'),
21 | options,
22 | }]
23 | ).filter(l => l)
24 | };
25 | } else {
26 | sassRules = {
27 | test: /\.scss$/,
28 | use: [].concat(
29 | cssRules.use
30 | ).concat(
31 | [{
32 | loader: require.resolve('sass-loader'),
33 | options,
34 | }]
35 | ).filter(l => l)
36 | };
37 | }
38 | config.module.rules.push(sassRules);
39 | return config;
40 | },
41 | });
42 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-sass/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-sass",
3 | "version": "0.1.5",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Enable sass-loader to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4",
20 | "node-sass": "4.5.3",
21 | "sass-loader": "6.0.6"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-ssr
2 | -----------------
3 | This module is useful if you want to make an universal app.
4 |
5 | # Important Note
6 | -----------------
7 | + This Module **does not automate the Server-Side-Rendeirng.**
8 | + It just **make you able to require files that without js or json extensions in server side.**
9 | + The **index.html** is no longer necessary in universal app, and it could be cached by service-worker accidentally with default setting of create-react-app.
10 | This module will detect if **index-static.html** exists instead of **index.html** to apply HTML related webpack plugins.
11 | The generated html would also be **index-static.html**
12 |
13 | # Scripts
14 | -----------------
15 | ### start:server
16 | start the both `client side bundling` and `server side bundling` webpack tasks in development mode.
17 | The server will auto reload if code changes.
18 | By default, **webpack-dev-server is running on port: 3001** while the **server is running on 3000**.
19 | The following environment variables are injected to `server side bundling`
20 |
21 | `HOST`: The host that the server should be running on.
22 | `PORT`: The port number that the server should be running on.
23 | `PROTOCOL`: The protocol that the server should be running on.
24 | `PUBLIC_URL`: The absolute url that the webpack-dev-server is running.
25 |
26 | **All client side log would be supressed in the console.**
27 | The client build is located in `build/client`
28 | The server build is located in `build/server`
29 | An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
30 | If autodll plugin is detected, an assets json manifest is located in `build/dll-assets.json`, which is useful for server-side-rendering.
31 | This script will start the `webpack-dev-server` and the `server.js`
32 |
33 | ### build:server
34 | trigger both `client side` and `server side` webpack tasks build.
35 | An assets json manifest is located in `build/assets.json`, which is useful for server-side-rendering.
36 | You can start the server by `node build/server` after build.
37 |
38 | # How it works?
39 | ----------------
40 | Webpack bundle both different environment, the client side and the server side.
41 | Make use of [assets-webpack-plugin](https://github.com/kossnocorp/assets-webpack-plugin) to produce assets mapping so that server side can know the filename produced in client side build.
42 |
43 | # Usage
44 | ---------------
45 | ##### Modify crs.config
46 | Modify `crs.config` as below.
47 | ```js
48 | const { compose } = require('create-react-scripts')
49 |
50 | module.exports = compose(
51 | require('create-react-scripts-ssr')(),
52 | ...
53 | );
54 | ```
55 |
56 | ##### Modify package.json
57 | Modify `package.json` as below.
58 | ```diff
59 | {
60 | - "start": "react-scripts start",
61 | + "start": "create-react-scripts start",
62 | + "start:server": "create-react-scripts start:server",
63 | - "build": "react-scripts build",
64 | + "build": "create-react-scripts build",
65 | + "build:server": "create-react-scripts build:server",
66 | - "test": "react-scripts test --env=jsdom",
67 | + "test": "create-react-scripts test --env=jsdom"
68 | }
69 | ```
70 | ##### Add Server.js
71 | Create `server.js` under `src` directory
72 | ```js
73 | import React from 'react';
74 | import HTMLDocument from 'react-html-document';
75 | import ReactDOMServer from 'react-dom/server';
76 | import express from 'express';
77 | import url from 'url';
78 | import serveStatic from 'serve-static';
79 | import path from 'path';
80 | import fs from 'fs';
81 | import App from './App';
82 |
83 | // To obtain the actual HOST, PORT, and PROTOCOL
84 | const HOST = process.env.HOST || '0.0.0.0';
85 | const PORT = parseInt(process.env.PORT, 10) || 5000;
86 | const PROTOCOL = process.env.PROTOCOL || 'http';
87 |
88 | // Assets manifest path from client-side dll build (if create-react-scripts-dll is using)
89 | const DLL_ASSETS_PATH = path.join(process.cwd(), 'build/dll-assets.json');
90 | // Assets manifest path from client-side build
91 | const ASSETS_PATH = path.join(process.cwd(), 'build/assets.json');
92 |
93 | // Wait until client-side bundling finished so that assets.json is produced
94 | console.log('Waiting client-side bundling...');
95 | while (!fs.existsSync(ASSETS_PATH));
96 |
97 | // Read the assets
98 | const assets = {
99 | // make sure dll assets before the assets of client-side build
100 | // ensure browser require the vendor module first
101 | ...JSON.parse(fs.readFileSync(DLL_ASSETS_PATH)),
102 | ...JSON.parse(fs.readFileSync(ASSETS_PATH)),
103 | };
104 |
105 | const app = express();
106 | // in production, the serving files are under build/client folder
107 | if (process.env.NODE_ENV === 'production') {
108 | app.use(serveStatic(path.join(process.cwd(), 'build/client'), { index: false }));
109 | }
110 |
111 | // render the app
112 | app.get('*', async (req, res) => {
113 | // you may have some data prefetching logic here
114 | // ...
115 | res.set('content-type', 'text/html').send(
116 | ReactDOMServer.renderToStaticMarkup(
117 |
118 |
119 |
120 |
124 |
125 |
126 |
127 | React App
128 | {
129 | Object.values(assets).map(mod => mod.css ? (
130 |
131 | ) : null)
132 | }
133 |
134 |
135 | ),
139 | }}
140 | />
141 | {
142 | Object.values(assets).map(mod => mod.js ? (
143 |
144 | ) : null)
145 | }
146 |
147 |
148 | )
149 | );
150 | });
151 |
152 | app.listen(PORT, () => {
153 | console.log(`Server is Running on ${url.format({ hostname: HOST, port: PORT, protocol: PROTOCOL })}!`);
154 | });
155 | ```
156 |
157 | ##### Install source-map-support
158 | This step is to make the source mapping correct in the stack trace if error is thrown from server-side
159 | `npm i -S source-map-support` or `yarn add source-map-support`
160 |
161 | ##### Start Server in Development Mode
162 | `npm run start:server` or `yarn start:server`
163 |
164 | ##### Start Server in Production Mode
165 | `npm run build:server` or `yarn build:server`
166 |
167 | # Working Example
168 | [raymondsze/example-universal-react-app](https://github.com/raymondsze/create-react-scripts/tree/master/packages/example-universal-react-app)
169 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/config/webpack.config.server.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const clone = require('clone');
4 | const webpack = require('webpack');
5 | const nodeExternals = require('webpack-node-externals');
6 | const NodemonPlugin = require('nodemon-webpack-plugin');
7 | const { getLoader, getCssLoader, getUrlLoader, getFileLoader } = require('create-react-scripts-utils');
8 |
9 | module.exports = (paths, config, publicPath) => {
10 | const webpackConfig = clone(config);
11 | // we need to put ignore-loader to scss and less files too
12 | function getSassLoader(config) {
13 | return getLoader(config, rule => String(rule.test) === String(/\.scss$/));
14 | }
15 |
16 | function getLessLoader(config) {
17 | return getLoader(config, rule => String(rule.test) === String(/\.less$/));
18 | }
19 |
20 | // do the modificatzon that fit with server-side rendering
21 | // modify css loader, remove the style-loader to make it works in server-side
22 | // css is meanless in server-side
23 | const cssLoader = getCssLoader(webpackConfig);
24 | if (cssLoader) {
25 | cssLoader.loader = require.resolve('ignore-loader');
26 | delete cssLoader.options;
27 | delete cssLoader.use;
28 | }
29 |
30 | // make it compatiable to create-react-script-sass
31 | const sassLoader = getSassLoader(webpackConfig);
32 | if (sassLoader) {
33 | sassLoader.loader = require.resolve('ignore-loader');
34 | delete sassLoader.options;
35 | delete sassLoader.use;
36 | }
37 |
38 | // make it compatiable to create-react-script-less
39 | const lessLoader = getLessLoader(webpackConfig);
40 | if (lessLoader) {
41 | lessLoader.loader = require.resolve('ignore-loader');
42 | delete lessLoader.options;
43 | delete lessLoader.use;
44 | }
45 |
46 | // do not emit file for url-loader
47 | const urlLoader = getUrlLoader(webpackConfig);
48 | if (urlLoader) {
49 | urlLoader.options = urlLoader.options || {};
50 | urlLoader.options.emitFile = false;
51 | }
52 |
53 | // do not emit file for file-loader
54 | const fileLoader = getFileLoader(webpackConfig);
55 | if (fileLoader) {
56 | fileLoader.options = fileLoader.options || {};
57 | fileLoader.options.emitFile = false;
58 | }
59 |
60 | // we do not care bundle size on server-side
61 | webpackConfig.performance = webpackConfig.performance || {};
62 | webpackConfig.performance.hints = false;
63 |
64 | // remove the node module mock
65 | // add __dirname and __filename
66 | webpackConfig.node = {
67 | __dirname: true,
68 | __filename: true,
69 | };
70 |
71 | // change the target from browser to node
72 | webpackConfig.target = 'node';
73 |
74 | // modify entry point
75 | webpackConfig.entry = [paths.appServerJs];
76 |
77 | // modify output path
78 | webpackConfig.output.path = paths.appServerBuild;
79 | webpackConfig.output.filename = 'index.js';
80 | webpackConfig.output.chunkFilename = 'index.chunk.js';
81 | webpackConfig.output.publicPath = publicPath || webpackConfig.output.publicPath;
82 |
83 | // remove the devtoolModuleFilenameTemplate as we have source-map-support
84 | webpackConfig.output.devtoolModuleFilenameTemplate = undefined;
85 |
86 | webpackConfig.plugins = webpackConfig.plugins.filter(
87 | plugin => (
88 | plugin.constructor.name === 'DefinePlugin' ||
89 | plugin.constructor.name === 'NamedModulesPlugin' ||
90 | plugin.constructor.name === 'CaseSensitivePathsPlugin' ||
91 | plugin.constructor.name === 'WatchMissingNodeModulesPlugin'
92 | )
93 | );
94 |
95 | const DefinePlugin = webpackConfig.plugins.find(
96 | plugin => plugin.constructor.name === 'DefinePlugin'
97 | );
98 |
99 | // to let process.env can be passed from outside
100 | const processEnv = DefinePlugin.definitions['process.env'];
101 | Object.entries(processEnv || {}).forEach(
102 | ([key, value]) => {
103 | DefinePlugin.definitions['process.env.' + key] = value;
104 | }
105 | );
106 | delete DefinePlugin.definitions['process.env'];
107 |
108 | webpackConfig.plugins.push(
109 | new webpack.BannerPlugin({
110 | banner: 'require(\'source-map-support\').install();',
111 | raw: true,
112 | entryOnly: false,
113 | })
114 | );
115 |
116 | if (process.env.NODE_ENV === 'development') {
117 | // inject other environment variable
118 | DefinePlugin.definitions['process.env.HOST'] = `"${process.env.HOST}"`;
119 | DefinePlugin.definitions['process.env.PORT'] = `"${process.env.PORT}"`;
120 | DefinePlugin.definitions['process.env.PROTOCOL'] = `"${process.env.PROTOCOL}"`;
121 | DefinePlugin.definitions['process.env.PUBLIC_URL'] = `"${process.env.PUBLIC_URL}"`;
122 | webpackConfig.plugins.push(
123 | // Automatically start the server when we are done compiling
124 | new NodemonPlugin()
125 | );
126 | }
127 |
128 | // treat all module inside node_module as external dependency
129 | webpackConfig.externals = [
130 | nodeExternals({
131 | whitelist: [
132 | 'source-map-support/register',
133 | /\.(?!(?:jsx?|json)$).{1,5}$/i,
134 | ]
135 | }),
136 | ];
137 | // now the webpackConfig is modified to server-side
138 | return webpackConfig;
139 | };
140 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 | const AssetsPlugin = require('assets-webpack-plugin');
6 |
7 |
8 | function ensureSlash(path, needsSlash) {
9 | const hasSlash = path.endsWith('/');
10 | if (hasSlash && !needsSlash) {
11 | return path.substr(path, path.length - 1);
12 | } else if (!hasSlash && needsSlash) {
13 | return `${path}/`;
14 | } else {
15 | return path;
16 | }
17 | }
18 |
19 | module.exports = () => ({
20 | paths(paths) {
21 | // we need to make it compatiable to create-react-scripts-typescript
22 | const appIndexJsSplit = paths.appIndexJs.split('.');
23 | // extract the extension and fit to appServerJs
24 | const extension = appIndexJsSplit[appIndexJsSplit.length - 1];
25 | paths.appServerJs = path.join(paths.appSrc, 'server.' + extension);
26 | paths.appServerBuild = path.join(paths.appBuild, 'server');
27 | paths.appBuild = path.join(paths.appBuild, 'client');
28 | paths.appHtml = path.join(fs.realpathSync(process.cwd()), 'public/index-static.html');
29 | paths.appAssets = path.join(paths.appBuild, '..');
30 | paths.appDllAssets = path.join(paths.appBuild, '..');
31 | return paths;
32 | },
33 | webpack(config, NODE_ENV) {
34 | if (NODE_ENV === 'development') {
35 | // replace the webpackHotDevClient
36 | config.entry[1] = require.resolve('./utils/webpackHotDevClient');
37 | }
38 | const paths = this.paths;
39 | // serving static html is no longer necessary in universal app
40 | // detect if static html exists
41 | // remove the html related plugin if static html doesn't exists
42 | if (!fs.existsSync(paths.appHtml)) {
43 | config.plugins = config.plugins.filter(
44 | plugin => plugin.constructor.name !== 'InterpolateHtmlPlugin' &&
45 | plugin.constructor.name !== 'HtmlWebpackPlugin'
46 | );
47 | }
48 |
49 | // find the HtmlWebpackPlugin, we need to modify the filename to index-static.html
50 | const htmlWebpackPlugin = config.plugins.find(
51 | plugin => plugin.constructor.name === 'HtmlWebpackPlugin'
52 | );
53 | if (htmlWebpackPlugin) {
54 | htmlWebpackPlugin.options.filename = 'index-static.html';
55 | }
56 |
57 | const autoDllPlugin = config.plugins.find(
58 | plugin => plugin.constructor.name === 'AutoDLLPlugin'
59 | );
60 | if (autoDllPlugin) {
61 | const pluginOptions = autoDllPlugin.originalSettings;
62 | const dllSubPlugins = pluginOptions.plugins || [];
63 | pluginOptions.plugins = dllSubPlugins.concat([
64 | new AssetsPlugin({
65 | filename: 'dll-assets.json',
66 | path: this.paths.appDllAssets,
67 | fullPath: true,
68 | processOutput: (assets) => {
69 | Object.values(assets).forEach(mod => {
70 | if (mod.js) mod.js = ensureSlash(config.output.publicPath, true) + path.join(pluginOptions.path || '', mod.js);
71 | });
72 | return JSON.stringify(assets);
73 | }
74 | })
75 | ]);
76 | }
77 |
78 | config.plugins.push(
79 | new AssetsPlugin({
80 | filename: 'assets.json',
81 | path: this.paths.appAssets,
82 | fullPath: true,
83 | })
84 | );
85 |
86 | return config;
87 | },
88 | scripts: {
89 | 'start:server': path.join(__dirname, 'scripts/start-server.js'),
90 | 'build:server': path.join(__dirname, 'scripts/build-server.js'),
91 | }
92 | });
93 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-ssr",
3 | "version": "0.1.10",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Make universal react app easy using create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "config",
14 | "scripts",
15 | "utils",
16 | "index.js"
17 | ],
18 | "bugs": {
19 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
20 | },
21 | "dependencies": {
22 | "assets-webpack-plugin": "3.5.1",
23 | "chalk": "2.1.0",
24 | "clone": "2.1.1",
25 | "create-react-scripts": "^0.1.6",
26 | "create-react-scripts-utils": "^0.1.4",
27 | "fs-extra": "4.0.2",
28 | "ignore-loader": "0.1.2",
29 | "nodemon": "1.12.1",
30 | "nodemon-webpack-plugin": "0.1.4",
31 | "react-dev-utils": "4.1.0",
32 | "react-error-overlay": "2.0.2",
33 | "sockjs-client": "1.1.4",
34 | "strip-ansi": "4.0.0",
35 | "webpack": "3.6.0",
36 | "webpack-dev-server": "2.9.1",
37 | "webpack-node-externals": "1.6.0"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/scripts/build-server.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'production';
5 | process.env.NODE_ENV = 'production';
6 |
7 | // Makes the script crash on unhandled rejections instead of silently
8 | // ignoring them. In the future, promise rejections that are not handled will
9 | // terminate the Node.js process with a non-zero exit code.
10 | process.on('unhandledRejection', err => {
11 | throw err;
12 | });
13 |
14 | const path = require('path');
15 | const fs = require('fs-extra');
16 | const chalk = require('chalk');
17 | // use the webpack from react-scripts to prevent version inconsistence
18 | const webpack = require('webpack');
19 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
20 | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
21 | const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
22 | const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
23 | const printBuildError = require('react-dev-utils/printBuildError');
24 |
25 | const measureFileSizesBeforeBuild =
26 | FileSizeReporter.measureFileSizesBeforeBuild;
27 | const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
28 |
29 | // These sizes are pretty large. We'll warn for bundles exceeding them.
30 | const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
31 | const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
32 |
33 | const crs = require('create-react-scripts');
34 |
35 | const serverlize = require('../config/webpack.config.server');
36 | // rewire the result to integrate with other plugins
37 | const rewireResult = crs.rewire();
38 | // obtain the paths
39 | const paths = rewireResult.paths;
40 | // obtain the webpack config
41 | const config = rewireResult.webpack;
42 |
43 | // Warn and crash if required files are missing
44 | if (!checkRequiredFiles([paths.appIndexJs, paths.appServerJs])) {
45 | process.exit(1);
46 | }
47 |
48 | // we can run the server-side build
49 | function buildServer() {
50 | console.log();
51 | console.log(`${chalk.cyan('SERVER-SIDE')}`);
52 | console.log('===========================================================');
53 | fs.emptyDirSync(paths.appServerBuild);
54 | console.log('Creating a server-side production build...');
55 |
56 | let compiler = webpack(serverlize(paths, config));
57 | return new Promise((resolve, reject) => {
58 | compiler.run((err, stats) => {
59 | if (err) {
60 | return reject(err);
61 | }
62 | const messages = formatWebpackMessages(stats.toJson({}, true));
63 | if (messages.errors.length) {
64 | // Only keep the first error. Others are often indicative
65 | // of the same problem, but confuse the reader with noise.
66 | if (messages.errors.length > 1) {
67 | messages.errors.length = 1;
68 | }
69 | return reject(new Error(messages.errors.join('\n\n')));
70 | }
71 | if (
72 | process.env.CI &&
73 | (typeof process.env.CI !== 'string' ||
74 | process.env.CI.toLowerCase() !== 'false') &&
75 | messages.warnings.length
76 | ) {
77 | console.log(
78 | chalk.yellow(
79 | '\nTreating warnings as errors because process.env.CI = true.\n' +
80 | 'Most CI servers set it automatically.\n'
81 | )
82 | );
83 | return reject(new Error(messages.warnings.join('\n\n')));
84 | }
85 | return resolve({
86 | stats,
87 | warnings: messages.warnings,
88 | });
89 | });
90 | }).then(
91 | ({ stats, warnings }) => {
92 | if (warnings.length) {
93 | console.log(chalk.yellow('Compiled with warnings.\n'));
94 | console.log(warnings.join('\n\n'));
95 | console.log(
96 | '\nSearch for the ' +
97 | chalk.underline(chalk.yellow('keywords')) +
98 | ' to learn more about each warning.'
99 | );
100 | console.log(
101 | 'To ignore, add ' +
102 | chalk.cyan('// eslint-disable-next-line') +
103 | ' to the line before.\n'
104 | );
105 | } else {
106 | console.log(chalk.green('Compiled successfully.\n'));
107 | }
108 | console.log(`The ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))} folder is ready.`);
109 | console.log(`You may run it in ${chalk.cyan('node')} environment`);
110 | console.log();
111 | console.log(` ${chalk.cyan('node')} ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))}`);
112 | console.log();
113 | },
114 | err => {
115 | console.log(chalk.red('Failed to compile.\n'));
116 | printBuildError(err);
117 | process.exit(1);
118 | }
119 | );
120 | }
121 |
122 | console.log();
123 | console.log(`${chalk.cyan('CLIENT-SIDE')}`);
124 | console.log('===========================================================');
125 | // First, read the current file sizes in build directory.
126 | // This lets us display how much they changed later.
127 | measureFileSizesBeforeBuild(paths.appBuild)
128 | .then(previousFileSizes => {
129 | // Remove all content but keep the directory so that
130 | // if you're in it, you don't end up in Trash
131 | fs.removeSync(path.join(paths.appAssets, 'assets.json'));
132 | fs.emptyDirSync(paths.appBuild);
133 | // Merge with the public folder
134 | copyPublicFolder();
135 | // Start the webpack build
136 | return build(previousFileSizes);
137 | })
138 | .then(
139 | ({ stats, previousFileSizes, warnings }) => {
140 | if (warnings.length) {
141 | console.log(chalk.yellow('Compiled with warnings.\n'));
142 | console.log(warnings.join('\n\n'));
143 | console.log(
144 | '\nSearch for the ' +
145 | chalk.underline(chalk.yellow('keywords')) +
146 | ' to learn more about each warning.'
147 | );
148 | console.log(
149 | 'To ignore, add ' +
150 | chalk.cyan('// eslint-disable-next-line') +
151 | ' to the line before.\n'
152 | );
153 | } else {
154 | console.log(chalk.green('Compiled successfully.\n'));
155 | }
156 |
157 | console.log('File sizes after gzip:\n');
158 | printFileSizesAfterBuild(
159 | stats,
160 | previousFileSizes,
161 | paths.appBuild,
162 | WARN_AFTER_BUNDLE_GZIP_SIZE,
163 | WARN_AFTER_CHUNK_GZIP_SIZE
164 | );
165 | console.log();
166 | buildServer();
167 | },
168 | err => {
169 | console.log(chalk.red('Failed to compile.\n'));
170 | printBuildError(err);
171 | process.exit(1);
172 | }
173 | );
174 |
175 | // Create the production build and print the deployment instructions.
176 | function build(previousFileSizes) {
177 | console.log('Creating an optimized production build...');
178 |
179 | let compiler = webpack(config);
180 | return new Promise((resolve, reject) => {
181 | compiler.run((err, stats) => {
182 | if (err) {
183 | return reject(err);
184 | }
185 | const messages = formatWebpackMessages(stats.toJson({}, true));
186 | if (messages.errors.length) {
187 | // Only keep the first error. Others are often indicative
188 | // of the same problem, but confuse the reader with noise.
189 | if (messages.errors.length > 1) {
190 | messages.errors.length = 1;
191 | }
192 | return reject(new Error(messages.errors.join('\n\n')));
193 | }
194 | if (
195 | process.env.CI &&
196 | (typeof process.env.CI !== 'string' ||
197 | process.env.CI.toLowerCase() !== 'false') &&
198 | messages.warnings.length
199 | ) {
200 | console.log(
201 | chalk.yellow(
202 | '\nTreating warnings as errors because process.env.CI = true.\n' +
203 | 'Most CI servers set it automatically.\n'
204 | )
205 | );
206 | return reject(new Error(messages.warnings.join('\n\n')));
207 | }
208 | return resolve({
209 | stats,
210 | previousFileSizes,
211 | warnings: messages.warnings,
212 | });
213 | });
214 | });
215 | }
216 |
217 | function copyPublicFolder() {
218 | fs.copySync(paths.appPublic, paths.appBuild, {
219 | dereference: true,
220 | filter: file => file !== paths.appHtml,
221 | });
222 | }
223 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/scripts/start-server.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'development';
5 | process.env.NODE_ENV = 'development';
6 |
7 | // Makes the script crash on unhandled rejections instead of silently
8 | // ignoring them. In the future, promise rejections that are not handled will
9 | // terminate the Node.js process with a non-zero exit code.
10 | process.on('unhandledRejection', err => {
11 | throw err;
12 | });
13 |
14 | const fs = require('fs');
15 | const url = require('url');
16 | const chalk = require('chalk');
17 | const webpack = require('webpack');
18 | const WebpackDevServer = require('webpack-dev-server');
19 | const clearConsole = require('react-dev-utils/clearConsole');
20 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
21 | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
22 | const printBuildError = require('react-dev-utils/printBuildError');
23 | const {
24 | choosePort,
25 | createCompiler,
26 | prepareProxy,
27 | prepareUrls,
28 | } = require('react-dev-utils/WebpackDevServerUtils');
29 | const openBrowser = require('react-dev-utils/openBrowser');
30 | const crs = require('create-react-scripts');
31 | const serverlize = require('../config/webpack.config.server');
32 |
33 | // rewire the result to integrate with other plugins
34 | const rewireResult = crs.rewire();
35 | // obtain the env
36 | const env = rewireResult.env;
37 | // obtain the paths
38 | const paths = rewireResult.paths;
39 | // obtain the webpack config
40 | const config = rewireResult.webpack;
41 | // obtain the dev server config
42 | const createDevServerConfig = rewireResult.devServer;
43 |
44 | const useYarn = fs.existsSync(paths.yarnLockFile);
45 | const isInteractive = process.stdout.isTTY;
46 |
47 | // Warn and crash if required files are missing
48 | if (!checkRequiredFiles([paths.appIndexJs, paths.appServerJs])) {
49 | process.exit(1);
50 | }
51 |
52 | // Tools like Cloud9 rely on this.
53 | // we need ask 2 port here (server and webpack-dev-server)
54 | const DEFAULT_PORT = (parseInt(process.env.PORT, 10) + 1) || 3001;
55 | const HOST = process.env.HOST || '0.0.0.0';
56 |
57 | // We attempt to use the default port but if it is busy, we offer the user to
58 | // run on a different port. `detect()` Promise resolves to the next free port.
59 | function startServer(devServerUrl) {
60 | const { port: devServerPort } = url.parse(devServerUrl);
61 | return choosePort(HOST, devServerPort - 1)
62 | .then(port => {
63 | if (port == null) {
64 | // We have not found a port.
65 | return;
66 | }
67 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
68 | const appName = require(paths.appPackageJson).name;
69 | const urls = prepareUrls(protocol, HOST, port);
70 | // Directly set the HOST, PORT and PROTOCOL, which would be used in DefinePlugin
71 | // let the webpack define the public path correctly in DefinePlugin
72 | process.env.HOST = HOST;
73 | process.env.PORT = port;
74 | process.env.PROTOCOL = protocol;
75 | process.env.PUBLIC_URL = url.format({ protocol: protocol, hostname: HOST, port: devServerPort });
76 |
77 | // Create a webpack compiler that is configured with custom messages.
78 | const webpackConfig = serverlize(paths, config, `${devServerUrl}/`);
79 | const compiler = createCompiler(webpack, webpackConfig, appName, urls, useYarn);
80 | let browserOpened = false;
81 | compiler.watch({
82 | quiet: true,
83 | stats: 'none'
84 | }, (err, stats) => {
85 | if (!browserOpened) {
86 | openBrowser(urls.localUrlForBrowser);
87 | browserOpened = true;
88 | }
89 | if (err) {
90 | console.log(chalk.red('Failed to compile.\n'));
91 | printBuildError(err);
92 | return;
93 | }
94 | if (isInteractive) {
95 | clearConsole();
96 | }
97 | const messages = formatWebpackMessages(stats.toJson({}, true));
98 | if (messages.errors.length) {
99 | // Only keep the first error. Others are often indicative
100 | // of the same problem, but confuse the reader with noise.
101 | if (messages.errors.length > 1) {
102 | messages.errors.length = 1;
103 | }
104 | console.log(chalk.red('Failed to compile.\n'));
105 | printBuildError(new Error(messages.errors.join('\n\n')));
106 | return;
107 | }
108 | console.log(chalk.green('Compiled successfully!'));
109 | console.log(
110 | `To create a production build, use ` +
111 | `${chalk.cyan(`${useYarn ? 'yarn' : 'npm run'} build:server`)}.`
112 | );
113 | console.log('Note that all client side errors or warnings are suppressed.');
114 | console.log();
115 | });
116 | })
117 | .catch(err => {
118 | if (err && err.message) {
119 | console.log(err.message);
120 | }
121 | process.exit(1);
122 | });
123 | }
124 |
125 | function startDevServer() {
126 | return choosePort(HOST, DEFAULT_PORT)
127 | .then(port => {
128 | if (port == null) {
129 | // We have not found a port.
130 | return;
131 | }
132 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
133 | const appName = require(paths.appPackageJson).name;
134 | const urls = prepareUrls(protocol, HOST, port);
135 |
136 | // find the define plugin, we need to inject the host, port and protocol for webpackHotDevClient
137 | const definePlugin = config.plugins.find(
138 | plugin => plugin.constructor.name === 'DefinePlugin'
139 | );
140 | if (definePlugin) {
141 | Object.assign(definePlugin.definitions['process.env'], {
142 | HOST: `"${HOST}"`,
143 | PORT: `"${port}"`,
144 | PROTOCOL: `"${protocol}"`,
145 | });
146 | }
147 |
148 | const PUBLIC_URL = url.format({ protocol: protocol, hostname: HOST, port: port });
149 |
150 | // find the InterpolateHtmlPlugin, we need to modify the PUBLIC_URL
151 | const interpolateHtmlPlugin = config.plugins.find(
152 | plugin => plugin.constructor.name === 'InterpolateHtmlPlugin'
153 | );
154 | if (interpolateHtmlPlugin) {
155 | interpolateHtmlPlugin.replacements.PUBLIC_URL = PUBLIC_URL;
156 | }
157 |
158 | // Create a webpack compiler that is configured with custom messages.
159 | // We use the default webpack compiler to subpress all the log
160 | const compiler = webpack(config);
161 | // Directly set the public path
162 | config.output.publicPath = `${PUBLIC_URL}/`
163 | // Load proxy config
164 | const proxySetting = require(paths.appPackageJson).proxy;
165 | const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
166 | // Serve webpack assets generated by the compiler over a web sever.
167 | const serverConfig = createDevServerConfig(
168 | proxyConfig,
169 | urls.lanUrlForConfig
170 | );
171 |
172 | const devServer = new WebpackDevServer(compiler, serverConfig);
173 | // Launch WebpackDevServer.
174 | devServer.listen(port, HOST, err => {
175 | if (err) {
176 | // return console.log(err);
177 | }
178 | if (isInteractive) {
179 | clearConsole();
180 | }
181 | console.log(chalk.cyan('Starting the development server...\n'));
182 | });
183 |
184 | ['SIGINT', 'SIGTERM'].forEach(function(sig) {
185 | process.on(sig, function() {
186 | devServer.close();
187 | process.exit();
188 | });
189 | });
190 | return url.format({ hostname: HOST, port: port, protocol: protocol });
191 | })
192 | .catch(err => {
193 | if (err && err.message) {
194 | console.log(err.message);
195 | }
196 | process.exit(1);
197 | });
198 | }
199 |
200 | startDevServer().then(startServer);
201 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-ssr/utils/webpackHotDevClient.js:
--------------------------------------------------------------------------------
1 | // This pieces of codes are copied from Facebook create-react-app
2 | // Very small modification to make it support custom protocol, host and port.
3 |
4 | /**
5 | * Copyright (c) 2015-present, Facebook, Inc.
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE file in the root directory of this source tree.
9 | */
10 |
11 | 'use strict';
12 |
13 | // This alternative WebpackDevServer combines the functionality of:
14 | // https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js
15 | // https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js
16 |
17 | // It only supports their simplest configuration (hot updates on same server).
18 | // It makes some opinionated choices on top, like adding a syntax error overlay
19 | // that looks similar to our console output. The error overlay is inspired by:
20 | // https://github.com/glenjamin/webpack-hot-middleware
21 |
22 | var SockJS = require('sockjs-client');
23 | var stripAnsi = require('strip-ansi');
24 | var url = require('url');
25 | var launchEditorEndpoint = require('react-dev-utils/launchEditorEndpoint');
26 | var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
27 | var ErrorOverlay = require('react-error-overlay');
28 |
29 | // We need to keep track of if there has been a runtime error.
30 | // Essentially, we cannot guarantee application state was not corrupted by the
31 | // runtime error. To prevent confusing behavior, we forcibly reload the entire
32 | // application. This is handled below when we are notified of a compile (code
33 | // change).
34 | // See https://github.com/facebookincubator/create-react-app/issues/3096
35 | var hadRuntimeError = false;
36 | ErrorOverlay.startReportingRuntimeErrors({
37 | launchEditorEndpoint: launchEditorEndpoint,
38 | onError: function() {
39 | hadRuntimeError = true;
40 | },
41 | filename: '/static/js/bundle.js',
42 | });
43 |
44 | if (module.hot && typeof module.hot.dispose === 'function') {
45 | module.hot.dispose(function() {
46 | // TODO: why do we need this?
47 | ErrorOverlay.stopReportingRuntimeErrors();
48 | });
49 | }
50 |
51 | // Connect to WebpackDevServer via a socket.
52 | var connection = new SockJS(
53 | url.format({
54 | protocol: process.env.PROTOCOL || window.location.protocol,
55 | hostname: process.env.HOST || window.location.hostname,
56 | port: parseInt(process.env.PORT, 10) || window.location.port,
57 | // Hardcoded in WebpackDevServer
58 | pathname: '/sockjs-node',
59 | })
60 | );
61 |
62 | // Unlike WebpackDevServer client, we won't try to reconnect
63 | // to avoid spamming the console. Disconnect usually happens
64 | // when developer stops the server.
65 | connection.onclose = function() {
66 | if (typeof console !== 'undefined' && typeof console.info === 'function') {
67 | console.info(
68 | 'The development server has disconnected.\nRefresh the page if necessary.'
69 | );
70 | }
71 | };
72 |
73 | // Remember some state related to hot module replacement.
74 | var isFirstCompilation = true;
75 | var mostRecentCompilationHash = null;
76 | var hasCompileErrors = false;
77 |
78 | function clearOutdatedErrors() {
79 | // Clean up outdated compile errors, if any.
80 | if (typeof console !== 'undefined' && typeof console.clear === 'function') {
81 | if (hasCompileErrors) {
82 | console.clear();
83 | }
84 | }
85 | }
86 |
87 | // Successful compilation.
88 | function handleSuccess() {
89 | clearOutdatedErrors();
90 |
91 | var isHotUpdate = !isFirstCompilation;
92 | isFirstCompilation = false;
93 | hasCompileErrors = false;
94 |
95 | // Attempt to apply hot updates or reload.
96 | if (isHotUpdate) {
97 | tryApplyUpdates(function onHotUpdateSuccess() {
98 | // Only dismiss it when we're sure it's a hot update.
99 | // Otherwise it would flicker right before the reload.
100 | ErrorOverlay.dismissBuildError();
101 | });
102 | }
103 | }
104 |
105 | // Compilation with warnings (e.g. ESLint).
106 | function handleWarnings(warnings) {
107 | clearOutdatedErrors();
108 |
109 | var isHotUpdate = !isFirstCompilation;
110 | isFirstCompilation = false;
111 | hasCompileErrors = false;
112 |
113 | function printWarnings() {
114 | // Print warnings to the console.
115 | var formatted = formatWebpackMessages({
116 | warnings: warnings,
117 | errors: [],
118 | });
119 |
120 | if (typeof console !== 'undefined' && typeof console.warn === 'function') {
121 | for (var i = 0; i < formatted.warnings.length; i++) {
122 | if (i === 5) {
123 | console.warn(
124 | 'There were more warnings in other files.\n' +
125 | 'You can find a complete log in the terminal.'
126 | );
127 | break;
128 | }
129 | console.warn(stripAnsi(formatted.warnings[i]));
130 | }
131 | }
132 | }
133 |
134 | // Attempt to apply hot updates or reload.
135 | if (isHotUpdate) {
136 | tryApplyUpdates(function onSuccessfulHotUpdate() {
137 | // Only print warnings if we aren't refreshing the page.
138 | // Otherwise they'll disappear right away anyway.
139 | printWarnings();
140 | // Only dismiss it when we're sure it's a hot update.
141 | // Otherwise it would flicker right before the reload.
142 | ErrorOverlay.dismissBuildError();
143 | });
144 | } else {
145 | // Print initial warnings immediately.
146 | printWarnings();
147 | }
148 | }
149 |
150 | // Compilation with errors (e.g. syntax error or missing modules).
151 | function handleErrors(errors) {
152 | clearOutdatedErrors();
153 |
154 | isFirstCompilation = false;
155 | hasCompileErrors = true;
156 |
157 | // "Massage" webpack messages.
158 | var formatted = formatWebpackMessages({
159 | errors: errors,
160 | warnings: [],
161 | });
162 |
163 | // Only show the first error.
164 | ErrorOverlay.reportBuildError(formatted.errors[0]);
165 |
166 | // Also log them to the console.
167 | if (typeof console !== 'undefined' && typeof console.error === 'function') {
168 | for (var i = 0; i < formatted.errors.length; i++) {
169 | console.error(stripAnsi(formatted.errors[i]));
170 | }
171 | }
172 |
173 | // Do not attempt to reload now.
174 | // We will reload on next success instead.
175 | }
176 |
177 | // There is a newer version of the code available.
178 | function handleAvailableHash(hash) {
179 | // Update last known compilation hash.
180 | mostRecentCompilationHash = hash;
181 | }
182 |
183 | // Handle messages from the server.
184 | connection.onmessage = function(e) {
185 | var message = JSON.parse(e.data);
186 | switch (message.type) {
187 | case 'hash':
188 | handleAvailableHash(message.data);
189 | break;
190 | case 'still-ok':
191 | case 'ok':
192 | handleSuccess();
193 | break;
194 | case 'content-changed':
195 | // Triggered when a file from `contentBase` changed.
196 | window.location.reload();
197 | break;
198 | case 'warnings':
199 | handleWarnings(message.data);
200 | break;
201 | case 'errors':
202 | handleErrors(message.data);
203 | break;
204 | default:
205 | // Do nothing.
206 | }
207 | };
208 |
209 | // Is there a newer version of this code available?
210 | function isUpdateAvailable() {
211 | /* globals __webpack_hash__ */
212 | // __webpack_hash__ is the hash of the current compilation.
213 | // It's a global variable injected by Webpack.
214 | return mostRecentCompilationHash !== __webpack_hash__;
215 | }
216 |
217 | // Webpack disallows updates in other states.
218 | function canApplyUpdates() {
219 | return module.hot.status() === 'idle';
220 | }
221 |
222 | // Attempt to update code on the fly, fall back to a hard reload.
223 | function tryApplyUpdates(onHotUpdateSuccess) {
224 | if (!module.hot) {
225 | // HotModuleReplacementPlugin is not in Webpack configuration.
226 | window.location.reload();
227 | return;
228 | }
229 |
230 | if (!isUpdateAvailable() || !canApplyUpdates()) {
231 | return;
232 | }
233 |
234 | function handleApplyUpdates(err, updatedModules) {
235 | if (err || !updatedModules || hadRuntimeError) {
236 | window.location.reload();
237 | return;
238 | }
239 |
240 | if (typeof onHotUpdateSuccess === 'function') {
241 | // Maybe we want to do something.
242 | onHotUpdateSuccess();
243 | }
244 |
245 | if (isUpdateAvailable()) {
246 | // While we were updating, there was a new update! Do it again.
247 | tryApplyUpdates();
248 | }
249 | }
250 |
251 | // https://webpack.github.io/docs/hot-module-replacement.html#check
252 | var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);
253 |
254 | // // Webpack 2 returns a Promise instead of invoking a callback
255 | if (result && result.then) {
256 | result.then(
257 | function(updatedModules) {
258 | handleApplyUpdates(null, updatedModules);
259 | },
260 | function(err) {
261 | handleApplyUpdates(err, null);
262 | }
263 | );
264 | }
265 | }
266 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-utils
2 | -----------------------
3 | Utilities used to access webpack loaders in create-react-app
4 |
5 | ### getBabelLoader(webpackConfig)
6 | ### getCssLoader(webpackConfig)
7 | ### getEslintLoader(webpackConfig)
8 | ### getFileLoader(webpackConfig)
9 | ### getLoader(webpackConfig, matcher)
10 | ### getUrlLoader(webpackConfig)
11 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getBabelLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const getLoader = require('./getLoader');
4 |
5 | function babelLoaderMatcher(rule) {
6 | return (
7 | rule.loader &&
8 | typeof rule.loader === 'string' &&
9 | rule.loader.indexOf('babel-loader') !== -1
10 | );
11 | }
12 |
13 | function getBabelLoader(config) {
14 | return getLoader(config, babelLoaderMatcher);
15 | }
16 |
17 | module.exports = getBabelLoader;
18 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getCssLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const getLoader = require('./getLoader');
4 |
5 | function cssLoaderMatcher(rule) {
6 | return String(rule.test) === String(/\.css$/);
7 | }
8 |
9 | function getCssLoader(config) {
10 | return getLoader(config, cssLoaderMatcher);
11 | }
12 |
13 | module.exports = getCssLoader;
14 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getEslintLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const getLoader = require('./getLoader');
4 |
5 | function eslintLoaderMatcher(rule) {
6 | return (
7 | rule.loader &&
8 | typeof rule.loader === 'string' &&
9 | rule.loader.indexOf('eslint-loader') !== -1
10 | );
11 | }
12 |
13 | function getEslintLoader(config) {
14 | return getLoader(config, eslintLoaderMatcher);
15 | }
16 |
17 | module.exports = getEslintLoader;
18 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getFileLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const getLoader = require('./getLoader');
4 |
5 | function fileLoaderMatcher(rule) {
6 | return (
7 | rule.loader &&
8 | typeof rule.loader === 'string' &&
9 | rule.loader.indexOf('file-loader') !== -1
10 | );
11 | }
12 |
13 | function getFileLoader(config) {
14 | return getLoader(config, fileLoaderMatcher);
15 | }
16 |
17 | module.exports = getFileLoader;
18 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const _getLoader = function(rules, matcher) {
4 | let loader;
5 | rules.some(rule => (
6 | loader = matcher(rule) ? rule : _getLoader(rule.use || rule.oneOf || [], matcher)
7 | ));
8 | return loader;
9 | };
10 |
11 | const getLoader = function(config, matcher) {
12 | return _getLoader(config.module.rules, matcher);
13 | }
14 |
15 | module.exports = getLoader;
16 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/getUrlLoader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const getLoader = require('./getLoader');
4 |
5 | function urlLoaderMatcher(rule) {
6 | return (
7 | rule.loader &&
8 | typeof rule.loader === 'string' &&
9 | rule.loader.indexOf('url-loader') !== -1
10 | );
11 | }
12 |
13 | function getUrlLoader(config) {
14 | return getLoader(config, urlLoaderMatcher);
15 | }
16 |
17 | module.exports = getUrlLoader;
18 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | getBabelLoader: require('./getBabelLoader'),
5 | getCssLoader: require('./getCssLoader'),
6 | getEslintLoader: require('./getEslintLoader'),
7 | getFileLoader: require('./getFileLoader'),
8 | getLoader: require('./getLoader'),
9 | getUrlLoader: require('./getUrlLoader'),
10 | };
11 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-utils/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-utils",
3 | "version": "0.1.4",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Utilities used to access webpack loaders in create-react-app",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "getBabelLoader.js",
14 | "getCssLoader.js",
15 | "getEslintLoader.js",
16 | "getFileLoader.js",
17 | "getUrlLoader.js",
18 | "getLoader.js",
19 | "index.js"
20 | ],
21 | "bugs": {
22 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-workbox/README.md:
--------------------------------------------------------------------------------
1 | # create-react-scripts-workbox
2 | -----------------
3 | Repalce old [sw-precache-webpack-plugin](https://www.npmjs.com/package/sw-precache-webpack-plugin) Plugin to [workbox-webpack-plugin](https://www.npmjs.com/package/workbox-webpack-plugin).
4 |
5 | It also allow you to add `serviceWorker.js` to extend the `service-worker.js` generated in webpack build.
6 | Like what `importScripts` did in `sw-precache-webpack-plugin`.
7 |
8 | Example Usage:
9 | ##### Modify crs.config
10 | Modify `crs.config` as below.
11 | ```js
12 | const { compose } = require('create-react-scripts')
13 |
14 | module.exports = compose(
15 | require('create-react-scripts-workbox')(/* options passed to sass-loader*/),
16 | ...
17 | );
18 | ```
19 | ##### Customize service-worker (Optional)
20 | Please make sure you read the follwing issues.
21 | (https://github.com/GoogleChrome/workbox/issues/672)
22 | (https://github.com/GoogleChrome/workbox/issues/795)
23 |
24 | Create `serviceWorker.js` under your application folder
25 | ```js
26 | importScripts('https://unpkg.com/workbox-sw@0.0.2');
27 |
28 | const workboxSW = new WorkboxSW({clientsClaim: true});
29 |
30 | // This array will be populated by workboxBuild.injectManifest() when the
31 | // production service worker is generated.
32 | workboxSW.precache([]);
33 |
34 | workboxSW.router.setDefaultHandler({
35 | handler: workboxSW.strategies.staleWhileRevalidate()
36 | });
37 | ```
38 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-workbox/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 | const workboxPlugin = require('workbox-webpack-plugin');
6 |
7 | module.exports = (options) => ({
8 | paths(paths) {
9 | paths.appWorkboxCliJs = path.join(fs.realpathSync(process.cwd()), 'workbox-cli.js');
10 | paths.appSwJs = path.join(fs.realpathSync(process.cwd()), 'serviceWorker.js');
11 | return paths;
12 | },
13 | webpack(config, NODE_ENV) {
14 | // service-worker is only enabled in production environment
15 | if (NODE_ENV === 'production') {
16 | const paths = this.paths;
17 | // remove the original swPreCache plugin from create-react-app
18 | config.plugins = config.plugins.filter(
19 | plugin => plugin.constructor.name !== 'SWPrecacheWebpackPlugin'
20 | );
21 | // Note these issues
22 | // https://github.com/GoogleChrome/workbox/issues/672
23 | // https://github.com/GoogleChrome/workbox/issues/795
24 | const swSrcOptions = {};
25 | if (fs.existsSync(paths.appSwJs)) {
26 | // inject manifest mode
27 | swSrcOptions.swSrc = paths.appSwJs;
28 | }
29 | // push the webpack workbox plugin
30 | config.plugins.push(
31 | new workboxPlugin(
32 | Object.assign({
33 | // to make sure favicon and manifest would prepend the publicPath
34 | modifyUrlPrefix: {
35 | "": config.output.publicPath,
36 | },
37 | // By default, a cache-busting query parameter is appended to requests
38 | // used to populate the caches, to ensure the responses are fresh.
39 | // If a URL is already hashed by Webpack, then there is no concern
40 | // about it being stale, and the cache-busting can be skipped.
41 | dontCacheBustUrlsMatching: /\.\w{8}\./,
42 | // glob all files inside build folder to pre-cache
43 | globDirectory: paths.appBuild,
44 | // glob all file types
45 | globPatterns: ['**\/*.*'],
46 | // ignore map and asset-manifest files
47 | globIgnores: ['**\/*.map', 'asset-manifest\.json', 'service-worker.js', 'workbox-sw*.js'],
48 | // output filepathweb_app_manifest
49 | swDest: path.join(paths.appBuild, 'service-worker.js'),
50 | }, swSrcOptions, options)
51 | )
52 | );
53 | }
54 | return config;
55 | },
56 | });
57 |
--------------------------------------------------------------------------------
/packages/create-react-scripts-workbox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts-workbox",
3 | "version": "0.1.4",
4 | "author": "Sze Ka Wai Raymond",
5 | "main": "index.js",
6 | "description": "Enable workbox-webpack-plugin to create-react-scripts",
7 | "license": "MIT",
8 | "repository": "raymondsze/create-react-scripts",
9 | "engines": {
10 | "node": ">=6"
11 | },
12 | "files": [
13 | "index.js"
14 | ],
15 | "bugs": {
16 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
17 | },
18 | "dependencies": {
19 | "create-react-scripts-utils": "^0.1.4",
20 | "workbox-sw": "2.1.0",
21 | "workbox-webpack-plugin": "2.1.0"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/README.md:
--------------------------------------------------------------------------------
1 | -----------------
2 | # Create React Scripts
3 | -----------------
4 | If you are faimilar with React, you must have heard of [create-react-app](https://github.com/facebookincubator/create-react-app) announced by Facebook.
5 | create-react-app is great, you don't have to worry about the babel and webpack configuration before you start learning React. Its a good tool for React beginner.
6 |
7 | How about experienced user? Is create-react-app still good? Yes and No. All the configuration are hidden by `create-react-app`. Configurations are put inside the sub package called `react-scripts`. How can we modify the configuration hidden by `create-react-app`.
8 |
9 | ## 1. Eject
10 | `create-react-app` provides an official way to do that, which is `react-scripts eject`. By doing this way, it means that you cannot enjoy any benefit `create-react-app` will provide in the future. You have to maintain the configuration yourself and you may need to keep track of the updates from create-react-app.
11 |
12 | ## 2. Fork
13 | Another way to extend the configuration is using a Fork of `create-react-app`. By doing this way, its just better, it would be *easier* to keep track of the updates from `create-react-app`. But... you still need to maintain the fork repository yourself. Is it worth to maintain the whole repository if you only need some modification on the configuration like *sass* and *less* supports?
14 |
15 | ## 3. React App Rewired
16 | [react-app-rewired](https://github.com/timarney/react-app-rewired) is a moudle that you can easily extends the webpack and babel configuration by using `config.override.js`. But the `config.override.js` must be along with your project, and it is hard to share your configuration to your teammates as you cannot publish the modification into another version of `react-script`.
17 |
18 | ## 4. Roll Your Own Boilerplate
19 | If you choose this way, then you don't even need create-react-app. But as a experienced user, setup webpack and babel configuration is a time consuming tasks. create-react-app is an official tool, I believe the choice she taken is good reference. Usually we only want to extend the configuration instead of completely rewrite.
20 |
21 | ## 5. Create React Scripts
22 | I believe there are **No Perfect Configurations Unless You Create Your Own**.
23 | This module helps you **easily extend the `react-scripts` to your own version of `react-scripts`**.
24 |
25 | # Features
26 | -----------------
27 | + **Easy to create your own `react-scripts` by just a simple configuration**
28 | + **Support similar way like what `react-app-rewired` did to modify the configuration**
29 | + **Able to customize script like building script `build:server` and `start:server` to support universal rendering**
30 | + **Composable react-scripts**
31 |
32 | # How it works?
33 | ----------------
34 | This module make use of **require.cache**, the following modules are replaced.
35 | Use this module at **Your Own Risk**.
36 |
37 | This method would be broken if the implementaion or location of following files changed.
38 | + react-scripts/config/paths.js
39 | + react-scripts/config/env.js
40 | + react-scripts/config/webpack.config.dev.js
41 | + react-scripts/config/webpack.config.prod.js
42 | + react-scripts/config/webpackDevServer.config.js
43 | + react-scripts/scripts/util/createJestConfig.js
44 |
45 | All the above are pre-required and the require.cache got replaced according to your setting in `crs.config.js`.
46 |
47 | To understand more, you can see the rewire [source code](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts/rewire.js) here.
48 |
49 | # Installation
50 | -----------------
51 | `npm i -D react-scripts create-react-scripts` or `yarn add --dev react-scripts create-react-scripts`
52 |
53 | # How to use?
54 | -----------------
55 | #### Option 1: Create your own react-scripts
56 | ##### Create a new node project
57 | use `npm init` or `yarn init`
58 | ##### Modify package.json
59 | Assume your script name is **custom-react-scripts**
60 | ```diff
61 | // package.json
62 | {
63 | "name": "custom-react-scripts",
64 | + "bin": {
65 | + custom-recat-scripts: "./bin/custom-react-scripts.js"
66 | + }
67 | + "main": "./crs.config.js"
68 | ...
69 | }
70 | ```
71 | ##### Add bin/custom-react-scripts.js
72 | Create file `bin/custom-react-scripts.js` with following content
73 | ```js
74 | // /bin/custom-react-scripts.js
75 | const path = require('path');
76 |
77 | // here we need to tell create-react-scripts whild folder to lookup crs.config.js
78 | require('create-react-scripts')(path.join(__dirname, '..'));
79 | ```
80 | ##### Add crs.config.js
81 | Create file `crs.config.js` with following content
82 | ```js
83 | // /crs-config.js
84 | // The rewire procedule follow this life cycle
85 | // NODE_ENV==='development' env --> paths --> webpack --> devServer
86 | // NODE_ENV==='production' env --> paths --> webpack
87 | // NODE_ENV==='test' env --> paths --> jest
88 |
89 | module.exports = {
90 | // Optional: Rewire the env
91 | // the env is the return result of getClientEnvironment from 'react-script/config/env.js'
92 | env(env, NODE_ENV, argv) {
93 | // modify env here...
94 | return env;
95 | },
96 | // Optional: Rewire the paths
97 | // the paths is from 'react-script/config/paths.js'
98 | paths(paths, NODE_ENV, argv) {
99 | // you can get the rewired env from 'this.env'
100 | // modify paths here...
101 | return paths;
102 | },
103 | // Optional: Rewire the webpack.config
104 | // if NODE_ENV === 'production'
105 | // the webpack config is from 'react-script/config/webpack.config.prod.js'
106 | // if NODE_ENV === 'development'
107 | // the webpack config is from 'react-script/config/webpack.config.dev.js'
108 | webpack(webpackConfig, NODE_ENV, argv) {
109 | // you can get the rewired env from 'this.env'
110 | // you can get the rewired paths from 'this.paths'
111 | // modify webpackConfig here...
112 | return webpackConfig;
113 | },
114 | // Optional: Rewire the webpackDevServer.config
115 | // the devServer is the return result of 'react-script/config/webpackDevServer.config.js'
116 | devServer: (webpackDevServerConfig, NODE_ENV, argv) {
117 | // you can get the rewired env from 'this.env'
118 | // you can get the rewired paths from 'this.paths'
119 | // you can get the rewired webpackConfig from 'this.webpack'
120 | // modify webpackDevServerConfig here...
121 | return webpackConfig;
122 | },
123 | // Optional: Rewire the jest configuration
124 | // the jestConfig is the return result of 'react-script/scripts/utils/createJestConfig.js'
125 | jest(jestConfig, NODE_ENV, argv) {
126 | // you can get the rewired env from 'this.env'
127 | // you can get the rewired paths from 'this.paths'
128 | // modify jestConfig here...
129 | return jestConfig;
130 | },
131 | // Optional: Add custom scripts
132 | scripts: {
133 | // you can add custom scripts here, for example
134 | // "start:server": path.join(__dirname, 'scripts/start-server.js')
135 | },
136 | };
137 | ```
138 | ##### Publish
139 | Choose either one
140 | 1. Publish your `custom-react-scripts` using `npm publish`
141 | 2. make use of [`lerna`](https://github.com/lerna) to connect pacakges.
142 |
143 | ##### Change package.json of your project
144 | Modify pacakge.json to use `custom-react-scripts` instead of `react-scripts`
145 | ```diff
146 | // package.json of your react app
147 | {
148 | - "start": "react-scripts start",
149 | + "start": "custom-react-scripts start",
150 | - "build": "react-scripts build",
151 | + "build": "custom-react-scripts build",
152 | - "test": "react-scripts test --env=jsdom",
153 | + "test": "custom-react-scripts test --env=jsdom"
154 | }
155 | ```
156 | #### Option 2: Customize configuration directly into your project.
157 | ##### Change package.json of your project
158 | Modify pacakge.json to use `custom-react-scripts` instead of `create-react-scripts`
159 | ```diff
160 | // package.json of your react app
161 | {
162 | - "start": "react-scripts start",
163 | + "start": "create-react-scripts start",
164 | - "build": "react-scripts build",
165 | + "build": "create-react-scripts build",
166 | - "test": "react-scripts test --env=jsdom",
167 | + "test": "create-react-scripts test --env=jsdom"
168 | }
169 | ```
170 | ##### Add crs.config.js
171 | Create file `crs.config.js` like what we did in **Option1**.
172 |
173 | #### Option 3: Mix Option 1 and Option 2
174 | Modify pacakge.json to use `custom-react-scripts` instead of `create-react-scripts`
175 | ```diff
176 | // package.json of your react app
177 | {
178 | - "start": "react-scripts start",
179 | + "start": "create-react-scripts start",
180 | - "build": "react-scripts build",
181 | + "build": "create-react-scripts build",
182 | - "test": "react-scripts test --env=jsdom",
183 | + "test": "create-react-scripts test --env=jsdom"
184 | }
185 | ```
186 | ##### Add crs.config.js
187 | Remember what we did in **Option1**'s package.json `"main": "./crs.config.js"`
188 | Now we can extend our `custom-react-scripts` in Option1.
189 | Create file `crs.config.js` with following content
190 | ```js
191 | // compose is a helper to merge multiple crs.config into one
192 | const { compose } = require('create-react-scripts');
193 | module.exports = compose(
194 | // extend from custom-react-scripts
195 | require('custom-react-scripts'),
196 | {
197 | // Optional: Rewire the env
198 | // the env is the return result of getClientEnvironment from 'react-script/config/env.js'
199 | env(env, NODE_ENV, argv) {
200 | // modify env here...
201 | return env;
202 | },
203 | // Optional: Rewire the paths
204 | // the paths is from 'react-script/config/paths.js'
205 | paths(paths, NODE_ENV, argv) {
206 | // you can get the rewired env from 'this.env'
207 | // modify paths here...
208 | return paths;
209 | },
210 | // Optional: Rewire the webpack.config
211 | // if NODE_ENV === 'production'
212 | // the webpack config is from 'react-script/config/webpack.config.prod.js'
213 | // if NODE_ENV === 'development'
214 | // the webpack config is from 'react-script/config/webpack.config.dev.js'
215 | webpack(webpackConfig, NODE_ENV, argv) {
216 | // you can get the rewired env from 'this.env'
217 | // you can get the rewired paths from 'this.paths'
218 | // modify webpackConfig here...
219 | return webpackConfig;
220 | },
221 | // Optional: Rewire the webpackDevServer.config
222 | // the devServer is the return result of 'react-script/config/webpackDevServer.config.js'
223 | devServer: (webpackDevServerConfig, NODE_ENV, argv) {
224 | // you can get the rewired env from 'this.env'
225 | // you can get the rewired paths from 'this.paths'
226 | // you can get the rewired webpackConfig from 'this.webpack'
227 | // modify webpackDevServerConfig here...
228 | return webpackConfig;
229 | },
230 | // Optional: Rewire the jest configuration
231 | // the jestConfig is the return result of 'react-script/scripts/utils/createJestConfig.js'
232 | jest(jestConfig, NODE_ENV, argv) {
233 | // you can get the rewired env from 'this.env'
234 | // you can get the rewired paths from 'this.paths'
235 | // modify jestConfig here...
236 | return jestConfig;
237 | },
238 | // Optional: Add custom scripts
239 | scripts: {
240 | // you can add custom scripts here, for example
241 | // "start:server": path.join(__dirname, 'scripts/start-server.js')
242 | },
243 | }
244 | );
245 | ```
246 |
247 | # API
248 | --------------------------------
249 | #### crs-config.js
250 | Rewire Target
251 | + [env](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/env.js) : The return result of *getClientEnvironment* of **react-scripts/config/env**
252 | + [paths](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/paths.js): The module.exports of **react-scripts/config/paths**
253 | + [webpack](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.dev.js): (NODE_ENV: development) The module.exports of **react-scripts/config/webpack.config.dev.js**
254 | + [webpack](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js): (NODE_ENV: production) The module.exports of **react-scripts/config/webpack.config.prod.js**
255 | + [devServer](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpackDevServer.config.js): The return result of module.exports of **react-scripts/config/webpackDevServer.config.js**
256 | + [jest](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/utils/createJestConfig.js): The return result of module.exports of **react-scripts/scripts/utils/createJestConfig.js**
257 |
258 | Parameters:
259 | ```js
260 | module.exports = {
261 | env: (env, NODE_ENV, script) => {
262 | // env: rewire target
263 | // NODE_ENV: process.env.NODE_ENV
264 | // script: current running script
265 | // possible values are (start | build | server | test)
266 | },
267 | paths: (paths, NODE_ENV, script) => {
268 | // paths: rewire target
269 | // NODE_ENV: process.env.NODE_ENV
270 | // script: current running script
271 | // possible values are (start | build | server | test)
272 | },
273 | webpack: (webpackConfig, NODE_ENV, script) => {
274 | // webpackConfig: rewire target
275 | // NODE_ENV: process.env.NODE_ENV
276 | // script: current running script
277 | // possible values are (start | build | server | test)
278 | },
279 | devServer: (webpackDevServerConfig, NODE_ENV, script) => {
280 | // webpackDevServerConfig: rewire target
281 | // NODE_ENV: process.env.NODE_ENV
282 | // script: current running script
283 | // possible values are (start | build | server | test)
284 | },
285 | jest: (jestConfig, NODE_ENV, script) => {
286 | // jestConfig: rewire target
287 | // NODE_ENV: process.env.NODE_ENV
288 | // script: current running script
289 | // possible values are (start | build | server | test)
290 | },
291 | };
292 | ```
293 |
294 | ### compose
295 | You can compose multiple crs-config together to a single crs-config.
296 | ```js
297 | const { compose } = require('create-react-scripts')
298 | const crsConfig1 = require('./crsConfig1');
299 | const crsConfig2 = require('./crsConfig2');
300 | ....
301 | const crsConfigN = require('./crsConfigN');
302 |
303 | module.exports = compose(crsConfig1, crsConfig2, ..., crsConfigN);
304 | ```
305 |
306 | ### rewire()
307 | ##### return: { env, paths, webpack, devServer, jest }
308 | + **env**: rewired createClientEnvironment function
309 | + **paths**: rewired paths
310 | + **webpack**: rewired webpackConfig
311 | + **devServer**: rewired createWebpackDevServerConfig function
312 | + **jest**: rewired createJestConfig function
313 |
314 | You can use the rewire function to obtain the rewired result.
315 | This function is useful for creating custom script.
316 | Example:
317 | **react-scripts-ssr/scripts/start-server.js** [[source](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-ssr/scripts/start-server.js)]
318 | **react-scripts-ssr/scripts/build-server.js** [[source](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-ssr/scripts/build-server.js)]
319 | ```js
320 | const { compose } = require('create-react-scripts')
321 | const crsConfig1 = require('./crsConfig1');
322 | const crsConfig2 = require('./crsConfig2');
323 | ....
324 | const crsConfigN = require('./crsConfigN');
325 |
326 | module.exports = compose(crsConfig1, crsConfig2, ..., crsConfigN);
327 | ```
328 |
329 | -----------------
330 | # Why This Project Exists
331 | -----------------
332 | #### Create React App - Zero Configuration?
333 | If you’re working with React, you’re probably familiar with the **create-react-app**. It’s an official command line interface for building React applications with **ZERO Configuration**.
334 | #### ZERO Configuration? How is it possible?
335 | **create-react-app** hides all the webpack configuration into a package **react-scripts**.
336 | With **create-react-app**, I can **enjoy all the configuration created by Facebook without any effort** and I don't need to configure myself.
337 |
338 | But... **you are not POSSIBLE to change the default configurations provided by Facebook create-react-app**.
339 | Facebook provided **2 options** to allow you to change the default configurations...
340 | 1. use the **eject** script, change the configuration.
341 | 2. **fork** the create-react-app, change and republish, keep the fork up-to-date.
342 |
343 | #### Eject or Fork?
344 | 1. **Eject**
345 | This is a one-way operation. Once you eject, you can’t go back!
346 | This command will remove the single build dependency from your project.
347 | So **you cannot enjoy any benefit or update from create-react-app in the future**.
348 |
349 | 2. **Fork**
350 | There are many fork versions of create-react-app. But normally **they only want some small changes to the configurations**... Why they need to **maintain a fork of create-react-app**?
351 |
352 | #### What most people want in create-react-app?
353 | 1. import sass support
354 | 2. import less support
355 | 3. server-side-rendering
356 | 4. vendor dll
357 | 5. ....
358 |
359 | However, all of them are postponed or even rejected **until the [Plugin System](https://github.com/facebookincubator/create-react-app/pull/2784) is supported by create-react-app.**
360 | But... **only plugin got approved by Facebook can be used**...
361 | >End-users (app developers) will only be able to use plugins which we approve and whitelist.
362 | Typically, this means it meets a set of criteria:
363 | 1.Use-case or functionality is popular
364 | 2.Adds value
365 | 3.Easy to maintain and underlying tools are stable
366 | 4.We have control to modify & publish updates to the package
367 |
368 | #### There are no perfect configurations unless you create your own
369 | I believe that **create-react-app is a good reference.** We just want to extend it to build our own react-scripts.... **Why I have to eject or fork?**
370 |
371 | #### react-app-rewired
372 | See the medium article https://medium.com/@timarney/but-i-dont-wanna-eject-3e3da5826e39
373 | This is a good tool that can just provide a **config.overrides.js** to modify the default configuration of **create-react-app**.
374 | But...
375 | The **config.overrides.js** must be along with your project... It is **not possible to create a custom version of react-scripts that could be shared with multiple projects**.
376 |
377 | #### How about create my own react-scripts based on create-react-app?
378 | This is why I created **create-react-scripts**.
379 | ##### create-react-scripts
380 | This package allow you to easily create your own 'react-scripts' based on 'react-scripts' package under create-react-app.
381 |
382 |
383 | ## Inspiration
384 | - [facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app)
385 | - [timarney/react-app-rewired](https://github.com/timarney/react-app-rewired)
386 | - [jaredpalmer/razzle](https://github.com/jaredpalmer/razzle)
387 | - [react-boilerplate/react-boilerplate](https://github.com/react-boilerplate/react-boilerplate)
388 | - [ctrlplusb/react-universally](https://github.com/ctrlplusb/react-universally)
389 |
390 | # Author
391 | -----------------
392 | - [Raymond Sze](https://github.com/raymondsze)
393 |
394 | # License
395 | -----------------
396 | MIT
397 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/bin/create-react-scripts.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | "use strict";
3 |
4 | require('../index.js')();
5 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/compose.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 |
5 | // pipe rewire
6 | // do not use recursion here to prevent maximum call stack
7 | function pipe(funcs) {
8 | return function pipeRewire(config) {
9 | const args = Array.prototype.slice.call(arguments, 1);
10 | (funcs || []).forEach(func => {
11 | if (func && typeof func === 'function') {
12 | // slice the first argument "config"
13 | config = func.apply(this, [config].concat(args));
14 | }
15 | });
16 | return config;
17 | };
18 | }
19 |
20 | // merge scripts and remove the duplicates
21 | // do not use recursion here to prevent maximum call stack
22 | function mergeScripts(crsScripts) {
23 | const scripts = {
24 | build: path.join(__dirname, 'scripts/build.js'),
25 | start: path.join(__dirname, 'scripts/start.js'),
26 | test: path.join(__dirname, 'scripts/test.js'),
27 | };
28 | crsScripts.forEach(scriptSet => {
29 | Object.assign(scripts, scriptSet || {});
30 | });
31 | return scripts;
32 | }
33 |
34 | // this function is used to compose multiple configs into one config
35 | function compose(...args) {
36 | // convert pipe to compose by reverse the array
37 | const crsConfigs = args.slice(0).reverse();
38 | const crsConfig = {
39 | env: pipe(crsConfigs.map(c => c.env)),
40 | paths: pipe(crsConfigs.map(c => c.paths)),
41 | webpack: pipe(crsConfigs.map(c => c.webpack)),
42 | devServer: pipe(crsConfigs.map(c => c.devServer)),
43 | jest: pipe(crsConfigs.map(c => c.jest)),
44 | scripts: mergeScripts(crsConfigs.map(c => c.scripts)),
45 | };
46 | return crsConfig;
47 | };
48 |
49 | module.exports = compose;
50 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 |
6 | const rsEnvPath = 'react-scripts/config/env';
7 | const rsPathsPath = 'react-scripts/config/paths';
8 | const rsWebpackDevPath = 'react-scripts/config/webpack.config.dev';
9 | const rsWebpackProdPath = 'react-scripts/config/webpack.config.prod';
10 | const rsWebpackDevServerPath = 'react-scripts/config/webpackDevServer.config';
11 | const rsJestPath = 'react-scripts/scripts/utils/createJestConfig';
12 |
13 | // This function is used to customize the react-scripts
14 | function createReactScripts(scriptsDir) {
15 | // obtain the crs.config path
16 | // we allow user to use crs.config under app directory instead if scriptsDir is not provided
17 | // in this case, we do not allow customize new scripts and template
18 | const crsConfigPath = path.join(scriptsDir || process.cwd(), 'crs.config.js');
19 | // append args so we can extract the argument after --crs-config
20 | // this is needed as we need to require the config inside script which is run by 'spawn'
21 | const crsConfigArgs = ['--crs-config'];
22 | // if crs-config exists, append to after --crs-config
23 | if (fs.existsSync(crsConfigPath)) {
24 | crsConfigArgs.push(crsConfigPath);
25 | }
26 |
27 | const spawn = require('react-dev-utils/crossSpawn');
28 | const args = process.argv.slice(2);
29 |
30 | // should support customize scripts
31 | let crsConfig = {};
32 | if (fs.existsSync(crsConfigPath)) {
33 | crsConfig = require(crsConfigPath);
34 | }
35 |
36 | // here eject is removed from the scripts.
37 | // it is not expected user to 'eject' while using this library.
38 | const scriptsMap = {
39 | build: path.join(__dirname, 'scripts/build.js'),
40 | start: path.join(__dirname, 'scripts/start.js'),
41 | test: path.join(__dirname, 'scripts/test.js'),
42 | };
43 |
44 | // obtain all allowed scripts
45 | Object.assign(scriptsMap, (crsConfig || {}).scripts || {});
46 | const scripts = Object.keys(scriptsMap);
47 |
48 | // find the script index
49 | const scriptIndex = args.findIndex(x => scripts.indexOf(x) !== -1);
50 | // obtain the script
51 | const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
52 |
53 | // extract out the node arguments
54 | const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
55 |
56 | // if script is valid
57 | if (scriptsMap[script]) {
58 | // the js file path of script
59 | const scriptPath = scriptsMap[script];
60 | // try to validate the script path is resolvable
61 | if (!fs.existsSync(scriptPath)) {
62 | console.log('Unknown script "' + script + '".');
63 | }
64 | // execute the script like what reac-scripts do
65 | const result = spawn.sync(
66 | 'node',
67 | nodeArgs
68 | .concat(require.resolve(scriptPath))
69 | .concat(args.slice(scriptIndex + 1))
70 | .concat(crsConfigArgs),
71 | { stdio: 'inherit' }
72 | );
73 | if (result.signal) {
74 | if (result.signal === 'SIGKILL') {
75 | console.log(
76 | 'The build failed because the process exited too early. ' +
77 | 'This probably means the system ran out of memory or someone called ' +
78 | '`kill -9` on the process.'
79 | );
80 | } else if (result.signal === 'SIGTERM') {
81 | console.log(
82 | 'The build failed because the process exited too early. ' +
83 | 'Someone might have called `kill` or `killall`, or the system could ' +
84 | 'be shutting down.'
85 | );
86 | }
87 | process.exit(1);
88 | }
89 | process.exit(result.status);
90 | return;
91 | }
92 | console.log('Unknown script "' + script + '".');
93 | console.log('Perhaps you need to update react-scripts?');
94 | console.log(
95 | 'See: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases'
96 | );
97 | }
98 |
99 | // export default createReactScripts
100 | module.exports = createReactScripts;
101 |
102 | // export compose
103 | createReactScripts.compose = require('./compose');
104 | // this function is useful if using custom script that wanna obtain the rewired configuration
105 | createReactScripts.rewire = require('./rewire');
106 | // this function is useful if using custom script that wanna obtain the rewired configuration
107 | createReactScripts.undo = () => {
108 | delete require.cache[require.resolve(rsEnvPath)];
109 | delete require.cache[require.resolve(rsPathsPath)];
110 | delete require.cache[require.resolve(rsWebpackDevPath)];
111 | delete require.cache[require.resolve(rsWebpackProdPath)];
112 | delete require.cache[require.resolve(rsWebpackDevServerPath)];
113 | delete require.cache[require.resolve(rsJestPath)];
114 | };
115 | // this function is useful if using custom script that wanna delegate to other scripts
116 | createReactScripts.runScript = (scriptPath, skipRewire) => {
117 | process.env.CRS_SKIP_REWIRE = skipRewire || false;
118 | require(scriptPath);
119 | };
120 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-react-scripts",
3 | "version": "0.1.6",
4 | "author": "Sze Ka Wai Raymond",
5 | "description": "Easily extend the react-scripts to your own version of react-scripts",
6 | "license": "MIT",
7 | "repository": "raymondsze/create-react-scripts",
8 | "engines": {
9 | "node": ">=6"
10 | },
11 | "files": [
12 | "bin",
13 | "scripts",
14 | "index.js",
15 | "rewire.js",
16 | "compose.js"
17 | ],
18 | "bugs": {
19 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
20 | },
21 | "main": "index.js",
22 | "bin": {
23 | "create-react-scripts": "./bin/create-react-scripts.js"
24 | },
25 | "dependencies": {
26 | "react-dev-utils": "^4.0.1"
27 | },
28 | "peerDependencies": {
29 | "react-scripts": "^1.0.14"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/rewire.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const rsEnvPath = 'react-scripts/config/env';
4 | const rsPathsPath = 'react-scripts/config/paths';
5 | const rsWebpackDevPath = 'react-scripts/config/webpack.config.dev';
6 | const rsWebpackProdPath = 'react-scripts/config/webpack.config.prod';
7 | const rsWebpackDevServerPath = 'react-scripts/config/webpackDevServer.config';
8 | const rsJestPath = 'react-scripts/scripts/utils/createJestConfig';
9 |
10 | const fs = require('fs');
11 | const chalk = require('chalk');
12 | const compose = require('./compose');
13 |
14 | function rewire() {
15 | // obtain the arguments passed into script
16 | const args = process.argv.slice(2);
17 | // @see index.js --crs-config is automatically appended into the script arguments
18 | const crsIndex = args.findIndex(x => x === '--crs-config');
19 | const script = crsIndex === -1 ? args[0] : args[crsIndex];
20 |
21 | // obtain the script arguments (remove the arguments of --crs-config)
22 | const scriptArgs = crsIndex >= 0 ? args.slice(0, crsIndex) : [];
23 | // the crs-config arguments
24 | const crsConfigArgs = crsIndex >= 0 ? args.slice(crsIndex + 1, args.length) : [];
25 | // the first one should be the config path
26 |
27 | const rewireResult = {};
28 | let crsConfig = compose();
29 | // if the config exists, the crsConfigArgs length should be 1 as the config path is appended
30 | if (crsConfigArgs.length > 0) {
31 | crsConfig = compose(require(crsConfigArgs[0]));
32 | // require the config path
33 | const rewireEnv = crsConfig.env;
34 | const rewirePaths = crsConfig.paths;
35 | const rewireWebpackConfig = crsConfig.webpack;
36 | const rewireWebpackDevServerConfig = crsConfig.devServer;
37 | const rewireJestConfig = crsConfig.jest;
38 |
39 | //////////////////////////////////////////////
40 | // Rewire react-scripts/config/env
41 | const rsGetClientEnvironment = require(rsEnvPath);
42 | function getClientEnvironment() {
43 | const rsEnv = rsGetClientEnvironment.apply(rsGetClientEnvironment, arguments);
44 | return rewireEnv.apply(rewireResult, [rsEnv, process.env.NODE_ENV, scriptArgs]);
45 | }
46 | // we do preseve the function name
47 | Object.defineProperty(getClientEnvironment, "name", { value: rsGetClientEnvironment.name });
48 | // replace the internal cache
49 | rewireResult.env = getClientEnvironment;
50 | require.cache[require.resolve(rsEnvPath)].exports = rewireResult.env;
51 | //////////////////////////////////////////////
52 |
53 |
54 | //////////////////////////////////////////////
55 | // Rewire react-scripts/config/paths
56 | const rsPaths = require(rsPathsPath);
57 | // replace the internal cache
58 | rewireResult.paths = rewirePaths.apply(rewireResult, [rsPaths, process.env.NODE_ENV, scriptArgs]);
59 | require.cache[require.resolve(rsPathsPath)].exports = rewireResult.paths
60 | //////////////////////////////////////////////
61 |
62 | //////////////////////////////////////////////
63 | // Rewire react-scripts/config/webpack.config.dev.js
64 | if (process.env.NODE_ENV === 'development') {
65 | const rsWebpackDev = require(rsWebpackDevPath);
66 | // replace the internal cache
67 | rewireResult.webpack = rewireWebpackConfig.apply(rewireResult, [rsWebpackDev, process.env.NODE_ENV, scriptArgs]);
68 | require.cache[require.resolve(rsWebpackDevPath)].exports = rewireResult.webpack;
69 | }
70 | //////////////////////////////////////////////
71 |
72 | //////////////////////////////////////////////
73 | // Rewire react-scripts/config/webpack.config.dev.js
74 | if (process.env.NODE_ENV === 'production') {
75 | const rsWebpackProd = require(rsWebpackProdPath);
76 | // replace the internal cache
77 | rewireResult.webpack = rewireWebpackConfig.apply(rewireResult, [rsWebpackProd, process.env.NODE_ENV, scriptArgs]);
78 | require.cache[require.resolve(rsWebpackProdPath)].exports = rewireResult.webpack;
79 | }
80 | //////////////////////////////////////////////
81 |
82 | //////////////////////////////////////////////
83 | // Rewire react-scripts/config/webpackDevServer.config.js
84 | if (process.env.NODE_ENV === 'development') {
85 | const rsGetWebpackDevServerConfig = require(rsWebpackDevServerPath);
86 | function getWebpackDevServerConfig() {
87 | const rsWebpackDevConfig = rsGetWebpackDevServerConfig.apply(rsGetWebpackDevServerConfig, arguments);
88 | return rewireWebpackDevServerConfig.apply(rewireResult, [rsWebpackDevConfig, process.env.NODE_ENV, scriptArgs]);
89 | }
90 | // we do preseve the function name
91 | Object.defineProperty(getWebpackDevServerConfig, "name", { value: rsGetWebpackDevServerConfig.name });
92 | // replace the internal cache
93 | rewireResult.devServer = getWebpackDevServerConfig;
94 | require.cache[require.resolve(rsWebpackDevServerPath)].exports = getWebpackDevServerConfig;
95 | }
96 | //////////////////////////////////////////////
97 |
98 | //////////////////////////////////////////////
99 | // Rewire react-scripts/scripts/util/createJestConfig.js
100 | if (process.env.NODE_ENV === 'test') {
101 | const rsCreateJestConfig = require(rsJestPath);
102 | function createJestConfig() {
103 | const jestConfig = rsCreateJestConfig.apply(rsCreateJestConfig, arguments);
104 | return rewireJestConfig.apply(rewireResult, [jestConfig, process.env.NODE_ENV, scriptArgs]);
105 | }
106 | // we do preseve the function name
107 | Object.defineProperty(createJestConfig, "name", { value: rsCreateJestConfig.name });
108 | // replace the internal cache
109 | rewireResult.jest = createJestConfig;
110 | require.cache[require.resolve(rsJestPath)].exports = rewireResult.jest;
111 | }
112 | rewireResult.__config = crsConfig;
113 | } else {
114 | rewireResult.env = require(rsEnvPath);
115 | rewireResult.paths = require(rsPathsPath);
116 | if (process.env.NODE_ENV === 'development') {
117 | rewireResult.webpack = require(rsWebpackDevPath);
118 | }
119 | if (process.env.NODE_ENV === 'production') {
120 | rewireResult.webpack = require(rsWebpackProdPath);
121 | }
122 | rewireResult.devServer = require(rsWebpackDevServerPath);
123 | if (process.env.NODE_ENV === 'test') {
124 | rewireResult.jest = require(rsJestPath);
125 | }
126 | }
127 | rewireResult.scripts = crsConfig.scripts;
128 | return rewireResult;
129 | }
130 |
131 | module.exports = rewire;
132 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/scripts/build.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'production';
5 | process.env.NODE_ENV = 'production';
6 |
7 | // Makes the script crash on unhandled rejections instead of silently
8 | // ignoring them. In the future, promise rejections that are not handled will
9 | // terminate the Node.js process with a non-zero exit code.
10 | process.on('unhandledRejection', err => {
11 | throw err;
12 | });
13 |
14 | if (!process.env.CRS_SKIP_REWIRE) require('../rewire')();
15 |
16 | // Remove additional crs-config arguments
17 | const crsIndex = process.argv.findIndex(x => x === '--crs-config');
18 | const scriptArgs = crsIndex >= 0 ? process.argv.slice(0, crsIndex) : [];
19 | process.argv = scriptArgs;
20 |
21 | require('react-scripts/scripts/build');
22 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/scripts/start.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'development';
5 | process.env.NODE_ENV = 'development';
6 |
7 | // Makes the script crash on unhandled rejections instead of silently
8 | // ignoring them. In the future, promise rejections that are not handled will
9 | // terminate the Node.js process with a non-zero exit code.
10 | process.on('unhandledRejection', err => {
11 | throw err;
12 | });
13 |
14 | if (!process.env.CRS_SKIP_REWIRE) require('../rewire')();
15 |
16 | // Remove additional crs-config arguments
17 | const crsIndex = process.argv.findIndex(x => x === '--crs-config');
18 | const scriptArgs = crsIndex >= 0 ? process.argv.slice(0, crsIndex) : [];
19 | process.argv = scriptArgs;
20 |
21 | require('react-scripts/scripts/start');
22 |
--------------------------------------------------------------------------------
/packages/create-react-scripts/scripts/test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'test';
5 | process.env.NODE_ENV = 'test';
6 |
7 | // Makes the script crash on unhandled rejections instead of silently
8 | // ignoring them. In the future, promise rejections that are not handled will
9 | // terminate the Node.js process with a non-zero exit code.
10 | process.on('unhandledRejection', err => {
11 | throw err;
12 | });
13 |
14 | if (!process.env.CRS_SKIP_REWIRE) require('../rewire')();
15 |
16 | // Remove additional crs-config arguments
17 | const crsIndex = process.argv.findIndex(x => x === '--crs-config');
18 | const scriptArgs = crsIndex >= 0 ? process.argv.slice(0, crsIndex) : [];
19 | process.argv = scriptArgs;
20 |
21 | require('react-scripts/scripts/test');
22 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/README.md:
--------------------------------------------------------------------------------
1 | # Universal React App
2 | -----------------
3 | This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
4 | The **react-scripts** is customized using [create-react-scripts](https://github.com/raymondsze/create-react-scripts) along with
5 | - [react-scripts-web](https://github.com/raymondsze/react-scripts-web)
6 | - [create-react-scripts-ssr](https://github.com/raymondsze/create-react-scripts-ssr)
7 |
8 | This is an example demonstrate how to do a minimal Universal React App.
9 |
10 | # Author
11 | -----------------
12 | - [Raymond Sze](https://github.com/raymondsze)
13 |
14 | # License
15 | -----------------
16 | MIT
--------------------------------------------------------------------------------
/packages/example-universal-react-app/crs.config.js:
--------------------------------------------------------------------------------
1 | const { compose } = require('create-react-scripts');
2 |
3 | module.exports = compose(
4 | require('create-react-scripts-ssr')(),
5 | require('react-scripts-web')
6 | );
7 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example-universal-react-app",
3 | "version": "0.1.10",
4 | "private": true,
5 | "author": "Sze Ka Wai Raymond",
6 | "description": "Universal react app with create-react-scripts",
7 | "license": "MIT",
8 | "bugs": {
9 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
10 | },
11 | "dependencies": {
12 | "express": "^4.16.1",
13 | "react": "^16.0.0",
14 | "react-dom": "^16.0.0",
15 | "react-scripts": "^1.0.14",
16 | "serve-static": "^1.13.1"
17 | },
18 | "devDependencies": {
19 | "create-react-scripts": "^0.1.6",
20 | "create-react-scripts-ssr": "^0.1.10",
21 | "react-scripts-web": "^0.1.8",
22 | "source-map-support": "0.5.0"
23 | },
24 | "scripts": {
25 | "start": "create-react-scripts start",
26 | "start:prod": "node ./build/server",
27 | "build": "create-react-scripts build:server",
28 | "test": "create-react-scripts test --env=jsdom"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raymondsze/create-react-scripts/14c0b8bcf7dcf69bd7c6fa394a5d27f3b25f2ad6/packages/example-universal-react-app/public/favicon.ico
--------------------------------------------------------------------------------
/packages/example-universal-react-app/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/public/offline.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/public/workbox-sw.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raymondsze/create-react-scripts/14c0b8bcf7dcf69bd7c6fa394a5d27f3b25f2ad6/packages/example-universal-react-app/public/workbox-sw.js
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-intro {
18 | font-size: large;
19 | }
20 |
21 | @keyframes App-logo-spin {
22 | from { transform: rotate(0deg); }
23 | to { transform: rotate(360deg); }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { compose, setDisplayName } from 'recompose';
3 | import logo from './logo.svg';
4 | import './App.css';
5 |
6 | class App extends Component {
7 | render() {
8 | return (
9 |
10 |
11 |

12 |
Welcome to React
13 |
14 |
15 | To get started, edit src/App.js
and save to reload.
16 |
17 |
18 | );
19 | }
20 | }
21 |
22 | export default App;
23 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | });
9 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import registerServiceWorker from './registerServiceWorker';
6 |
7 | ReactDOM.render(, document.getElementById('root'));
8 | registerServiceWorker();
9 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/registerServiceWorker.js:
--------------------------------------------------------------------------------
1 | // In production, we register a service worker to serve assets from local cache.
2 |
3 | // This lets the app load faster on subsequent visits in production, and gives
4 | // it offline capabilities. However, it also means that developers (and users)
5 | // will only see deployed updates on the "N+1" visit to a page, since previously
6 | // cached resources are updated in the background.
7 |
8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
9 | // This link also includes instructions on opting out of this behavior.
10 |
11 | const isLocalhost = Boolean(
12 | window.location.hostname === 'localhost' ||
13 | // [::1] is the IPv6 localhost address.
14 | window.location.hostname === '[::1]' ||
15 | // 127.0.0.1/8 is considered localhost for IPv4.
16 | window.location.hostname.match(
17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
18 | )
19 | );
20 |
21 | export default function register() {
22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
23 | // The URL constructor is available in all browsers that support SW.
24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
25 | if (publicUrl.origin !== window.location.origin) {
26 | // Our service worker won't work if PUBLIC_URL is on a different origin
27 | // from what our page is served on. This might happen if a CDN is used to
28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
29 | return;
30 | }
31 |
32 | window.addEventListener('load', () => {
33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
34 |
35 | if (!isLocalhost) {
36 | // Is not local host. Just register service worker
37 | registerValidSW(swUrl);
38 | } else {
39 | // This is running on localhost. Lets check if a service worker still exists or not.
40 | checkValidServiceWorker(swUrl);
41 | }
42 | });
43 | }
44 | }
45 |
46 | function registerValidSW(swUrl) {
47 | navigator.serviceWorker
48 | .register(swUrl)
49 | .then(registration => {
50 | registration.onupdatefound = () => {
51 | const installingWorker = registration.installing;
52 | installingWorker.onstatechange = () => {
53 | if (installingWorker.state === 'installed') {
54 | if (navigator.serviceWorker.controller) {
55 | // At this point, the old content will have been purged and
56 | // the fresh content will have been added to the cache.
57 | // It's the perfect time to display a "New content is
58 | // available; please refresh." message in your web app.
59 | console.log('New content is available; please refresh.');
60 | } else {
61 | // At this point, everything has been precached.
62 | // It's the perfect time to display a
63 | // "Content is cached for offline use." message.
64 | console.log('Content is cached for offline use.');
65 | }
66 | }
67 | };
68 | };
69 | })
70 | .catch(error => {
71 | console.error('Error during service worker registration:', error);
72 | });
73 | }
74 |
75 | function checkValidServiceWorker(swUrl) {
76 | // Check if the service worker can be found. If it can't reload the page.
77 | fetch(swUrl)
78 | .then(response => {
79 | // Ensure service worker exists, and that we really are getting a JS file.
80 | if (
81 | response.status === 404 ||
82 | response.headers.get('content-type').indexOf('javascript') === -1
83 | ) {
84 | // No service worker found. Probably a different app. Reload the page.
85 | navigator.serviceWorker.ready.then(registration => {
86 | registration.unregister().then(() => {
87 | window.location.reload();
88 | });
89 | });
90 | } else {
91 | // Service worker found. Proceed as normal.
92 | registerValidSW(swUrl);
93 | }
94 | })
95 | .catch(() => {
96 | console.log(
97 | 'No internet connection found. App is running in offline mode.'
98 | );
99 | });
100 | }
101 |
102 | export function unregister() {
103 | if ('serviceWorker' in navigator) {
104 | navigator.serviceWorker.ready.then(registration => {
105 | registration.unregister();
106 | });
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/packages/example-universal-react-app/src/server.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOMServer from 'react-dom/server';
3 | import express from 'express';
4 | import url from 'url';
5 | import serveStatic from 'serve-static';
6 | import path from 'path';
7 | import fs from 'fs';
8 | import App from './App';
9 |
10 | // For development, the server path is specified in process.env.SERVICE_URL
11 | const HOST = process.env.HOST || '0.0.0.0';
12 | const PORT = process.env.PORT || '5000';
13 | const PROTOCOL = process.env.PROTOCOL || 'http';
14 |
15 | const ASSETS_PATH = path.join(process.cwd(), 'build/assets.json');
16 | const DLL_ASSETS_PATH = path.join(process.cwd(), 'build/dll-assets.json');
17 |
18 | console.log('Waiting client-side bundling...');
19 | while (!fs.existsSync(ASSETS_PATH));
20 |
21 | const assets = {
22 | ...JSON.parse(fs.readFileSync(DLL_ASSETS_PATH)),
23 | ...JSON.parse(fs.readFileSync(ASSETS_PATH)),
24 | };
25 |
26 | const app = express();
27 |
28 | if (process.env.NODE_ENV === 'production') {
29 | app.use(serveStatic(path.join(process.cwd(), 'build/client'), { index: false }));
30 | }
31 |
32 | app.get('*', async (req, res) => {
33 | console.log('SeverSideRendering');
34 | // we don't need to care css or js stuff as already included in data
35 | // but if we want dynamic html page, we could use the assets variable from the above
36 | // render the component to root div
37 | res.set('content-type', 'text/html').send(
38 | ReactDOMServer.renderToStaticMarkup(
39 |
40 |
41 |
42 |
46 |
47 |
48 |
49 | React App
50 | {
51 | Object.values(assets).map(mod => mod.css ? (
52 |
53 | ) : null)
54 | }
55 |
56 |
57 | ),
61 | }}
62 | />
63 | {
64 | Object.values(assets).map(mod => mod.js ? (
65 |
66 | ) : null)
67 | }
68 |
69 |
70 | )
71 | );
72 | });
73 |
74 | app.listen(PORT, () => {
75 | console.log(`Server is Running on ${url.format({ hostname: HOST, port: PORT, protocol: PROTOCOL })}!`);
76 | });
77 |
--------------------------------------------------------------------------------
/packages/react-scripts-web/README.md:
--------------------------------------------------------------------------------
1 | # react-scripts-web
2 | -----------------
3 | This is customized scripts that support the following
4 | - [create-react-scripts-workbox](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-workbox)
5 | - [create-react-scripts-babelrc](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-babelrc)
6 | - [create-react-scripts-eslintrc](https://github.com/raymondsze/create-react-scripts/blob/master/packages/create-react-scripts-eslintrc)
7 |
8 | # Example Usage
9 | -----------------
10 | ##### Modify package.json
11 | Modify `package.json` as below.
12 | ```diff
13 | {
14 | - "start": "react-scripts start",
15 | + "start": "react-scripts-web start",
16 | - "build": "react-scripts build",
17 | + "build": "react-scripts-web build",
18 | - "test": "react-scripts test --env=jsdom",
19 | + "test": "react-scripts-web test --env=jsdom"
20 | }
21 | ```
22 |
23 | # Author
24 | -----------------
25 | - [Raymond Sze](https://github.com/raymondsze)
26 |
27 | # License
28 | -----------------
29 | MIT
--------------------------------------------------------------------------------
/packages/react-scripts-web/bin/react-scripts.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | 'use strict';
3 |
4 | const path = require('path');
5 | require('create-react-scripts')(path.join(__dirname, '..'));
6 |
--------------------------------------------------------------------------------
/packages/react-scripts-web/crs.config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { compose } = require('create-react-scripts');
4 |
5 | module.exports = compose(
6 | require('create-react-scripts-dll')(),
7 | require('create-react-scripts-workbox')(),
8 | require('create-react-scripts-babelrc')(),
9 | require('create-react-scripts-eslintrc')()
10 | );
11 |
--------------------------------------------------------------------------------
/packages/react-scripts-web/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-scripts-web",
3 | "version": "0.1.8",
4 | "author": "Sze Ka Wai Raymond",
5 | "bin": "./bin/react-scripts.js",
6 | "main": "crs.config.js",
7 | "description": "Customized react-scripts for web features using create-react-scripts",
8 | "license": "MIT",
9 | "repository": "raymondsze/create-react-scripts",
10 | "engines": {
11 | "node": ">=6"
12 | },
13 | "files": [
14 | "bin",
15 | "crs.config.js"
16 | ],
17 | "bugs": {
18 | "url": "https://github.com/raymondsze/create-react-scripts/issues"
19 | },
20 | "dependencies": {
21 | "create-react-scripts": "^0.1.6",
22 | "create-react-scripts-babelrc": "^0.1.4",
23 | "create-react-scripts-dll": "^0.1.5",
24 | "create-react-scripts-eslintrc": "^0.1.4",
25 | "create-react-scripts-workbox": "^0.1.4"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | JSONStream@^1.0.4:
6 | version "1.3.1"
7 | resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a"
8 | dependencies:
9 | jsonparse "^1.2.0"
10 | through ">=2.2.7 <3"
11 |
12 | add-stream@^1.0.0:
13 | version "1.0.0"
14 | resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
15 |
16 | align-text@^0.1.1, align-text@^0.1.3:
17 | version "0.1.4"
18 | resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
19 | dependencies:
20 | kind-of "^3.0.2"
21 | longest "^1.0.1"
22 | repeat-string "^1.5.2"
23 |
24 | amdefine@>=0.0.4:
25 | version "1.0.1"
26 | resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
27 |
28 | ansi-escapes@^3.0.0:
29 | version "3.0.0"
30 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
31 |
32 | ansi-regex@^2.0.0:
33 | version "2.1.1"
34 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
35 |
36 | ansi-regex@^3.0.0:
37 | version "3.0.0"
38 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
39 |
40 | ansi-styles@^3.1.0:
41 | version "3.2.0"
42 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
43 | dependencies:
44 | color-convert "^1.9.0"
45 |
46 | aproba@^1.0.3:
47 | version "1.2.0"
48 | resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
49 |
50 | are-we-there-yet@~1.1.2:
51 | version "1.1.4"
52 | resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d"
53 | dependencies:
54 | delegates "^1.0.0"
55 | readable-stream "^2.0.6"
56 |
57 | array-find-index@^1.0.1:
58 | version "1.0.2"
59 | resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
60 |
61 | array-ify@^1.0.0:
62 | version "1.0.0"
63 | resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
64 |
65 | array-union@^1.0.1:
66 | version "1.0.2"
67 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
68 | dependencies:
69 | array-uniq "^1.0.1"
70 |
71 | array-uniq@^1.0.1:
72 | version "1.0.3"
73 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
74 |
75 | async@^1.4.0, async@^1.5.0:
76 | version "1.5.2"
77 | resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
78 |
79 | balanced-match@^1.0.0:
80 | version "1.0.0"
81 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
82 |
83 | brace-expansion@^1.1.7:
84 | version "1.1.8"
85 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
86 | dependencies:
87 | balanced-match "^1.0.0"
88 | concat-map "0.0.1"
89 |
90 | builtin-modules@^1.0.0:
91 | version "1.1.1"
92 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
93 |
94 | byline@^5.0.0:
95 | version "5.0.0"
96 | resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1"
97 |
98 | camelcase-keys@^2.0.0:
99 | version "2.1.0"
100 | resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
101 | dependencies:
102 | camelcase "^2.0.0"
103 | map-obj "^1.0.0"
104 |
105 | camelcase@^1.0.2:
106 | version "1.2.1"
107 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
108 |
109 | camelcase@^2.0.0:
110 | version "2.1.1"
111 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
112 |
113 | camelcase@^4.1.0:
114 | version "4.1.0"
115 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
116 |
117 | center-align@^0.1.1:
118 | version "0.1.3"
119 | resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
120 | dependencies:
121 | align-text "^0.1.3"
122 | lazy-cache "^1.0.3"
123 |
124 | chalk@^2.0.0, chalk@^2.1.0:
125 | version "2.1.0"
126 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
127 | dependencies:
128 | ansi-styles "^3.1.0"
129 | escape-string-regexp "^1.0.5"
130 | supports-color "^4.0.0"
131 |
132 | ci-info@^1.0.0:
133 | version "1.1.1"
134 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a"
135 |
136 | cli-cursor@^2.1.0:
137 | version "2.1.0"
138 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
139 | dependencies:
140 | restore-cursor "^2.0.0"
141 |
142 | cli-width@^2.0.0:
143 | version "2.2.0"
144 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
145 |
146 | cliui@^2.1.0:
147 | version "2.1.0"
148 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
149 | dependencies:
150 | center-align "^0.1.1"
151 | right-align "^0.1.1"
152 | wordwrap "0.0.2"
153 |
154 | cliui@^3.2.0:
155 | version "3.2.0"
156 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
157 | dependencies:
158 | string-width "^1.0.1"
159 | strip-ansi "^3.0.1"
160 | wrap-ansi "^2.0.0"
161 |
162 | clone@^1.0.2:
163 | version "1.0.2"
164 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
165 |
166 | cmd-shim@^2.0.2:
167 | version "2.0.2"
168 | resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb"
169 | dependencies:
170 | graceful-fs "^4.1.2"
171 | mkdirp "~0.5.0"
172 |
173 | code-point-at@^1.0.0:
174 | version "1.1.0"
175 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
176 |
177 | color-convert@^1.9.0:
178 | version "1.9.0"
179 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
180 | dependencies:
181 | color-name "^1.1.1"
182 |
183 | color-name@^1.1.1:
184 | version "1.1.3"
185 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
186 |
187 | columnify@^1.5.4:
188 | version "1.5.4"
189 | resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb"
190 | dependencies:
191 | strip-ansi "^3.0.0"
192 | wcwidth "^1.0.0"
193 |
194 | command-join@^2.0.0:
195 | version "2.0.0"
196 | resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf"
197 |
198 | compare-func@^1.3.1:
199 | version "1.3.2"
200 | resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648"
201 | dependencies:
202 | array-ify "^1.0.0"
203 | dot-prop "^3.0.0"
204 |
205 | concat-map@0.0.1:
206 | version "0.0.1"
207 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
208 |
209 | concat-stream@^1.4.10:
210 | version "1.6.0"
211 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
212 | dependencies:
213 | inherits "^2.0.3"
214 | readable-stream "^2.2.2"
215 | typedarray "^0.0.6"
216 |
217 | console-control-strings@^1.0.0, console-control-strings@~1.1.0:
218 | version "1.1.0"
219 | resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
220 |
221 | conventional-changelog-angular@^1.5.0:
222 | version "1.5.0"
223 | resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.0.tgz#50b2d45008448455fdf67e06ea01972fbd08182a"
224 | dependencies:
225 | compare-func "^1.3.1"
226 | q "^1.4.1"
227 |
228 | conventional-changelog-atom@^0.1.1:
229 | version "0.1.1"
230 | resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f"
231 | dependencies:
232 | q "^1.4.1"
233 |
234 | conventional-changelog-cli@^1.3.2:
235 | version "1.3.3"
236 | resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.3.tgz#ca38f229a27ec14036021b1786a48f5b8d48d7ff"
237 | dependencies:
238 | add-stream "^1.0.0"
239 | conventional-changelog "^1.1.5"
240 | lodash "^4.1.0"
241 | meow "^3.7.0"
242 | tempfile "^1.1.1"
243 |
244 | conventional-changelog-codemirror@^0.2.0:
245 | version "0.2.0"
246 | resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459"
247 | dependencies:
248 | q "^1.4.1"
249 |
250 | conventional-changelog-core@^1.9.1:
251 | version "1.9.1"
252 | resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.1.tgz#ddf767c405850dfc8df31726c80fa1a6a10bdc7b"
253 | dependencies:
254 | conventional-changelog-writer "^2.0.1"
255 | conventional-commits-parser "^2.0.0"
256 | dateformat "^1.0.12"
257 | get-pkg-repo "^1.0.0"
258 | git-raw-commits "^1.2.0"
259 | git-remote-origin-url "^2.0.0"
260 | git-semver-tags "^1.2.1"
261 | lodash "^4.0.0"
262 | normalize-package-data "^2.3.5"
263 | q "^1.4.1"
264 | read-pkg "^1.1.0"
265 | read-pkg-up "^1.0.1"
266 | through2 "^2.0.0"
267 |
268 | conventional-changelog-ember@^0.2.7:
269 | version "0.2.7"
270 | resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.7.tgz#c6aff35976284e7222649f81c62bd96ff3217bd2"
271 | dependencies:
272 | q "^1.4.1"
273 |
274 | conventional-changelog-eslint@^0.2.0:
275 | version "0.2.0"
276 | resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1"
277 | dependencies:
278 | q "^1.4.1"
279 |
280 | conventional-changelog-express@^0.2.0:
281 | version "0.2.0"
282 | resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d"
283 | dependencies:
284 | q "^1.4.1"
285 |
286 | conventional-changelog-jquery@^0.1.0:
287 | version "0.1.0"
288 | resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510"
289 | dependencies:
290 | q "^1.4.1"
291 |
292 | conventional-changelog-jscs@^0.1.0:
293 | version "0.1.0"
294 | resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c"
295 | dependencies:
296 | q "^1.4.1"
297 |
298 | conventional-changelog-jshint@^0.2.0:
299 | version "0.2.0"
300 | resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872"
301 | dependencies:
302 | compare-func "^1.3.1"
303 | q "^1.4.1"
304 |
305 | conventional-changelog-writer@^2.0.1:
306 | version "2.0.1"
307 | resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372"
308 | dependencies:
309 | compare-func "^1.3.1"
310 | conventional-commits-filter "^1.0.0"
311 | dateformat "^1.0.11"
312 | handlebars "^4.0.2"
313 | json-stringify-safe "^5.0.1"
314 | lodash "^4.0.0"
315 | meow "^3.3.0"
316 | semver "^5.0.1"
317 | split "^1.0.0"
318 | through2 "^2.0.0"
319 |
320 | conventional-changelog@^1.1.5:
321 | version "1.1.5"
322 | resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.5.tgz#4c46fb64b2986cab19888d8c4b87ca7c0e431bfd"
323 | dependencies:
324 | conventional-changelog-angular "^1.5.0"
325 | conventional-changelog-atom "^0.1.1"
326 | conventional-changelog-codemirror "^0.2.0"
327 | conventional-changelog-core "^1.9.1"
328 | conventional-changelog-ember "^0.2.7"
329 | conventional-changelog-eslint "^0.2.0"
330 | conventional-changelog-express "^0.2.0"
331 | conventional-changelog-jquery "^0.1.0"
332 | conventional-changelog-jscs "^0.1.0"
333 | conventional-changelog-jshint "^0.2.0"
334 |
335 | conventional-commits-filter@^1.0.0:
336 | version "1.0.0"
337 | resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039"
338 | dependencies:
339 | is-subset "^0.1.1"
340 | modify-values "^1.0.0"
341 |
342 | conventional-commits-parser@^2.0.0:
343 | version "2.0.0"
344 | resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447"
345 | dependencies:
346 | JSONStream "^1.0.4"
347 | is-text-path "^1.0.0"
348 | lodash "^4.2.1"
349 | meow "^3.3.0"
350 | split2 "^2.0.0"
351 | through2 "^2.0.0"
352 | trim-off-newlines "^1.0.0"
353 |
354 | conventional-recommended-bump@^1.0.1:
355 | version "1.0.1"
356 | resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c"
357 | dependencies:
358 | concat-stream "^1.4.10"
359 | conventional-commits-filter "^1.0.0"
360 | conventional-commits-parser "^2.0.0"
361 | git-raw-commits "^1.2.0"
362 | git-semver-tags "^1.2.1"
363 | meow "^3.3.0"
364 | object-assign "^4.0.1"
365 |
366 | core-util-is@~1.0.0:
367 | version "1.0.2"
368 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
369 |
370 | cross-spawn@^5.0.1:
371 | version "5.1.0"
372 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
373 | dependencies:
374 | lru-cache "^4.0.1"
375 | shebang-command "^1.2.0"
376 | which "^1.2.9"
377 |
378 | currently-unhandled@^0.4.1:
379 | version "0.4.1"
380 | resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
381 | dependencies:
382 | array-find-index "^1.0.1"
383 |
384 | dargs@^4.0.1:
385 | version "4.1.0"
386 | resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"
387 | dependencies:
388 | number-is-nan "^1.0.0"
389 |
390 | dateformat@^1.0.11, dateformat@^1.0.12:
391 | version "1.0.12"
392 | resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9"
393 | dependencies:
394 | get-stdin "^4.0.1"
395 | meow "^3.3.0"
396 |
397 | decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
398 | version "1.2.0"
399 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
400 |
401 | dedent@^0.7.0:
402 | version "0.7.0"
403 | resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
404 |
405 | defaults@^1.0.3:
406 | version "1.0.3"
407 | resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
408 | dependencies:
409 | clone "^1.0.2"
410 |
411 | delegates@^1.0.0:
412 | version "1.0.0"
413 | resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
414 |
415 | detect-indent@^5.0.0:
416 | version "5.0.0"
417 | resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
418 |
419 | dot-prop@^3.0.0:
420 | version "3.0.0"
421 | resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177"
422 | dependencies:
423 | is-obj "^1.0.0"
424 |
425 | duplexer@^0.1.1:
426 | version "0.1.1"
427 | resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
428 |
429 | error-ex@^1.2.0, error-ex@^1.3.1:
430 | version "1.3.1"
431 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
432 | dependencies:
433 | is-arrayish "^0.2.1"
434 |
435 | escape-string-regexp@^1.0.5:
436 | version "1.0.5"
437 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
438 |
439 | eslint-config-airbnb-base@^11.3.0:
440 | version "11.3.2"
441 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a"
442 | dependencies:
443 | eslint-restricted-globals "^0.1.1"
444 |
445 | eslint-config-airbnb@^15.1.0:
446 | version "15.1.0"
447 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e"
448 | dependencies:
449 | eslint-config-airbnb-base "^11.3.0"
450 |
451 | eslint-restricted-globals@^0.1.1:
452 | version "0.1.1"
453 | resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7"
454 |
455 | execa@^0.7.0:
456 | version "0.7.0"
457 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
458 | dependencies:
459 | cross-spawn "^5.0.1"
460 | get-stream "^3.0.0"
461 | is-stream "^1.1.0"
462 | npm-run-path "^2.0.0"
463 | p-finally "^1.0.0"
464 | signal-exit "^3.0.0"
465 | strip-eof "^1.0.0"
466 |
467 | execa@^0.8.0:
468 | version "0.8.0"
469 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
470 | dependencies:
471 | cross-spawn "^5.0.1"
472 | get-stream "^3.0.0"
473 | is-stream "^1.1.0"
474 | npm-run-path "^2.0.0"
475 | p-finally "^1.0.0"
476 | signal-exit "^3.0.0"
477 | strip-eof "^1.0.0"
478 |
479 | external-editor@^2.0.4:
480 | version "2.0.5"
481 | resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc"
482 | dependencies:
483 | iconv-lite "^0.4.17"
484 | jschardet "^1.4.2"
485 | tmp "^0.0.33"
486 |
487 | figures@^2.0.0:
488 | version "2.0.0"
489 | resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
490 | dependencies:
491 | escape-string-regexp "^1.0.5"
492 |
493 | find-up@^1.0.0:
494 | version "1.1.2"
495 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
496 | dependencies:
497 | path-exists "^2.0.0"
498 | pinkie-promise "^2.0.0"
499 |
500 | find-up@^2.0.0, find-up@^2.1.0:
501 | version "2.1.0"
502 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
503 | dependencies:
504 | locate-path "^2.0.0"
505 |
506 | fs-extra@^4.0.1:
507 | version "4.0.2"
508 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b"
509 | dependencies:
510 | graceful-fs "^4.1.2"
511 | jsonfile "^4.0.0"
512 | universalify "^0.1.0"
513 |
514 | fs.realpath@^1.0.0:
515 | version "1.0.0"
516 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
517 |
518 | gauge@~2.7.3:
519 | version "2.7.4"
520 | resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
521 | dependencies:
522 | aproba "^1.0.3"
523 | console-control-strings "^1.0.0"
524 | has-unicode "^2.0.0"
525 | object-assign "^4.1.0"
526 | signal-exit "^3.0.0"
527 | string-width "^1.0.1"
528 | strip-ansi "^3.0.1"
529 | wide-align "^1.1.0"
530 |
531 | get-caller-file@^1.0.1:
532 | version "1.0.2"
533 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
534 |
535 | get-pkg-repo@^1.0.0:
536 | version "1.4.0"
537 | resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
538 | dependencies:
539 | hosted-git-info "^2.1.4"
540 | meow "^3.3.0"
541 | normalize-package-data "^2.3.0"
542 | parse-github-repo-url "^1.3.0"
543 | through2 "^2.0.0"
544 |
545 | get-port@^3.2.0:
546 | version "3.2.0"
547 | resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
548 |
549 | get-stdin@^4.0.1:
550 | version "4.0.1"
551 | resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
552 |
553 | get-stream@^3.0.0:
554 | version "3.0.0"
555 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
556 |
557 | git-raw-commits@^1.2.0:
558 | version "1.2.0"
559 | resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c"
560 | dependencies:
561 | dargs "^4.0.1"
562 | lodash.template "^4.0.2"
563 | meow "^3.3.0"
564 | split2 "^2.0.0"
565 | through2 "^2.0.0"
566 |
567 | git-remote-origin-url@^2.0.0:
568 | version "2.0.0"
569 | resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f"
570 | dependencies:
571 | gitconfiglocal "^1.0.0"
572 | pify "^2.3.0"
573 |
574 | git-semver-tags@^1.2.1:
575 | version "1.2.1"
576 | resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490"
577 | dependencies:
578 | meow "^3.3.0"
579 | semver "^5.0.1"
580 |
581 | gitconfiglocal@^1.0.0:
582 | version "1.0.0"
583 | resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b"
584 | dependencies:
585 | ini "^1.3.2"
586 |
587 | glob-parent@^3.1.0:
588 | version "3.1.0"
589 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
590 | dependencies:
591 | is-glob "^3.1.0"
592 | path-dirname "^1.0.0"
593 |
594 | glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
595 | version "7.1.2"
596 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
597 | dependencies:
598 | fs.realpath "^1.0.0"
599 | inflight "^1.0.4"
600 | inherits "2"
601 | minimatch "^3.0.4"
602 | once "^1.3.0"
603 | path-is-absolute "^1.0.0"
604 |
605 | globby@^6.1.0:
606 | version "6.1.0"
607 | resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
608 | dependencies:
609 | array-union "^1.0.1"
610 | glob "^7.0.3"
611 | object-assign "^4.0.1"
612 | pify "^2.0.0"
613 | pinkie-promise "^2.0.0"
614 |
615 | graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
616 | version "4.1.11"
617 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
618 |
619 | handlebars@^4.0.2:
620 | version "4.0.10"
621 | resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f"
622 | dependencies:
623 | async "^1.4.0"
624 | optimist "^0.6.1"
625 | source-map "^0.4.4"
626 | optionalDependencies:
627 | uglify-js "^2.6"
628 |
629 | has-flag@^2.0.0:
630 | version "2.0.0"
631 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
632 |
633 | has-unicode@^2.0.0:
634 | version "2.0.1"
635 | resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
636 |
637 | hosted-git-info@^2.1.4:
638 | version "2.5.0"
639 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
640 |
641 | iconv-lite@^0.4.17:
642 | version "0.4.19"
643 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
644 |
645 | imurmurhash@^0.1.4:
646 | version "0.1.4"
647 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
648 |
649 | indent-string@^2.1.0:
650 | version "2.1.0"
651 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
652 | dependencies:
653 | repeating "^2.0.0"
654 |
655 | inflight@^1.0.4:
656 | version "1.0.6"
657 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
658 | dependencies:
659 | once "^1.3.0"
660 | wrappy "1"
661 |
662 | inherits@2, inherits@^2.0.3, inherits@~2.0.3:
663 | version "2.0.3"
664 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
665 |
666 | ini@^1.3.2:
667 | version "1.3.4"
668 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
669 |
670 | inquirer@^3.2.2:
671 | version "3.3.0"
672 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
673 | dependencies:
674 | ansi-escapes "^3.0.0"
675 | chalk "^2.0.0"
676 | cli-cursor "^2.1.0"
677 | cli-width "^2.0.0"
678 | external-editor "^2.0.4"
679 | figures "^2.0.0"
680 | lodash "^4.3.0"
681 | mute-stream "0.0.7"
682 | run-async "^2.2.0"
683 | rx-lite "^4.0.8"
684 | rx-lite-aggregates "^4.0.8"
685 | string-width "^2.1.0"
686 | strip-ansi "^4.0.0"
687 | through "^2.3.6"
688 |
689 | invert-kv@^1.0.0:
690 | version "1.0.0"
691 | resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
692 |
693 | is-arrayish@^0.2.1:
694 | version "0.2.1"
695 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
696 |
697 | is-buffer@^1.1.5:
698 | version "1.1.5"
699 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
700 |
701 | is-builtin-module@^1.0.0:
702 | version "1.0.0"
703 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
704 | dependencies:
705 | builtin-modules "^1.0.0"
706 |
707 | is-ci@^1.0.10:
708 | version "1.0.10"
709 | resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
710 | dependencies:
711 | ci-info "^1.0.0"
712 |
713 | is-extglob@^2.1.0:
714 | version "2.1.1"
715 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
716 |
717 | is-finite@^1.0.0:
718 | version "1.0.2"
719 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
720 | dependencies:
721 | number-is-nan "^1.0.0"
722 |
723 | is-fullwidth-code-point@^1.0.0:
724 | version "1.0.0"
725 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
726 | dependencies:
727 | number-is-nan "^1.0.0"
728 |
729 | is-fullwidth-code-point@^2.0.0:
730 | version "2.0.0"
731 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
732 |
733 | is-glob@^3.1.0:
734 | version "3.1.0"
735 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
736 | dependencies:
737 | is-extglob "^2.1.0"
738 |
739 | is-obj@^1.0.0:
740 | version "1.0.1"
741 | resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
742 |
743 | is-plain-obj@^1.0.0:
744 | version "1.1.0"
745 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
746 |
747 | is-promise@^2.1.0:
748 | version "2.1.0"
749 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
750 |
751 | is-stream@^1.1.0:
752 | version "1.1.0"
753 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
754 |
755 | is-subset@^0.1.1:
756 | version "0.1.1"
757 | resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6"
758 |
759 | is-text-path@^1.0.0:
760 | version "1.0.1"
761 | resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e"
762 | dependencies:
763 | text-extensions "^1.0.0"
764 |
765 | is-utf8@^0.2.0:
766 | version "0.2.1"
767 | resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
768 |
769 | isarray@~1.0.0:
770 | version "1.0.0"
771 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
772 |
773 | isexe@^2.0.0:
774 | version "2.0.0"
775 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
776 |
777 | jschardet@^1.4.2:
778 | version "1.5.1"
779 | resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9"
780 |
781 | json-stringify-safe@^5.0.1:
782 | version "5.0.1"
783 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
784 |
785 | jsonfile@^4.0.0:
786 | version "4.0.0"
787 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
788 | optionalDependencies:
789 | graceful-fs "^4.1.6"
790 |
791 | jsonparse@^1.2.0:
792 | version "1.3.1"
793 | resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
794 |
795 | kind-of@^3.0.2:
796 | version "3.2.2"
797 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
798 | dependencies:
799 | is-buffer "^1.1.5"
800 |
801 | lazy-cache@^1.0.3:
802 | version "1.0.4"
803 | resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
804 |
805 | lcid@^1.0.0:
806 | version "1.0.0"
807 | resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
808 | dependencies:
809 | invert-kv "^1.0.0"
810 |
811 | lerna@^2.0.0-rc.5:
812 | version "2.2.0"
813 | resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.2.0.tgz#dcf588f8c8feb57d76b34ef72cfedef23f1b5807"
814 | dependencies:
815 | async "^1.5.0"
816 | chalk "^2.1.0"
817 | cmd-shim "^2.0.2"
818 | columnify "^1.5.4"
819 | command-join "^2.0.0"
820 | conventional-changelog-cli "^1.3.2"
821 | conventional-recommended-bump "^1.0.1"
822 | dedent "^0.7.0"
823 | execa "^0.8.0"
824 | find-up "^2.1.0"
825 | fs-extra "^4.0.1"
826 | get-port "^3.2.0"
827 | glob "^7.1.2"
828 | glob-parent "^3.1.0"
829 | globby "^6.1.0"
830 | graceful-fs "^4.1.11"
831 | inquirer "^3.2.2"
832 | is-ci "^1.0.10"
833 | load-json-file "^3.0.0"
834 | lodash "^4.17.4"
835 | minimatch "^3.0.4"
836 | npmlog "^4.1.2"
837 | p-finally "^1.0.0"
838 | path-exists "^3.0.0"
839 | read-cmd-shim "^1.0.1"
840 | read-pkg "^2.0.0"
841 | rimraf "^2.6.1"
842 | safe-buffer "^5.1.1"
843 | semver "^5.4.1"
844 | signal-exit "^3.0.2"
845 | strong-log-transformer "^1.0.6"
846 | temp-write "^3.3.0"
847 | write-file-atomic "^2.3.0"
848 | write-json-file "^2.2.0"
849 | write-pkg "^3.1.0"
850 | yargs "^8.0.2"
851 |
852 | load-json-file@^1.0.0:
853 | version "1.1.0"
854 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
855 | dependencies:
856 | graceful-fs "^4.1.2"
857 | parse-json "^2.2.0"
858 | pify "^2.0.0"
859 | pinkie-promise "^2.0.0"
860 | strip-bom "^2.0.0"
861 |
862 | load-json-file@^2.0.0:
863 | version "2.0.0"
864 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
865 | dependencies:
866 | graceful-fs "^4.1.2"
867 | parse-json "^2.2.0"
868 | pify "^2.0.0"
869 | strip-bom "^3.0.0"
870 |
871 | load-json-file@^3.0.0:
872 | version "3.0.0"
873 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-3.0.0.tgz#7eb3735d983a7ed2262ade4ff769af5369c5c440"
874 | dependencies:
875 | graceful-fs "^4.1.2"
876 | parse-json "^3.0.0"
877 | pify "^2.0.0"
878 | strip-bom "^3.0.0"
879 |
880 | locate-path@^2.0.0:
881 | version "2.0.0"
882 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
883 | dependencies:
884 | p-locate "^2.0.0"
885 | path-exists "^3.0.0"
886 |
887 | lodash._reinterpolate@~3.0.0:
888 | version "3.0.0"
889 | resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
890 |
891 | lodash.template@^4.0.2:
892 | version "4.4.0"
893 | resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
894 | dependencies:
895 | lodash._reinterpolate "~3.0.0"
896 | lodash.templatesettings "^4.0.0"
897 |
898 | lodash.templatesettings@^4.0.0:
899 | version "4.1.0"
900 | resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
901 | dependencies:
902 | lodash._reinterpolate "~3.0.0"
903 |
904 | lodash@^4.0.0, lodash@^4.1.0, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0:
905 | version "4.17.4"
906 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
907 |
908 | longest@^1.0.1:
909 | version "1.0.1"
910 | resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
911 |
912 | loud-rejection@^1.0.0:
913 | version "1.6.0"
914 | resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
915 | dependencies:
916 | currently-unhandled "^0.4.1"
917 | signal-exit "^3.0.0"
918 |
919 | lru-cache@^4.0.1:
920 | version "4.1.1"
921 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
922 | dependencies:
923 | pseudomap "^1.0.2"
924 | yallist "^2.1.2"
925 |
926 | make-dir@^1.0.0:
927 | version "1.0.0"
928 | resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978"
929 | dependencies:
930 | pify "^2.3.0"
931 |
932 | map-obj@^1.0.0, map-obj@^1.0.1:
933 | version "1.0.1"
934 | resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
935 |
936 | mem@^1.1.0:
937 | version "1.1.0"
938 | resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
939 | dependencies:
940 | mimic-fn "^1.0.0"
941 |
942 | meow@^3.3.0, meow@^3.7.0:
943 | version "3.7.0"
944 | resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
945 | dependencies:
946 | camelcase-keys "^2.0.0"
947 | decamelize "^1.1.2"
948 | loud-rejection "^1.0.0"
949 | map-obj "^1.0.1"
950 | minimist "^1.1.3"
951 | normalize-package-data "^2.3.4"
952 | object-assign "^4.0.1"
953 | read-pkg-up "^1.0.1"
954 | redent "^1.0.0"
955 | trim-newlines "^1.0.0"
956 |
957 | mimic-fn@^1.0.0:
958 | version "1.1.0"
959 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
960 |
961 | minimatch@^3.0.4:
962 | version "3.0.4"
963 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
964 | dependencies:
965 | brace-expansion "^1.1.7"
966 |
967 | minimist@0.0.8, minimist@~0.0.1:
968 | version "0.0.8"
969 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
970 |
971 | minimist@^0.1.0:
972 | version "0.1.0"
973 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
974 |
975 | minimist@^1.1.3:
976 | version "1.2.0"
977 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
978 |
979 | mkdirp@~0.5.0:
980 | version "0.5.1"
981 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
982 | dependencies:
983 | minimist "0.0.8"
984 |
985 | modify-values@^1.0.0:
986 | version "1.0.0"
987 | resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2"
988 |
989 | moment@^2.6.0:
990 | version "2.18.1"
991 | resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f"
992 |
993 | mute-stream@0.0.7:
994 | version "0.0.7"
995 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
996 |
997 | normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5:
998 | version "2.4.0"
999 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
1000 | dependencies:
1001 | hosted-git-info "^2.1.4"
1002 | is-builtin-module "^1.0.0"
1003 | semver "2 || 3 || 4 || 5"
1004 | validate-npm-package-license "^3.0.1"
1005 |
1006 | npm-run-path@^2.0.0:
1007 | version "2.0.2"
1008 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
1009 | dependencies:
1010 | path-key "^2.0.0"
1011 |
1012 | npmlog@^4.1.2:
1013 | version "4.1.2"
1014 | resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
1015 | dependencies:
1016 | are-we-there-yet "~1.1.2"
1017 | console-control-strings "~1.1.0"
1018 | gauge "~2.7.3"
1019 | set-blocking "~2.0.0"
1020 |
1021 | number-is-nan@^1.0.0:
1022 | version "1.0.1"
1023 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
1024 |
1025 | object-assign@^4.0.1, object-assign@^4.1.0:
1026 | version "4.1.1"
1027 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
1028 |
1029 | once@^1.3.0:
1030 | version "1.4.0"
1031 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
1032 | dependencies:
1033 | wrappy "1"
1034 |
1035 | onetime@^2.0.0:
1036 | version "2.0.1"
1037 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
1038 | dependencies:
1039 | mimic-fn "^1.0.0"
1040 |
1041 | optimist@^0.6.1:
1042 | version "0.6.1"
1043 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
1044 | dependencies:
1045 | minimist "~0.0.1"
1046 | wordwrap "~0.0.2"
1047 |
1048 | os-locale@^2.0.0:
1049 | version "2.1.0"
1050 | resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
1051 | dependencies:
1052 | execa "^0.7.0"
1053 | lcid "^1.0.0"
1054 | mem "^1.1.0"
1055 |
1056 | os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
1057 | version "1.0.2"
1058 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
1059 |
1060 | p-finally@^1.0.0:
1061 | version "1.0.0"
1062 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
1063 |
1064 | p-limit@^1.1.0:
1065 | version "1.1.0"
1066 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc"
1067 |
1068 | p-locate@^2.0.0:
1069 | version "2.0.0"
1070 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
1071 | dependencies:
1072 | p-limit "^1.1.0"
1073 |
1074 | parse-github-repo-url@^1.3.0:
1075 | version "1.4.1"
1076 | resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
1077 |
1078 | parse-json@^2.2.0:
1079 | version "2.2.0"
1080 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
1081 | dependencies:
1082 | error-ex "^1.2.0"
1083 |
1084 | parse-json@^3.0.0:
1085 | version "3.0.0"
1086 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13"
1087 | dependencies:
1088 | error-ex "^1.3.1"
1089 |
1090 | path-dirname@^1.0.0:
1091 | version "1.0.2"
1092 | resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
1093 |
1094 | path-exists@^2.0.0:
1095 | version "2.1.0"
1096 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
1097 | dependencies:
1098 | pinkie-promise "^2.0.0"
1099 |
1100 | path-exists@^3.0.0:
1101 | version "3.0.0"
1102 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
1103 |
1104 | path-is-absolute@^1.0.0:
1105 | version "1.0.1"
1106 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
1107 |
1108 | path-key@^2.0.0:
1109 | version "2.0.1"
1110 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
1111 |
1112 | path-type@^1.0.0:
1113 | version "1.1.0"
1114 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
1115 | dependencies:
1116 | graceful-fs "^4.1.2"
1117 | pify "^2.0.0"
1118 | pinkie-promise "^2.0.0"
1119 |
1120 | path-type@^2.0.0:
1121 | version "2.0.0"
1122 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
1123 | dependencies:
1124 | pify "^2.0.0"
1125 |
1126 | pify@^2.0.0, pify@^2.2.0, pify@^2.3.0:
1127 | version "2.3.0"
1128 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
1129 |
1130 | pinkie-promise@^2.0.0:
1131 | version "2.0.1"
1132 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
1133 | dependencies:
1134 | pinkie "^2.0.0"
1135 |
1136 | pinkie@^2.0.0:
1137 | version "2.0.4"
1138 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
1139 |
1140 | process-nextick-args@~1.0.6:
1141 | version "1.0.7"
1142 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
1143 |
1144 | pseudomap@^1.0.2:
1145 | version "1.0.2"
1146 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
1147 |
1148 | q@^1.4.1:
1149 | version "1.5.0"
1150 | resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
1151 |
1152 | read-cmd-shim@^1.0.1:
1153 | version "1.0.1"
1154 | resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b"
1155 | dependencies:
1156 | graceful-fs "^4.1.2"
1157 |
1158 | read-pkg-up@^1.0.1:
1159 | version "1.0.1"
1160 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
1161 | dependencies:
1162 | find-up "^1.0.0"
1163 | read-pkg "^1.0.0"
1164 |
1165 | read-pkg-up@^2.0.0:
1166 | version "2.0.0"
1167 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
1168 | dependencies:
1169 | find-up "^2.0.0"
1170 | read-pkg "^2.0.0"
1171 |
1172 | read-pkg@^1.0.0, read-pkg@^1.1.0:
1173 | version "1.1.0"
1174 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
1175 | dependencies:
1176 | load-json-file "^1.0.0"
1177 | normalize-package-data "^2.3.2"
1178 | path-type "^1.0.0"
1179 |
1180 | read-pkg@^2.0.0:
1181 | version "2.0.0"
1182 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
1183 | dependencies:
1184 | load-json-file "^2.0.0"
1185 | normalize-package-data "^2.3.2"
1186 | path-type "^2.0.0"
1187 |
1188 | readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2:
1189 | version "2.3.3"
1190 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
1191 | dependencies:
1192 | core-util-is "~1.0.0"
1193 | inherits "~2.0.3"
1194 | isarray "~1.0.0"
1195 | process-nextick-args "~1.0.6"
1196 | safe-buffer "~5.1.1"
1197 | string_decoder "~1.0.3"
1198 | util-deprecate "~1.0.1"
1199 |
1200 | redent@^1.0.0:
1201 | version "1.0.0"
1202 | resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
1203 | dependencies:
1204 | indent-string "^2.1.0"
1205 | strip-indent "^1.0.1"
1206 |
1207 | repeat-string@^1.5.2:
1208 | version "1.6.1"
1209 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
1210 |
1211 | repeating@^2.0.0:
1212 | version "2.0.1"
1213 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
1214 | dependencies:
1215 | is-finite "^1.0.0"
1216 |
1217 | require-directory@^2.1.1:
1218 | version "2.1.1"
1219 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
1220 |
1221 | require-main-filename@^1.0.1:
1222 | version "1.0.1"
1223 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
1224 |
1225 | restore-cursor@^2.0.0:
1226 | version "2.0.0"
1227 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
1228 | dependencies:
1229 | onetime "^2.0.0"
1230 | signal-exit "^3.0.2"
1231 |
1232 | right-align@^0.1.1:
1233 | version "0.1.3"
1234 | resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
1235 | dependencies:
1236 | align-text "^0.1.1"
1237 |
1238 | rimraf@^2.6.1:
1239 | version "2.6.2"
1240 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
1241 | dependencies:
1242 | glob "^7.0.5"
1243 |
1244 | run-async@^2.2.0:
1245 | version "2.3.0"
1246 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
1247 | dependencies:
1248 | is-promise "^2.1.0"
1249 |
1250 | rx-lite-aggregates@^4.0.8:
1251 | version "4.0.8"
1252 | resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
1253 | dependencies:
1254 | rx-lite "*"
1255 |
1256 | rx-lite@*, rx-lite@^4.0.8:
1257 | version "4.0.8"
1258 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
1259 |
1260 | safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
1261 | version "5.1.1"
1262 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
1263 |
1264 | "semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.4.1:
1265 | version "5.4.1"
1266 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
1267 |
1268 | set-blocking@^2.0.0, set-blocking@~2.0.0:
1269 | version "2.0.0"
1270 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
1271 |
1272 | shebang-command@^1.2.0:
1273 | version "1.2.0"
1274 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
1275 | dependencies:
1276 | shebang-regex "^1.0.0"
1277 |
1278 | shebang-regex@^1.0.0:
1279 | version "1.0.0"
1280 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
1281 |
1282 | signal-exit@^3.0.0, signal-exit@^3.0.2:
1283 | version "3.0.2"
1284 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
1285 |
1286 | sort-keys@^1.1.1:
1287 | version "1.1.2"
1288 | resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
1289 | dependencies:
1290 | is-plain-obj "^1.0.0"
1291 |
1292 | sort-keys@^2.0.0:
1293 | version "2.0.0"
1294 | resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
1295 | dependencies:
1296 | is-plain-obj "^1.0.0"
1297 |
1298 | source-map@^0.4.4:
1299 | version "0.4.4"
1300 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
1301 | dependencies:
1302 | amdefine ">=0.0.4"
1303 |
1304 | source-map@~0.5.1:
1305 | version "0.5.7"
1306 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
1307 |
1308 | spdx-correct@~1.0.0:
1309 | version "1.0.2"
1310 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
1311 | dependencies:
1312 | spdx-license-ids "^1.0.2"
1313 |
1314 | spdx-expression-parse@~1.0.0:
1315 | version "1.0.4"
1316 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
1317 |
1318 | spdx-license-ids@^1.0.2:
1319 | version "1.2.2"
1320 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
1321 |
1322 | split2@^2.0.0:
1323 | version "2.2.0"
1324 | resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493"
1325 | dependencies:
1326 | through2 "^2.0.2"
1327 |
1328 | split@^1.0.0:
1329 | version "1.0.1"
1330 | resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
1331 | dependencies:
1332 | through "2"
1333 |
1334 | string-width@^1.0.1, string-width@^1.0.2:
1335 | version "1.0.2"
1336 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
1337 | dependencies:
1338 | code-point-at "^1.0.0"
1339 | is-fullwidth-code-point "^1.0.0"
1340 | strip-ansi "^3.0.0"
1341 |
1342 | string-width@^2.0.0, string-width@^2.1.0:
1343 | version "2.1.1"
1344 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
1345 | dependencies:
1346 | is-fullwidth-code-point "^2.0.0"
1347 | strip-ansi "^4.0.0"
1348 |
1349 | string_decoder@~1.0.3:
1350 | version "1.0.3"
1351 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
1352 | dependencies:
1353 | safe-buffer "~5.1.0"
1354 |
1355 | strip-ansi@^3.0.0, strip-ansi@^3.0.1:
1356 | version "3.0.1"
1357 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
1358 | dependencies:
1359 | ansi-regex "^2.0.0"
1360 |
1361 | strip-ansi@^4.0.0:
1362 | version "4.0.0"
1363 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
1364 | dependencies:
1365 | ansi-regex "^3.0.0"
1366 |
1367 | strip-bom@^2.0.0:
1368 | version "2.0.0"
1369 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
1370 | dependencies:
1371 | is-utf8 "^0.2.0"
1372 |
1373 | strip-bom@^3.0.0:
1374 | version "3.0.0"
1375 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
1376 |
1377 | strip-eof@^1.0.0:
1378 | version "1.0.0"
1379 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
1380 |
1381 | strip-indent@^1.0.1:
1382 | version "1.0.1"
1383 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
1384 | dependencies:
1385 | get-stdin "^4.0.1"
1386 |
1387 | strong-log-transformer@^1.0.6:
1388 | version "1.0.6"
1389 | resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3"
1390 | dependencies:
1391 | byline "^5.0.0"
1392 | duplexer "^0.1.1"
1393 | minimist "^0.1.0"
1394 | moment "^2.6.0"
1395 | through "^2.3.4"
1396 |
1397 | supports-color@^4.0.0:
1398 | version "4.4.0"
1399 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
1400 | dependencies:
1401 | has-flag "^2.0.0"
1402 |
1403 | temp-dir@^1.0.0:
1404 | version "1.0.0"
1405 | resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
1406 |
1407 | temp-write@^3.3.0:
1408 | version "3.3.0"
1409 | resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.3.0.tgz#c1a96de2b36061342eae81f44ff001aec8f615a9"
1410 | dependencies:
1411 | graceful-fs "^4.1.2"
1412 | is-stream "^1.1.0"
1413 | make-dir "^1.0.0"
1414 | pify "^2.2.0"
1415 | temp-dir "^1.0.0"
1416 | uuid "^3.0.1"
1417 |
1418 | tempfile@^1.1.1:
1419 | version "1.1.1"
1420 | resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
1421 | dependencies:
1422 | os-tmpdir "^1.0.0"
1423 | uuid "^2.0.1"
1424 |
1425 | text-extensions@^1.0.0:
1426 | version "1.6.0"
1427 | resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.6.0.tgz#771561b26022783a45f5b6c2e78ad6e7de9fe322"
1428 |
1429 | through2@^2.0.0, through2@^2.0.2:
1430 | version "2.0.3"
1431 | resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
1432 | dependencies:
1433 | readable-stream "^2.1.5"
1434 | xtend "~4.0.1"
1435 |
1436 | through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6:
1437 | version "2.3.8"
1438 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
1439 |
1440 | tmp@^0.0.33:
1441 | version "0.0.33"
1442 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
1443 | dependencies:
1444 | os-tmpdir "~1.0.2"
1445 |
1446 | trim-newlines@^1.0.0:
1447 | version "1.0.0"
1448 | resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
1449 |
1450 | trim-off-newlines@^1.0.0:
1451 | version "1.0.1"
1452 | resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
1453 |
1454 | typedarray@^0.0.6:
1455 | version "0.0.6"
1456 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1457 |
1458 | uglify-js@^2.6:
1459 | version "2.8.29"
1460 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
1461 | dependencies:
1462 | source-map "~0.5.1"
1463 | yargs "~3.10.0"
1464 | optionalDependencies:
1465 | uglify-to-browserify "~1.0.0"
1466 |
1467 | uglify-to-browserify@~1.0.0:
1468 | version "1.0.2"
1469 | resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
1470 |
1471 | universalify@^0.1.0:
1472 | version "0.1.1"
1473 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
1474 |
1475 | util-deprecate@~1.0.1:
1476 | version "1.0.2"
1477 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
1478 |
1479 | uuid@^2.0.1:
1480 | version "2.0.3"
1481 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
1482 |
1483 | uuid@^3.0.1:
1484 | version "3.1.0"
1485 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
1486 |
1487 | validate-npm-package-license@^3.0.1:
1488 | version "3.0.1"
1489 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
1490 | dependencies:
1491 | spdx-correct "~1.0.0"
1492 | spdx-expression-parse "~1.0.0"
1493 |
1494 | wcwidth@^1.0.0:
1495 | version "1.0.1"
1496 | resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
1497 | dependencies:
1498 | defaults "^1.0.3"
1499 |
1500 | which-module@^2.0.0:
1501 | version "2.0.0"
1502 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
1503 |
1504 | which@^1.2.9:
1505 | version "1.3.0"
1506 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
1507 | dependencies:
1508 | isexe "^2.0.0"
1509 |
1510 | wide-align@^1.1.0:
1511 | version "1.1.2"
1512 | resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
1513 | dependencies:
1514 | string-width "^1.0.2"
1515 |
1516 | window-size@0.1.0:
1517 | version "0.1.0"
1518 | resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
1519 |
1520 | wordwrap@0.0.2:
1521 | version "0.0.2"
1522 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
1523 |
1524 | wordwrap@~0.0.2:
1525 | version "0.0.3"
1526 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
1527 |
1528 | wrap-ansi@^2.0.0:
1529 | version "2.1.0"
1530 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
1531 | dependencies:
1532 | string-width "^1.0.1"
1533 | strip-ansi "^3.0.1"
1534 |
1535 | wrappy@1:
1536 | version "1.0.2"
1537 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
1538 |
1539 | write-file-atomic@^2.0.0, write-file-atomic@^2.3.0:
1540 | version "2.3.0"
1541 | resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
1542 | dependencies:
1543 | graceful-fs "^4.1.11"
1544 | imurmurhash "^0.1.4"
1545 | signal-exit "^3.0.2"
1546 |
1547 | write-json-file@^2.2.0:
1548 | version "2.2.0"
1549 | resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876"
1550 | dependencies:
1551 | detect-indent "^5.0.0"
1552 | graceful-fs "^4.1.2"
1553 | make-dir "^1.0.0"
1554 | pify "^2.0.0"
1555 | sort-keys "^1.1.1"
1556 | write-file-atomic "^2.0.0"
1557 |
1558 | write-pkg@^3.1.0:
1559 | version "3.1.0"
1560 | resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9"
1561 | dependencies:
1562 | sort-keys "^2.0.0"
1563 | write-json-file "^2.2.0"
1564 |
1565 | xtend@~4.0.1:
1566 | version "4.0.1"
1567 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
1568 |
1569 | y18n@^3.2.1:
1570 | version "3.2.1"
1571 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
1572 |
1573 | yallist@^2.1.2:
1574 | version "2.1.2"
1575 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
1576 |
1577 | yargs-parser@^7.0.0:
1578 | version "7.0.0"
1579 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9"
1580 | dependencies:
1581 | camelcase "^4.1.0"
1582 |
1583 | yargs@^8.0.2:
1584 | version "8.0.2"
1585 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
1586 | dependencies:
1587 | camelcase "^4.1.0"
1588 | cliui "^3.2.0"
1589 | decamelize "^1.1.1"
1590 | get-caller-file "^1.0.1"
1591 | os-locale "^2.0.0"
1592 | read-pkg-up "^2.0.0"
1593 | require-directory "^2.1.1"
1594 | require-main-filename "^1.0.1"
1595 | set-blocking "^2.0.0"
1596 | string-width "^2.0.0"
1597 | which-module "^2.0.0"
1598 | y18n "^3.2.1"
1599 | yargs-parser "^7.0.0"
1600 |
1601 | yargs@~3.10.0:
1602 | version "3.10.0"
1603 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
1604 | dependencies:
1605 | camelcase "^1.0.2"
1606 | cliui "^2.1.0"
1607 | decamelize "^1.0.0"
1608 | window-size "0.1.0"
1609 |
--------------------------------------------------------------------------------