Merge pull request #16204 from Bouncey/feat/noGlobalPackages
Feat(dev): No more global npm packages
This commit is contained in:
@ -108,32 +108,32 @@ Do this prior to every time you create a branch for a PR:
|
|||||||
|
|
||||||
1. Make sure you are on the `staging` branch
|
1. Make sure you are on the `staging` branch
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git status
|
$ git status
|
||||||
On branch staging
|
On branch staging
|
||||||
Your branch is up-to-date with 'origin/staging'.
|
Your branch is up-to-date with 'origin/staging'.
|
||||||
```
|
```
|
||||||
If your aren't on `staging`, resolve outstanding files / commits and checkout the `staging` branch
|
If your aren't on `staging`, resolve outstanding files / commits and checkout the `staging` branch
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git checkout staging
|
$ git checkout staging
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Do a pull with rebase against `upstream`
|
2. Do a pull with rebase against `upstream`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git pull --rebase upstream staging
|
$ git pull --rebase upstream staging
|
||||||
```
|
```
|
||||||
|
|
||||||
This will pull down all of the changes to the official staging branch, without making an additional commit in your local repo.
|
This will pull down all of the changes to the official staging branch, without making an additional commit in your local repo.
|
||||||
|
|
||||||
3. (_Optional_) Force push your updated staging branch to your GitHub fork
|
3. (_Optional_) Force push your updated staging branch to your GitHub fork
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git push origin staging --force
|
$ git push origin staging --force
|
||||||
```
|
```
|
||||||
|
|
||||||
This will overwrite the staging branch of your fork.
|
This will overwrite the staging branch of your fork.
|
||||||
|
|
||||||
### Create A Branch
|
### Create A Branch
|
||||||
|
|
||||||
@ -173,8 +173,6 @@ Once you have freeCodeCamp cloned, before you start the application, you first n
|
|||||||
# Install NPM dependencies
|
# Install NPM dependencies
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Install Gulp globally
|
|
||||||
npm install -g gulp
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you need to add the private environment variables (API Keys):
|
Then you need to add the private environment variables (API Keys):
|
||||||
@ -215,26 +213,26 @@ mongod
|
|||||||
npm run only-once
|
npm run only-once
|
||||||
|
|
||||||
# start the application
|
# start the application
|
||||||
gulp
|
npm run develop
|
||||||
```
|
```
|
||||||
|
|
||||||
Now navigate to your browser and open
|
Now navigate to your browser and open
|
||||||
<http://localhost:3000>. If the app loads,
|
<http://localhost:3000>. If the app loads,
|
||||||
congratulations – you're all set. Otherwise, let us know by asking in the [Contributors chat room](https://gitter.im/FreeCodeCamp/Contributors) on Gitter. There also might be an error in the console of your browser or in Bash / Terminal / Command Line that will help identify the problem. If the app launches but you are encountering errors with the UI itself, for example if fonts are not being loaded or if the code editor is not displaying properly, you may try the following:
|
congratulations – you're all set. Otherwise, let us know by asking in the [Contributors chat room](https://gitter.im/FreeCodeCamp/Contributors) on Gitter. There also might be an error in the console of your browser or in Bash / Terminal / Command Line that will help identify the problem. If the app launches but you are encountering errors with the UI itself, for example if fonts are not being loaded or if the code editor is not displaying properly, you may try the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Remove all installed node modules
|
# Remove all installed node modules
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
|
|
||||||
# Reinstall npm packages
|
# Reinstall npm packages
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Seed the database (optional)
|
# Seed the database (optional)
|
||||||
node seed
|
node seed
|
||||||
|
|
||||||
# Re-start the application
|
# Re-start the application
|
||||||
gulp
|
npm run develop
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make Changes
|
### Make Changes
|
||||||
This bit is up to you!
|
This bit is up to you!
|
||||||
|
2098
package-lock.json
generated
2098
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -3,32 +3,33 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"repository": "freecodecamp/freecodecamp",
|
"repository": "freecodecamp/freecodecamp",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"only-once": "npm run create-rev && echo '/****/' && echo 'Seeding Database' && echo '/****/' && node seed && echo '/****/' && echo 'Seeding Completed' && echo '/****/'",
|
|
||||||
"create-rev": "node -e \"var fs = require('fs'); fs.access('./server/rev-manifest.json', function(err) { if (err) { console.log('\\n\\ncreating manifest\\n\\n'); return fs.writeFileSync('server/rev-manifest.json', '{}'); } console.log('\\n\\nrev-manifest present\\n\\n'); });\"",
|
|
||||||
"build": "NODE_ENV=production gulp build -p",
|
"build": "NODE_ENV=production gulp build -p",
|
||||||
"start": "babel-node server/server.js",
|
"commit": "git-cz",
|
||||||
"prestart-production": "gulp build -p",
|
"commitmsg": "validate-commit-msg",
|
||||||
"start-production": "node pm2Start",
|
"cover": "babel-node ./node_modules/.bin/babel-istanbul cover tape common/**/*.test.js",
|
||||||
|
"coveralls": "npm run cover && istanbul-coveralls",
|
||||||
|
"create-rev": "node -e \"var fs = require('fs'); fs.access('./server/rev-manifest.json', function(err) { if (err) { console.log('\\n\\ncreating manifest\\n\\n'); return fs.writeFileSync('server/rev-manifest.json', '{}'); } console.log('\\n\\nrev-manifest present\\n\\n'); });\"",
|
||||||
|
"develop": "gulp",
|
||||||
"lint": "npm run lint-js && npm run lint-json",
|
"lint": "npm run lint-js && npm run lint-json",
|
||||||
"lint-challenges": "jsonlint-cli seed/challenges/**/*.json",
|
"lint-challenges": "jsonlint-cli seed/challenges/**/*.json",
|
||||||
"lint-server": "jsonlint-cli server/*.json",
|
"lint-server": "jsonlint-cli server/*.json",
|
||||||
"lint-resources": "jsonlint-cli server/resources/*.json",
|
"lint-resources": "jsonlint-cli server/resources/*.json",
|
||||||
"lint-utils": "jsonlint-cli server/utils/*.json",
|
"lint-utils": "jsonlint-cli server/utils/*.json",
|
||||||
"prelint-js": "npm run create-rev",
|
|
||||||
"lint-js": "eslint --ext=.js,.jsx gulpfile.js server/ common/ config/ client/",
|
"lint-js": "eslint --ext=.js,.jsx gulpfile.js server/ common/ config/ client/",
|
||||||
"lint-json": "npm run lint-server && npm run lint-challenges && npm run lint-resources && npm run lint-utils",
|
"lint-json": "npm run lint-server && npm run lint-challenges && npm run lint-resources && npm run lint-utils",
|
||||||
|
"only-once": "npm run create-rev && echo '/****/' && echo 'Seeding Database' && echo '/****/' && node seed && echo '/****/' && echo 'Seeding Completed' && echo '/****/'",
|
||||||
|
"prelint-js": "npm run create-rev",
|
||||||
"pretest": "npm run create-rev && npm run lint",
|
"pretest": "npm run create-rev && npm run lint",
|
||||||
|
"prestart-production": "gulp build -p",
|
||||||
"snyk-protect": "snyk protect",
|
"snyk-protect": "snyk protect",
|
||||||
|
"start": "babel-node server/server.js",
|
||||||
|
"start-production": "node pm2Start",
|
||||||
"test-challenges": "babel-node seed/test-challenges.js | tap-spec",
|
"test-challenges": "babel-node seed/test-challenges.js | tap-spec",
|
||||||
|
"test": "npm run test-js && npm run test-challenges",
|
||||||
"test-js": "npm run test-js-client && npm run test-js-common && npm run test-js-server",
|
"test-js": "npm run test-js-client && npm run test-js-common && npm run test-js-server",
|
||||||
"test-js-client": "tape -r babel-register \"client/**/*.test.js\" | tap-spec",
|
"test-js-client": "tape -r babel-register \"client/**/*.test.js\" | tap-spec",
|
||||||
"test-js-common": "tape -r babel-register \"common/**/*.test.js\" | tap-spec",
|
"test-js-common": "tape -r babel-register \"common/**/*.test.js\" | tap-spec",
|
||||||
"test-js-server": "tape -r babel-register \"server/**/*.test.js\" | tap-spec",
|
"test-js-server": "tape -r babel-register \"server/**/*.test.js\" | tap-spec"
|
||||||
"test": "npm run test-js && npm run test-challenges",
|
|
||||||
"cover": "babel-node ./node_modules/.bin/babel-istanbul cover tape common/**/*.test.js",
|
|
||||||
"coveralls": "npm run cover && istanbul-coveralls",
|
|
||||||
"commit": "git-cz",
|
|
||||||
"commitmsg": "validate-commit-msg"
|
|
||||||
},
|
},
|
||||||
"license": "(BSD-3-Clause AND CC-BY-SA-4.0)",
|
"license": "(BSD-3-Clause AND CC-BY-SA-4.0)",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -149,7 +150,7 @@
|
|||||||
"del": "^2.2.0",
|
"del": "^2.2.0",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.10.0",
|
||||||
"eslint-config-freecodecamp": "^1.1.1",
|
"eslint-config-freecodecamp": "^1.1.1",
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.1",
|
||||||
"gulp-babel": "^6.1.1",
|
"gulp-babel": "^6.1.1",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-eslint": "^3.0.1",
|
"gulp-eslint": "^3.0.1",
|
||||||
|
Reference in New Issue
Block a user