From c1456108993d9b045d5f3863eaaca10dad633bcf Mon Sep 17 00:00:00 2001 From: Maxime Thirouin Date: Fri, 19 Aug 2016 06:33:09 +0200 Subject: [PATCH] Docs: remove $ in front of console command as it seems to be confusing for newbies (make copy/paste difficult) Ref https://github.com/mxstbr/react-boilerplate/issues/757 --- CHANGELOG.md | 22 +++++++++--------- README.md | 2 +- boilerplate/README.md | 6 ++--- docs/content/contributing/index.md | 10 ++++---- docs/content/docs/advanced/good-practices.md | 2 +- docs/content/docs/setup.md | 24 ++++++++++---------- docs/content/docs/usage/gh-pages.md | 6 ++--- npm/postinstall.js | 4 ++-- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0715aa77..171c66193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -469,7 +469,7 @@ boilerplate: for more information. Except new features, no real breaking changes (except that ``react-helmet`` donโ€˜t includes some (may be) required polyfills by default). - You can upgrade by doing ``$ npm install react-helmet@^3.0.0 --save`` + You can upgrade by doing ``npm install react-helmet@^3.0.0 --save`` ([#348](https://github.com/MoOx/phenomic/pull/348)) - Changed: ``PHENOMIC_PATHNAME`` is now ``PHENOMIC_USER_PATHNAME``. But no need to update that in your configuration as it's injected @@ -557,13 +557,13 @@ boilerplate: To be sure, run the following commands. ```sh - $ npm remove --save-dev statinamic - $ npm install --save-dev phenomic@^0.10.2 - $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ + npm remove --save-dev statinamic + npm install --save-dev phenomic@^0.10.2 + find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ -exec sed -i '' 's|Statinamic|Phenomic|g' {} \; - $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ + find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ -exec sed -i '' 's|statinamic|phenomic|g' {} \; - $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ + find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ -exec sed -i '' 's|STATINAMIC|PHENOMIC|g' {} \; ``` @@ -603,18 +603,18 @@ boilerplate: _EDIT: the commands below are not enough, see release **0.10.2**._ ```sh - $ npm remove --save-dev statinamic - $ npm install --save-dev phenomic - $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ + npm remove --save-dev statinamic + npm install --save-dev phenomic + find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ -exec sed -i '' 's|Statinamic|Phenomic|g' {} \; - $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ + find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \ -exec sed -i '' 's|statinamic|phenomic|g' {} \; ``` If you want to double check what files will be changed, just run ```sh - $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) + find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) ``` _This will look for S|statinamic occurence and will replace it by P|phenomic in diff --git a/README.md b/README.md index 7d2c4b798..4c8dbddfd 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ * โ‡„ Pull requests and โ˜… Stars are always welcome. * For bugs and feature requests, please [create an issue](https://github.com/MoOx/phenomic/issues/new). -* Pull requests must be accompanied by passing automated tests (`$ npm test`). +* Pull requests must be accompanied by passing automated tests (`npm test`). ## [CHANGELOG](CHANGELOG.md) diff --git a/boilerplate/README.md b/boilerplate/README.md index 3db097248..6a0d1afd3 100644 --- a/boilerplate/README.md +++ b/boilerplate/README.md @@ -3,17 +3,17 @@ ## Install dependencies ```sh -$ npm install +npm install ``` ## Run development server ```sh -$ npm start +npm start ``` ## Build for production ```sh -$ npm run build +npm run build ``` diff --git a/docs/content/contributing/index.md b/docs/content/contributing/index.md index 74386be05..198120e52 100644 --- a/docs/content/contributing/index.md +++ b/docs/content/contributing/index.md @@ -7,7 +7,7 @@ title: How to contribute to Phenomic To work on the boilerplate, run the following: ```sh -$ npm run boilerplate-start +npm run boilerplate-start ``` Then you can edit files in the `boilerplate` folder. @@ -17,7 +17,7 @@ Then you can edit files in the `boilerplate` folder. To work on the docs, run the following: ```sh -$ npm run docs-start +npm run docs-start ``` Then you can edit files in the `docs` folder. @@ -29,7 +29,7 @@ Then you can edit files in the `docs` folder. - Integration tests are located at the root of the project (`__tests__/*`). _After every modification, please run the entire test suite by using -`$ npm test`._ +`npm test`._ Note that the full test suite can take a few minutes, as it runs unit tests and integration tests (with several builds, including docs and a new project from @@ -45,10 +45,10 @@ Tests will be in ``src/PageContainer/__tests__/*``. To run tests for the ``PageContainer`` component: ```sh -$ ava src/PageContainer/__tests__/* +ava src/PageContainer/__tests__/* ``` -When you think you are done with your update, remember to run `$ npm test`. +When you think you are done with your update, remember to run `npm test`. Anyway, CI will warn us if something goes wrong. --- diff --git a/docs/content/docs/advanced/good-practices.md b/docs/content/docs/advanced/good-practices.md index 842560936..228074996 100644 --- a/docs/content/docs/advanced/good-practices.md +++ b/docs/content/docs/advanced/good-practices.md @@ -55,7 +55,7 @@ If you switch to one of these configurations, you might get some linting errors. To fix this, simply use the following command: ```sh -$ ./node_modules/.bin/eslint --fix . +./node_modules/.bin/eslint --fix . ``` This will fix all the errors that ESLint or its plugins can handle. diff --git a/docs/content/docs/setup.md b/docs/content/docs/setup.md index b2123dc26..1aa6c3f66 100644 --- a/docs/content/docs/setup.md +++ b/docs/content/docs/setup.md @@ -18,14 +18,14 @@ magically open itself in your browser! ### macOS / Linux ```sh -$ DIR=your-website-folder && mkdir $DIR && cd $DIR && mkdir node_modules && \ +DIR=your-website-folder && mkdir $DIR && cd $DIR && mkdir node_modules && \ npm i phenomic && ./node_modules/.bin/phenomic setup && npm i && npm start ``` ### Windows -```sh -> SET DIR=your-website-folder && mkdir %DIR% && cd %DIR% && mkdir node_modules && ^ +```cmd +SET DIR=your-website-folder && mkdir %DIR% && cd %DIR% && mkdir node_modules && ^ npm i phenomic && ./node_modules/.bin/phenomic setup && npm i && npm start ``` @@ -45,8 +45,8 @@ answer below ๐Ÿ˜‰. That's an easy step. ```sh -$ DIR=your-website-folder -$ mkdir $DIR && cd $DIR +DIR=your-website-folder +mkdir $DIR && cd $DIR ``` ### Get Phenomic @@ -60,7 +60,7 @@ different versions of Phenomic. Anyway, Phenomic will probably not work installed globally._ ```sh -$ mkdir node_modules +mkdir node_modules ``` *This command is to be sure that phenomic will be installed in the current @@ -70,7 +70,7 @@ finds a ``node_modules`` or a ``package.json``, up to your HOME folder.* #### Install from npm ```sh -$ npm install phenomic +npm install phenomic ``` * ``--save[-dev]`` is useless because there is no ``package.json`` yet. @@ -83,8 +83,8 @@ $ npm install phenomic To install from git, you will need to get some deps to transpile sources ```sh -$ npm install babel-cli babel-preset-react babel-preset-es2015 babel-preset-stage-1 babel-plugin-flow-react-proptypes -$ npm install https://github.com/MoOx/phenomic.git +npm install babel-cli babel-preset-react babel-preset-es2015 babel-preset-stage-1 babel-plugin-flow-react-proptypes +npm install https://github.com/MoOx/phenomic.git ``` ### Setup boilerplate @@ -92,7 +92,7 @@ $ npm install https://github.com/MoOx/phenomic.git **Notice:** This step will create (and overwrite) any existing ``package.json``. ```sh -$ ./node_modules/.bin/phenomic setup +./node_modules/.bin/phenomic setup ``` **โš ๏ธ If you got errors here, please double check that you have required version of @@ -110,7 +110,7 @@ the configuration options._ When you are done the setup, it's time to get all dependencies. ```sh -$ npm install +npm install ``` npm will install some peer dependencies for you; by doing this we ensure that @@ -122,7 +122,7 @@ Now it's time to... ### Start the engine ```sh -$ npm start +npm start ``` It's that simple. diff --git a/docs/content/docs/usage/gh-pages.md b/docs/content/docs/usage/gh-pages.md index da67316c3..b9b4d0200 100644 --- a/docs/content/docs/usage/gh-pages.md +++ b/docs/content/docs/usage/gh-pages.md @@ -76,7 +76,7 @@ In your `package.json`, add the following items under the `scripts` section: Now run: ```sh -$ npm run deploy +npm run deploy ``` It should be good! @@ -128,8 +128,8 @@ With only `repo` or `public_repo` scopes. *Note: replace `{YOU/YOUR_REPO}` and `{YOUR_TOKEN}`.* ```sh -$ npm i -g travis-encrypt -$ travis-encrypt --add --repo {YOU/YOUR_REPO} GITHUB_TOKEN={YOUR_TOKEN} +npm i -g travis-encrypt +travis-encrypt --add --repo {YOU/YOUR_REPO} GITHUB_TOKEN={YOUR_TOKEN} ``` ## Adjust the deploy script diff --git a/npm/postinstall.js b/npm/postinstall.js index 1533b8347..260e54a64 100644 --- a/npm/postinstall.js +++ b/npm/postinstall.js @@ -55,11 +55,11 @@ stat("lib", function(error, stats1) { "Do you have to required dependencies to install from git?\n" + "Be sure to have installed run this before:" + "\n\n" + - `$ npm install babel-cli ${ pkg.babel.presets }` + + `npm install babel-cli ${ pkg.babel.presets }` + "\n\n" + "Then rebuild phenomic by running: " + "\n\n" + - "$ npm rebuild phenomic" + + "npm rebuild phenomic" + "\n\n" )