Skip to content
This repository was archived by the owner on Jun 3, 2019. It is now read-only.

Commit 7bac7ed

Browse files
committed
Replaces yarn with npm.
1 parent 3623eae commit 7bac7ed

File tree

9 files changed

+10380
-6545
lines changed

9 files changed

+10380
-6545
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ Redux/MobX, data persistence, modern styling frameworks and all the other bells
4242
4343
## Getting started
4444

45-
```bash
46-
git clone https://github.com/ctrlplusb/react-universally my-project
47-
cd my-project
48-
yarn
49-
yarn run develop
50-
```
51-
52-
Or, if you aren't using [`yarn`](https://yarnpkg.com/):
53-
5445
```bash
5546
git clone https://github.com/ctrlplusb/react-universally my-project
5647
cd my-project

client/polyfills/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Modernizr from 'modernizr';
77
// load a polyfill.
88
if (!Modernizr.picture) {
99
console.log('Client does not support "picture", polyfilling it...');
10-
// If you want to use the below do a `yarn add picturefill --exact` and then
10+
// If you want to use the below do a `npm install picturefill -E -S` and then
1111
// uncomment the lines below:
1212
/*
1313
require('picturefill');

internal/docs/DEPLOY_TO_NOW.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ __Step 2: `cd` into the cloned directory__
1717

1818
__Step 3: Install the project's dependencies__
1919

20-
yarn
21-
22-
Or, if you aren't using [`yarn`](https://yarnpkg.com/):
23-
2420
npm install
2521

2622
__Step 4: Install the awesome [`now`](https://zeit.co/now) CLI globally__
@@ -29,10 +25,6 @@ __Step 4: Install the awesome [`now`](https://zeit.co/now) CLI globally__
2925

3026
__Step 5: Deploy to "now"__
3127

32-
yarn run deploy
33-
34-
Or, if you aren't using [`yarn`](https://yarnpkg.com/):
35-
3628
npm run deploy
3729

3830
That's it. Your clipboard will contain the address of the deployed app. Open your browser, paste, go. These guys are seriously awesome hosts. [Check them out.](https://zeit.co/now)

internal/docs/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ git fetch upstream
5959
# Then merge them into your project
6060
git merge upstream/master
6161

62-
# Deal with the merge conflicts, delete the yarn.lock file and
62+
# Deal with the merge conflicts, delete the package-lock.json file and
6363
# rebuild it, then commit and push.
6464
```
6565

internal/docs/PKG_SCRIPTS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,46 @@
77

88
# Package Scripts
99

10-
## `yarn run analyze:client`
10+
## `npm run analyze:client`
1111

1212
Creates an 'webpack-bundle-analyze' session against the production build of the client bundle.
1313

14-
## `yarn run analyze:server`
14+
## `npm run analyze:server`
1515

1616
Creates an 'webpack-bundle-analyze' session against the production build of the server bundle.
1717

18-
## `yarn run build`
18+
## `npm run build`
1919

2020
Builds the client and server bundles, with the output being optimized.
2121

22-
## `yarn run build:dev`
22+
## `npm run build:dev`
2323

2424
Builds the client and server bundles, with the output including development related code.
2525

26-
## `yarn run clean`
26+
## `npm run clean`
2727

2828
Deletes any build output that would have originated from the other commands.
2929

30-
## `yarn run deploy`
30+
## `npm run deploy`
3131

3232
Deploys your application to [`now`](https://zeit.co/now). If you haven't heard of these guys, please check them out. They allow you to hit the ground running! I've included them within this repo as it requires almost zero configuration to allow your project to be deployed to their servers.
3333

34-
## `yarn run develop`
34+
## `npm run develop`
3535

3636
Starts a development server for both the client and server bundles. We use `react-hot-loader` v3 to power the hot reloading of the client bundle, whilst a filesystem watch is implemented to reload the server bundle when any changes have occurred.
3737

38-
## `yarn run lint`
38+
## `npm run lint`
3939

4040
Executes `eslint` against the project. Alternatively you could look to install the `eslint-loader` and integrate it into the `webpack` bundle process.
4141

42-
## `yarn run start`
42+
## `npm run start`
4343

44-
Executes the server. It expects you to have already built the bundles using the `yarn run build` command.
44+
Executes the server. It expects you to have already built the bundles using the `npm run build` command.
4545

46-
## `yarn run test`
46+
## `npm run test`
4747

4848
Runs the `jest` tests.
4949

50-
## `yarn run test:coverage`
50+
## `npm run test:coverage`
5151

5252
Runs the `jest` tests and generates a coverage report. I recommend you look at [codecov.io](https://codecov.io) to host your coverage reports.

internal/docs/PROJECT_CONFIG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ When a server request is being processed this filtering configuration export wil
5252

5353
## Environment Specific Values
5454

55-
Environment specific values are support via host system environment variables (e.g. `FOO=bar yarn run start`) and/or by providing an "env" file.
55+
Environment specific values are support via host system environment variables (e.g. `FOO=bar npm run start`) and/or by providing an "env" file.
5656

5757
"env" files is an optional feature that is supported by the [`dotenv`](https://github.com/motdotla/dotenv) module. This module allows you to define files containing key/value pairs representing your required environment variables (e.g. `PORT=1337`). To use this feature create an `.env` file within the root of the project (we have provided an example file called `.env_example`, which contains all the environment variables this project currently relies on).
5858

@@ -65,14 +65,14 @@ If you do however have the requirement to create and persist "env" files for mul
6565
In order to target a specific environment configuration file you have to provide a matching `DEPLOYMENT` environment variable. For example:
6666

6767
```bash
68-
yarn run build
69-
DEPLOYMENT=staging yarn run start # This will look for a .env.staging file
68+
npm run build
69+
DEPLOYMENT=staging npm run start # This will look for a .env.staging file
7070
```
7171

7272
> Note: you may be used to using NODE_ENV to distinguish between environment configuration, however, when using the React ecosystem it is highly recommended that you set NODE_ENV=production any time you want an optimised version of React (and other libs). Given this requirement, we instead defer to the use of a "DEPLOYMENT" variable. See [here](https://github.com/facebook/react/issues/6582) for more info on this.
7373
7474
> Note: if an environment specific configuration file exists, it will be used over the more generic `.env` file.
7575
76-
As stated before, the application has been configured to accept a mix-match of sources for the environment variables. i.e. you can provide some/all of the environment variables via a `.env` file, and others via the cli/host (e.g. `FOO=bar yarn run build`). This gives you greater flexibility and grants you the opportunity to control the provision of sensitive values (e.g. db connection string). Please do note that "env" file values will take preference over any values provided by the host/CLI.
76+
As stated before, the application has been configured to accept a mix-match of sources for the environment variables. i.e. you can provide some/all of the environment variables via a `.env` file, and others via the cli/host (e.g. `FOO=bar npm run build`). This gives you greater flexibility and grants you the opportunity to control the provision of sensitive values (e.g. db connection string). Please do note that "env" file values will take preference over any values provided by the host/CLI.
7777

7878
> Note: It is recommended that you bind your environment configuration values to the global `./config/values.js`. See the existing items within as an example.

0 commit comments

Comments
 (0)