Skip to content

Commit

Permalink
Fix package.json scripts to be cross-platform (#358)
Browse files Browse the repository at this point in the history
* Fix package.json scripts to be cross-platform

* Attempt to wrap sandbox URL with double quote

* Remove ampersand to attach env var to cypress process

* Update RELEASE_PROCESS.md

Co-authored-by: danielcaldas <dcaldas@zendesk.com>
  • Loading branch information
TranquilMarmot and danielcaldas committed Aug 28, 2020
1 parent cd3855b commit 173caf3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
21 changes: 11 additions & 10 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ This is not yet a full automated process, so here are a few steps to get the thi
### Setup (serve a local version to run tests against it)

1. npm run dist:sandbox
2. npm run start
2. npm run start (server should keep running in the background as we're going to run
cypress against it)

### Release steps

1. Update versioning in package.json
1. npm run dist
1. npm run docs
1. Small tweaks on documentation page (quicklinks)
1. Replace current files in docs for the generated ones in gen-docs
1. Generate CHANGELOG.md (github_changelog_generator -u GITHUB_USERNAME)
1. git commit -m "Release x.x.x"
1. Create release x.x.x in github
1. git pull (origin master)
1. npm publish
2. npm run dist
3. npm run docs
4. Small tweaks on documentation page (quicklinks)
5. Replace current files in docs for the generated ones in gen-docs
6. Generate CHANGELOG.md (github_changelog_generator -u GITHUB_USERNAME)
7. git commit -m "Release x.x.x"
8. Create release x.x.x in github
9. git pull (origin master)
10. npm publish
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
"dev": "cross-env NODE_ENV=dev webpack-dev-server --mode=development --content-base sandbox --config webpack.config.js --inline --hot --port 3002",
"dist:rd3g": "rm -rf dist/ && webpack --config webpack.config.dist.js -p --display-modules --optimize-minimize",
"dist:sandbox": "npm run generate:tooltips && webpack --config webpack.config.js -p",
"dist:transpile": "./node_modules/@babel/cli/bin/babel.js -d lib src",
"dist:transpile": "babel -d lib src",
"dist": "npm run check && npm-run-all --parallel dist:*",
"docs:lint": "node_modules/documentation/bin/documentation.js lint src/**/*.js",
"docs:watch": "node_modules/documentation/bin/documentation.js --config documentation.yml build src/**/*.js -f html -o gen-docs --watch",
"docs": "npm run docs:lint && node_modules/documentation/bin/documentation.js --config documentation.yml build src/**/*.js -f html -o gen-docs && node_modules/documentation/bin/documentation.js build src/**/*.js -f md > gen-docs/DOCUMENTATION.md",
"functional:local": "export CYPRESS_SANDBOX_URL=http://localhost:3002 && cypress open",
"functional:remote": "export CYPRESS_SANDBOX_URL=https://danielcaldas.github.io/react-d3-graph/sandbox/index.html && cypress open",
"functional": "export CYPRESS_SANDBOX_URL=http://127.0.0.1:8888 && cypress run",
"generate:tooltips": "./node_modules/.bin/jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js",
"lint:fix": "node_modules/eslint/bin/eslint.js --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"",
"lint:src": "node_modules/eslint/bin/eslint.js --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"",
"lint:test": "node_modules/eslint/bin/eslint.js --config=.eslintrc.test.config.js \"test/**/*.spec.js\"",
"docs:lint": "documentation lint src/**/*.js",
"docs:watch": "documentation --config documentation.yml build src/**/*.js -f html -o gen-docs --watch",
"docs": "npm run docs:lint && documentation --config documentation.yml build src/**/*.js -f html -o gen-docs && documentation build src/**/*.js -f md > gen-docs/DOCUMENTATION.md",
"functional:local": "cross-env CYPRESS_SANDBOX_URL=\"http://localhost:3002\" && cypress open",
"functional:remote": "cross-env CYPRESS_SANDBOX_URL=\"https://danielcaldas.github.io/react-d3-graph/sandbox/index.html\" cypress open",
"functional": "cross-env CYPRESS_SANDBOX_URL=\"http://127.0.0.1:8888\" cypress run",
"generate:tooltips": "jsdoc -X ./src/components/graph/graph.config.js > ./tools/graph-config-jsdoc.json && cd tools && node tooltips-docs-generator.js > ../sandbox/graph-config-tooltips.js",
"lint:fix": "eslint --config=.eslintrc.js --fix \"src/**/*.js*\" \"sandbox/**/*.js*\"",
"lint:src": "eslint --config=.eslintrc.js \"src/**/*.js*\" \"sandbox/**/*.js*\"",
"lint:test": "eslint --config=.eslintrc.test.config.js \"test/**/*.spec.js\"",
"lint": "npm run lint:src && npm run lint:test && npm run docs:lint",
"start": "http-server ./sandbox/ -p 8888 -c-1",
"test:clean": "jest --no-cache --updateSnapshot --verbose --coverage --config jest.config.js",
Expand Down

0 comments on commit 173caf3

Please sign in to comment.