Skip to content

Commit

Permalink
docs(documentation-site): fix docs:deploy script, build and deploy do…
Browse files Browse the repository at this point in the history
…cs after publish
  • Loading branch information
patrickarlt committed Dec 22, 2017
1 parent 5a6b047 commit 141ea9b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 26 deletions.
46 changes: 28 additions & 18 deletions package.json
@@ -1,7 +1,8 @@
{
"name": "@esri/arcgis-rest-js",
"version": "1.0.2",
"description": "Compact, modular JavaScript wrappers for the ArcGIS REST API that run in Node.js and modern browsers.",
"description":
"Compact, modular JavaScript wrappers for the ArcGIS REST API that run in Node.js and modern browsers.",
"devDependencies": {
"@types/es6-promise": "0.0.32",
"@types/fetch-mock": "^5.12.2",
Expand All @@ -16,7 +17,8 @@
"concurrently": "^3.5.1",
"cpx": "^1.5.0",
"cross-spawn": "^5.1.0",
"cz-lerna-changelog": "github:patrickarlt/cz-lerna-changelog#3fe7650a2e2e624b1f46e5031c96119759698288",
"cz-lerna-changelog":
"github:patrickarlt/cz-lerna-changelog#3fe7650a2e2e624b1f46e5031c96119759698288",
"date-fns": "^1.29.0",
"fetch-mock": "^5.13.1",
"gh-pages": "^1.1.0",
Expand Down Expand Up @@ -65,42 +67,50 @@
"tslib": "^1.8.1"
},
"lint-staged": {
"*.ts": [
"prettier --write --parser typescript",
"tslint",
"git add"
]
"*.ts": ["prettier --write --parser typescript", "tslint", "git add"]
},
"scripts": {
"build": "lerna run build",
"test": "npm run test:node && npm run test:chrome",
"test:chrome:debug": "karma start --auto-watch --no-single-run --browsers=Chrome",
"test:chrome:debug":
"karma start --auto-watch --no-single-run --browsers=Chrome",
"test:chrome": "karma start --single-run --browsers=Chrome",
"test:node": "jasmine --config=jasmine.json",
"test:node:debug": "inspect jasmine --config=jasmine.json",
"docs:build": "rimraf docs/build && npm run docs:build:acetate && npm run docs:build:sass && npm run docs:build:images",
"docs:build:acetate": "ENV=prod acetate build --config docs/acetate.config.js",
"docs:build:sass": "node-sass --output docs/build/css --source-map true --source-map-contents docs/src/sass",
"docs:build:images": "cpx \"docs/src/**/*.{png,jpg,jpeg,gif,svg,webm,ogg}\" docs/build",
"docs:build":
"rimraf docs/build && npm run docs:typedoc && npm run docs:build:acetate && npm run docs:build:sass && npm run docs:build:images",
"docs:build:acetate":
"ENV=prod acetate build --config docs/acetate.config.js",
"docs:build:sass":
"node-sass --output docs/build/css --source-map true --source-map-contents docs/src/sass",
"docs:build:images":
"cpx \"docs/src/**/*.{png,jpg,jpeg,gif,svg,webm,ogg}\" docs/build",
"docs:deploy": "npm run docs:build && node support/deploy-doc-site.js",
"docs:typedoc": "node docs/build-typedoc.js",
"docs:dev:typedoc": "onchange -v 'packages/*/src/**/*.ts' -- npm run docs:typedoc",
"docs:dev:typedoc":
"onchange -v 'packages/*/src/**/*.ts' -- npm run docs:typedoc",
"predocs:serve": "npm run docs:typedoc",
"docs:serve": "rimraf docs/build && concurrently \"npm run docs:dev:js\" \"npm run docs:dev:images\" \"npm run docs:dev:acetate\" \"npm run docs:dev:sass\" \"npm run docs:dev:typedoc\"",
"docs:dev:images": "cpx \"docs/src/**/*.{png,jpg,jpeg,gif,svg,webm,ogg}\" docs/build -w",
"docs:dev:acetate": "acetate server --log=debug --config docs/acetate.config.js",
"docs:serve":
"rimraf docs/build && concurrently \"npm run docs:dev:js\" \"npm run docs:dev:images\" \"npm run docs:dev:acetate\" \"npm run docs:dev:sass\" \"npm run docs:dev:typedoc\"",
"docs:dev:images":
"cpx \"docs/src/**/*.{png,jpg,jpeg,gif,svg,webm,ogg}\" docs/build -w",
"docs:dev:acetate":
"acetate server --log=debug --config docs/acetate.config.js",
"predocs:dev:sass": "npm run docs:build:sass",
"docs:dev:sass": "node-sass --watch --recursive --output docs/build/css --source-map true --source-map-contents docs/src/sass",
"docs:dev:sass":
"node-sass --watch --recursive --output docs/build/css --source-map true --source-map-contents docs/src/sass",
"docs:dev:js": "cpx \"docs/src/**/{api-search,}.js\" docs/build -w",
"lint": "tslint --project tsconfig.json --type-check",
"lint:fix": "tslint --project tsconfig.json --type-check --fix",
"precommit": "lint-staged",
"bootstrap": "lerna bootstrap",
"postinstall": "npm run bootstrap",
"prerelease:prepare": "git fetch --all && lerna bootstrap && npm test",
"release:prepare": "lerna publish --skip-git --skip-npm --yes && node ./support/changelog.js",
"release:prepare":
"lerna publish --skip-git --skip-npm --yes && node ./support/changelog.js",
"release:review": "git --no-pager diff --word-diff",
"release:publish": "./support/publish.sh",
"postrelease:publish": "npm run docs:deploy",
"c": "git add --all && npm run precommit && git-cz"
},
"repository": {
Expand Down
23 changes: 15 additions & 8 deletions support/deploy-doc-site.js
@@ -1,9 +1,16 @@
const ghpages = require('gh-pages');
const ghpages = require("gh-pages");

ghpages.publish('docs/build', {
branch: 'gh-pages',
repo: 'https://github.com/Esri/arcgis-rest-js.git'
}, function (err) {
if (err)
console.log('uh oh', err);
});
ghpages.publish(
"docs/build",
{
branch: "gh-pages",
repo: "https://github.com/Esri/arcgis-rest-js.git"
},
function(err) {
if (err) {
console.log("uh oh", err);
} else {
console.log("Deployed docs site!");
}
}
);

0 comments on commit 141ea9b

Please sign in to comment.