Skip to content

Commit f32c16d

Browse files
committed
Adding scripts to automate site publish
1 parent dc053f0 commit f32c16d

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"build:examples": "webpack --progress --colors",
2222
"build:watch": "tsc --outDir lib/ -w",
2323
"prepublish": "yarn build",
24-
"postpublish": "yarn publish:site",
25-
"publish:site": "NODE_ENV=production yarn build:examples && gh-pages -d examples/dist",
24+
"publish:examples": "NODE_ENV=production yarn build:examples && gh-pages -d examples/dist -r $GITHUB_REPO_URL",
25+
"publish:examples:local": "NODE_ENV=production yarn build:examples && gh-pages -d examples/dist",
2626
"start:examples": "webpack-dev-server --open --hot --inline --host 192.168.31.72",
2727
"test": "mocha --require ts-node/register --require enzyme.ts ./test/index.tsx",
2828
"test:watch": "mocha --require ts-node/register --require enzyme.ts --watch-extensions ts,tsx --watch ./test/index.tsx"
@@ -31,6 +31,7 @@
3131
"classnames": "^2.2.6",
3232
"diff": "^3.5.0",
3333
"emotion": "^9.2.10",
34+
"memoize-one": "^4.0.2",
3435
"prop-types": "^15.6.2"
3536
},
3637
"devDependencies": {
@@ -41,6 +42,7 @@
4142
"@types/expect": "^1.20.3",
4243
"@types/memoize-one": "^3.1.1",
4344
"@types/mocha": "^5.2.5",
45+
"@types/node": "^10.12.2",
4446
"@types/react": "^16.4.14",
4547
"@types/react-dom": "^16.0.8",
4648
"@types/webpack": "^4.4.13",
@@ -52,7 +54,6 @@
5254
"file-loader": "^2.0.0",
5355
"gh-pages": "^2.0.1",
5456
"html-webpack-plugin": "^3.2.0",
55-
"memoize-one": "^4.0.2",
5657
"mini-css-extract-plugin": "^0.4.3",
5758
"mocha": "^5.2.0",
5859
"node-sass": "^4.9.3",

publish-examples.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
echo "Publishing examples to Github pages...."
4+
5+
git config --global user.email "[email protected]"
6+
git config --global user.name "Travis CI"
7+
yarn publish:examples

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"downlevelIteration": true,
1111
"lib": ["es2017", "dom"],
1212
"types": [
13-
"mocha"
13+
"mocha",
14+
"node"
1415
]
1516
},
1617
"include": ["./src/*", "enzyme.js"],

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
version "10.11.3"
116116
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.3.tgz#c055536ac8a5e871701aa01914be5731539d01ee"
117117

118+
"@types/node@^10.12.2":
119+
version "10.12.2"
120+
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.2.tgz#d77f9faa027cadad9c912cd47f4f8b07b0fb0864"
121+
118122
"@types/prop-types@*":
119123
version "15.5.6"
120124
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.6.tgz#9c03d3fed70a8d517c191b7734da2879b50ca26c"

0 commit comments

Comments
 (0)