Skip to content

Commit

Permalink
chore(graphin):add github-pages : https://antv.vision/graphin-docs/
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Jan 5, 2021
1 parent c5059af commit 55f05cc
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 31 deletions.
46 changes: 21 additions & 25 deletions .umirc.js
Expand Up @@ -4,6 +4,8 @@ console.log('process.env.NODE_ENV', process.env.NODE_ENV);
export default {
title: 'graphin docs',
mode: 'site',
base: '/graphin-docs/',
publicPath: '/graphin-docs/',
resolve: {
includes: [
'packages/graphin/docs/',
Expand Down Expand Up @@ -48,15 +50,12 @@ export default {
devServerRender: false,
},
exportStatic: {},
externals:
process.env.NODE_ENV === 'development'
? {
react: 'window.React',
'react-dom': 'window.ReactDOM',
antd: 'window.antd',
'@antv/g6': 'window.G6',
}
: {},
externals: {
react: 'window.React',
'react-dom': 'window.ReactDOM',
antd: 'window.antd',
'@antv/g6': 'window.G6',
},
targets: {
chrome: 80,
firefox: false,
Expand All @@ -71,20 +70,17 @@ export default {
['zh-CN', '中文'],
['en-US', 'English'],
],
links: process.env.NODE_ENV === 'development' ? ['https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd.css'] : [],
scripts:
process.env.NODE_ENV === 'development'
? [
'https://gw.alipayobjects.com/os/lib/react/16.13.1/umd/react.development.js',
'https://gw.alipayobjects.com/os/lib/react-dom/16.13.1/umd/react-dom.development.js',
'https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd-with-locales.js',
/** G6 **/
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6.min.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6Layout.worker.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6Layout.worker.js.map',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6.min.js.map',
/** lodash */
'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js',
]
: [],
links: ['https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd.css'],
scripts: [
'https://gw.alipayobjects.com/os/lib/react/16.13.1/umd/react.development.js',
'https://gw.alipayobjects.com/os/lib/react-dom/16.13.1/umd/react-dom.development.js',
'https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd-with-locales.js',
/** G6 **/
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6.min.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6Layout.worker.js',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6Layout.worker.js.map',
'https://gw.alipayobjects.com/os/lib/antv/g6/4.0.3/dist/g6.min.js.map',
/** lodash */
'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js',
],
};
14 changes: 10 additions & 4 deletions package.json
@@ -1,8 +1,10 @@
{
"name": "graphin",
"scripts": {
"docs": "dumi dev",
"build-docs": "dumi build",
"docs:dev": "dumi dev",
"docs:build": "dumi build",
"docs:temp": "gh-pages -d ./dist -r https://github.com/antvis/graphin-docs.git",
"docs:deploy": "npm run docs:build && gh-pages -d ./dist -r https://github.com/antvis/graphin-docs.git",
"start-graphin": "cd packages/graphin && npm run start ",
"start-graphin-components": "cd packages/graphin-components && npm run start",
"site": "cd ./packages/graphin-site && npm run start",
Expand Down Expand Up @@ -32,7 +34,7 @@
"@typescript-eslint/parser": "^2.3.1",
"conventional-changelog": "^3.1.18",
"conventional-changelog-cli": "^2.0.31",
"dumi": "^1.1.0-rc.7",
"dumi": "^1.1.0",
"eslint": "^6.5.1",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.4.0",
Expand All @@ -42,6 +44,7 @@
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^4.1.0",
"generate-changelog": "^1.8.0",
"gh-pages": "^3.1.0",
"husky": "^1.3.1",
"lerna": "^3.15.0",
"lint-staged": "^8.1.0",
Expand All @@ -67,5 +70,8 @@
"repository": {
"type": "git",
"url": "https://github.com/antvis/graphin"
}
},
"sideEffects": [
"*.css"
]
}
4 changes: 3 additions & 1 deletion packages/graphin-components/package.json
Expand Up @@ -12,7 +12,9 @@
},
"author": "",
"license": "MIT",
"sideEffects": false,
"sideEffects": [
"*.css"
],
"devDependencies": {
"@ant-design/icons": "^4.3.0",
"@babel/cli": "^7.6.2",
Expand Down
3 changes: 3 additions & 0 deletions packages/graphin-icons/package.json
Expand Up @@ -8,6 +8,9 @@
"build": "father build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": [
"*.css"
],
"author": "",
"license": "ISC",
"publishConfig": {
Expand Down
4 changes: 3 additions & 1 deletion packages/graphin/package.json
Expand Up @@ -48,7 +48,9 @@
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10"
},
"sideEffects": false,
"sideEffects": [
"*.css"
],
"author": "Ant Financial",
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 55f05cc

Please sign in to comment.