create-packer 1.7.4 → 1.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +5 -8
- package/package.json +1 -1
- package/template/doc/docusaurus/.gitignore +0 -9
- package/template/doc/docusaurus/README.md +14 -22
- package/template/doc/docusaurus/babel.config.js +3 -0
- package/template/doc/docusaurus/blog/2019-05-28-hola.md +11 -0
- package/template/doc/docusaurus/blog/2019-05-29-hello-world.md +17 -0
- package/template/doc/docusaurus/blog/2019-05-30-welcome.md +13 -0
- package/template/doc/docusaurus/docs/doc1/doc1.mdx +0 -3
- package/template/doc/docusaurus/docs/doc1/doc2.mdx +0 -1
- package/template/doc/docusaurus/docs/doc1/doc3.mdx +0 -1
- package/template/doc/docusaurus/docs/doc1/{mdx.mdx → doc4.mdx} +0 -1
- package/template/doc/docusaurus/docs/doc2/doc1.mdx +0 -4
- package/template/doc/docusaurus/docs/doc2/doc2.mdx +0 -1
- package/template/doc/docusaurus/docs/doc2/doc3.mdx +0 -1
- package/template/doc/docusaurus/docs/doc2/{mdx.mdx → mdx4.mdx} +0 -1
- package/template/doc/docusaurus/docusaurus.config.js +37 -11
- package/template/doc/docusaurus/package.json +29 -25
- package/template/doc/docusaurus/sidebars.js +11 -25
- package/template/doc/docusaurus/src/css/custom.css +12 -12
- package/template/doc/docusaurus/src/pages/{index.js → index.tsx} +0 -0
- package/template/doc/docusaurus/src/pages/styles.module.css +0 -44
- package/template/doc/docusaurus/static/img/docusaurus.png +0 -0
- package/template/doc/docusaurus/static/img/tutorial/docsVersionDropdown.png +0 -0
- package/template/doc/docusaurus/static/img/tutorial/localeDropdown.png +0 -0
- package/template/doc/docusaurus/tsconfig.json +4 -0
- package/template/doc/docusaurus/yarn.lock +3379 -3959
- package/template/doc/docusaurus/.eslintrc.js +0 -57
- package/template/doc/docusaurus/.idea/.gitignore +0 -5
- package/template/doc/docusaurus/.stylelintrc.js +0 -13
- package/template/doc/docusaurus/configs/index.js +0 -10
- package/template/doc/docusaurus/static/img/oss_logo.png +0 -0
package/bin/index.js
CHANGED
|
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const Create_1 = require("./clis/Create");
|
|
5
5
|
const commander_1 = require("commander");
|
|
6
6
|
const create = new Create_1.Create();
|
|
7
|
-
|
|
8
|
-
commander_1.program
|
|
9
|
-
.argument('[dirname]')
|
|
10
|
-
.action(name => {
|
|
11
|
-
dirname = name || '';
|
|
12
|
-
})
|
|
13
|
-
.option('-c', 'Create project.')
|
|
14
|
-
.parse(process.argv);
|
|
7
|
+
commander_1.program.option('-c [dirname]', 'Create project.').parse(process.argv);
|
|
15
8
|
const options = commander_1.program.opts();
|
|
16
9
|
if (options.c) {
|
|
10
|
+
let dirname = '';
|
|
11
|
+
if (options.c !== true) {
|
|
12
|
+
dirname = options.c;
|
|
13
|
+
}
|
|
17
14
|
create.onCreate(dirname);
|
|
18
15
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Dependencies
|
|
2
2
|
/node_modules
|
|
3
|
-
npm-debug.log*
|
|
4
|
-
yarn-error.log*
|
|
5
3
|
|
|
6
4
|
# Production
|
|
7
5
|
/build
|
|
@@ -16,14 +14,7 @@ yarn-error.log*
|
|
|
16
14
|
.env.development.local
|
|
17
15
|
.env.test.local
|
|
18
16
|
.env.production.local
|
|
19
|
-
.vscode/
|
|
20
|
-
.idea/
|
|
21
|
-
.history/
|
|
22
|
-
coverage/
|
|
23
17
|
|
|
24
18
|
npm-debug.log*
|
|
25
19
|
yarn-debug.log*
|
|
26
20
|
yarn-error.log*
|
|
27
|
-
|
|
28
|
-
# ESLint
|
|
29
|
-
.eslintcache
|
|
@@ -1,41 +1,33 @@
|
|
|
1
1
|
# Website
|
|
2
2
|
|
|
3
|
-
This website is built using [Docusaurus 2](https://
|
|
3
|
+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
7
|
+
```console
|
|
8
|
+
yarn install
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Local Development
|
|
12
12
|
|
|
13
|
-
```
|
|
14
|
-
|
|
13
|
+
```console
|
|
14
|
+
yarn start
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
This command starts a local development server and
|
|
17
|
+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Build
|
|
20
20
|
|
|
21
|
-
```
|
|
22
|
-
|
|
21
|
+
```console
|
|
22
|
+
yarn build
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Deployment
|
|
28
28
|
|
|
29
|
-
```
|
|
30
|
-
|
|
29
|
+
```console
|
|
30
|
+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
34
|
-
|
|
35
|
-
### Continuous Integration
|
|
36
|
-
|
|
37
|
-
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
$ yarn ci
|
|
41
|
-
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: hola
|
|
3
|
+
title: Hola
|
|
4
|
+
author: Gao Wei
|
|
5
|
+
author_title: Docusaurus Core Team
|
|
6
|
+
author_url: https://github.com/wgao19
|
|
7
|
+
author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4
|
|
8
|
+
tags: [hola, docusaurus]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: hello-world
|
|
3
|
+
title: Hello
|
|
4
|
+
author: Endilie Yacop Sucipto
|
|
5
|
+
author_title: Maintainer of Docusaurus
|
|
6
|
+
author_url: https://github.com/endiliey
|
|
7
|
+
author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
|
|
8
|
+
tags: [hello, docusaurus]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Welcome to this blog. This blog is created with [**Docusaurus 2**](https://docusaurus.io/).
|
|
12
|
+
|
|
13
|
+
<!--truncate-->
|
|
14
|
+
|
|
15
|
+
This is a test post.
|
|
16
|
+
|
|
17
|
+
A whole bunch of other information.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: welcome
|
|
3
|
+
title: Welcome
|
|
4
|
+
author: Yangshun Tay
|
|
5
|
+
author_title: Front End Engineer @ Facebook
|
|
6
|
+
author_url: https://github.com/yangshun
|
|
7
|
+
author_image_url: https://avatars0.githubusercontent.com/u/1315101?s=400&v=4
|
|
8
|
+
tags: [facebook, hello, docusaurus]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Blog features are powered by the blog plugin. Simply add files to the `blog` directory. It supports tags as well!
|
|
12
|
+
|
|
13
|
+
Delete the whole directory if you don't want the blog features. As simple as that!
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
id: doc1
|
|
3
2
|
title: Style Guide
|
|
4
3
|
sidebar_label: Style Guide
|
|
5
4
|
---
|
|
@@ -153,12 +152,10 @@ Quote break.
|
|
|
153
152
|
<dt>Definition list</dt>
|
|
154
153
|
<dd>Is something people use sometimes.</dd>
|
|
155
154
|
|
|
156
|
-
|
|
157
155
|
<dt>Markdown in HTML</dt>
|
|
158
156
|
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
|
|
159
157
|
</dl>
|
|
160
158
|
|
|
161
|
-
|
|
162
159
|
---
|
|
163
160
|
|
|
164
161
|
## Line Breaks
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
id: doc1
|
|
3
|
-
title: doc2
|
|
4
2
|
sidebar_label: doc2_index
|
|
5
3
|
---
|
|
6
4
|
|
|
@@ -153,12 +151,10 @@ Quote break.
|
|
|
153
151
|
<dt>Definition list</dt>
|
|
154
152
|
<dd>Is something people use sometimes.</dd>
|
|
155
153
|
|
|
156
|
-
|
|
157
154
|
<dt>Markdown in HTML</dt>
|
|
158
155
|
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
|
|
159
156
|
</dl>
|
|
160
157
|
|
|
161
|
-
|
|
162
158
|
---
|
|
163
159
|
|
|
164
160
|
## Line Breaks
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
* @format
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const { docCatalog } = require('./configs')
|
|
10
|
+
const path = require('path')
|
|
12
11
|
|
|
13
12
|
module.exports = {
|
|
14
13
|
title: 'My Site',
|
|
@@ -21,19 +20,25 @@ module.exports = {
|
|
|
21
20
|
projectName: 'docusaurus', // Usually your repo name.
|
|
22
21
|
themeConfig: {
|
|
23
22
|
navbar: {
|
|
24
|
-
title: 'My
|
|
23
|
+
title: 'My Project',
|
|
25
24
|
logo: {
|
|
26
|
-
alt: 'My
|
|
25
|
+
alt: 'My Project Logo',
|
|
27
26
|
src: 'img/logo.svg'
|
|
28
27
|
},
|
|
29
|
-
items:
|
|
30
|
-
|
|
28
|
+
items: [
|
|
29
|
+
{
|
|
30
|
+
type: 'doc',
|
|
31
|
+
docId: 'doc1/doc1',
|
|
32
|
+
label: 'doc1',
|
|
33
|
+
position: 'left'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
31
36
|
type: 'doc',
|
|
32
|
-
docId:
|
|
33
|
-
label:
|
|
37
|
+
docId: 'doc2/doc1',
|
|
38
|
+
label: 'doc2',
|
|
34
39
|
position: 'left'
|
|
35
40
|
}
|
|
36
|
-
|
|
41
|
+
]
|
|
37
42
|
},
|
|
38
43
|
footer: {
|
|
39
44
|
style: 'dark',
|
|
@@ -85,19 +90,40 @@ module.exports = {
|
|
|
85
90
|
],
|
|
86
91
|
logo: {
|
|
87
92
|
alt: 'Facebook Open Source Logo',
|
|
88
|
-
src: 'img/
|
|
93
|
+
src: 'img/logo.svg',
|
|
89
94
|
href: 'https://opensource.facebook.com'
|
|
90
95
|
},
|
|
91
96
|
// Please do not remove the credits, help to publicize Docusaurus :)
|
|
92
97
|
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc. Built with Docusaurus.`
|
|
93
98
|
}
|
|
94
99
|
},
|
|
100
|
+
plugins: [
|
|
101
|
+
[
|
|
102
|
+
require.resolve('@easyops-cn/docusaurus-search-local'),
|
|
103
|
+
{
|
|
104
|
+
// ... Your options.
|
|
105
|
+
// `hashed` is recommended as long-term-cache of index file is possible.
|
|
106
|
+
hashed: true,
|
|
107
|
+
// For Docs using Chinese, The `language` is recommended to set to:
|
|
108
|
+
// ```
|
|
109
|
+
language: ['en', 'zh']
|
|
110
|
+
// ```
|
|
111
|
+
// When applying `zh` in language, please install `nodejieba` in your project.
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
],
|
|
95
115
|
presets: [
|
|
96
116
|
[
|
|
97
117
|
'@docusaurus/preset-classic',
|
|
98
118
|
{
|
|
99
119
|
docs: {
|
|
100
|
-
sidebarPath:
|
|
120
|
+
sidebarPath: path.join(__dirname, './sidebars.js'),
|
|
121
|
+
sidebarItemsGenerator: async function ({
|
|
122
|
+
defaultSidebarItemsGenerator,
|
|
123
|
+
...args
|
|
124
|
+
}) {
|
|
125
|
+
return await defaultSidebarItemsGenerator(args)
|
|
126
|
+
}
|
|
101
127
|
},
|
|
102
128
|
theme: {
|
|
103
129
|
customCss: require.resolve('./src/css/custom.css')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "docusaurus-2",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
@@ -8,36 +8,31 @@
|
|
|
8
8
|
"build": "docusaurus build",
|
|
9
9
|
"swizzle": "docusaurus swizzle",
|
|
10
10
|
"deploy": "docusaurus deploy",
|
|
11
|
+
"clear": "docusaurus clear",
|
|
11
12
|
"serve": "docusaurus serve",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"write-translations": "docusaurus write-translations",
|
|
14
|
+
"write-heading-ids": "docusaurus write-heading-ids",
|
|
15
|
+
"upgrade:docusaurus": "yarn upgrade -L -S @docusaurus",
|
|
16
|
+
"format": "prettier --write \"src/**/*.{ts,js,tsx,jsx,css,scss,less}\" \"./package.json\""
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
19
|
-
"@docusaurus/preset-classic": "2.0.0-beta.
|
|
20
|
-
"@
|
|
19
|
+
"@docusaurus/core": "2.0.0-beta.9",
|
|
20
|
+
"@docusaurus/preset-classic": "2.0.0-beta.9",
|
|
21
|
+
"@docusaurus/theme-live-codeblock": "^2.0.0-beta.9",
|
|
22
|
+
"@easyops-cn/docusaurus-search-local": "^0.19.1",
|
|
23
|
+
"@mdx-js/react": "^1.6.21",
|
|
24
|
+
"@svgr/webpack": "^5.5.0",
|
|
21
25
|
"clsx": "^1.1.1",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
29
|
-
"eslint-config-prettier": "^8.3.0",
|
|
30
|
-
"eslint-plugin-header": "^3.1.1",
|
|
31
|
-
"eslint-plugin-import": "^2.23.4",
|
|
32
|
-
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
33
|
-
"eslint-plugin-react": "^7.24.0",
|
|
34
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
35
|
-
"prettier": "^2.3.1",
|
|
36
|
-
"stylelint": "^13.13.1"
|
|
26
|
+
"file-loader": "^6.2.0",
|
|
27
|
+
"nodejieba": "^2.5.2",
|
|
28
|
+
"prism-react-renderer": "^1.2.1",
|
|
29
|
+
"react": "^17.0.1",
|
|
30
|
+
"react-dom": "^17.0.1",
|
|
31
|
+
"url-loader": "^4.1.1"
|
|
37
32
|
},
|
|
38
33
|
"browserslist": {
|
|
39
34
|
"production": [
|
|
40
|
-
">0.
|
|
35
|
+
">0.5%",
|
|
41
36
|
"not dead",
|
|
42
37
|
"not op_mini all"
|
|
43
38
|
],
|
|
@@ -46,5 +41,14 @@
|
|
|
46
41
|
"last 1 firefox version",
|
|
47
42
|
"last 1 safari version"
|
|
48
43
|
]
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@docusaurus/module-type-aliases": "^2.0.0-beta.9",
|
|
47
|
+
"@tsconfig/docusaurus": "^1.0.4",
|
|
48
|
+
"@types/react": "^17.0.19",
|
|
49
|
+
"@types/react-helmet": "^6.1.2",
|
|
50
|
+
"@types/react-router-dom": "^5.1.8",
|
|
51
|
+
"prettier": "^2.3.2",
|
|
52
|
+
"typescript": "^4.3.5"
|
|
49
53
|
}
|
|
50
|
-
}
|
|
54
|
+
}
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
docCatalog.forEach(dirname => {
|
|
7
|
-
const dirPath = path.join(docRootPath, dirname)
|
|
8
|
-
const files = fs.readdirSync(dirPath).filter(name => {
|
|
9
|
-
return fs.statSync(path.join(dirPath, name)).isFile()
|
|
10
|
-
})
|
|
11
|
-
files.forEach(file => {
|
|
12
|
-
const [filename, suffix] = file.split('.')
|
|
13
|
-
if (!Array.isArray(someSidebar[dirname])) {
|
|
14
|
-
someSidebar[dirname] = []
|
|
1
|
+
module.exports = {
|
|
2
|
+
doc1: [
|
|
3
|
+
{
|
|
4
|
+
type: 'autogenerated',
|
|
5
|
+
dirName: 'doc1'
|
|
15
6
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
someSidebar[dirname].push(id)
|
|
7
|
+
],
|
|
8
|
+
doc2: [
|
|
9
|
+
{
|
|
10
|
+
type: 'autogenerated',
|
|
11
|
+
dirName: 'doc2'
|
|
22
12
|
}
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
...someSidebar
|
|
13
|
+
]
|
|
28
14
|
}
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
|
|
16
16
|
/* You can override the default Infima variables here. */
|
|
17
17
|
:root {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
--ifm-color-primary: #25c2a0;
|
|
19
|
+
--ifm-color-primary-dark: rgb(33, 175, 144);
|
|
20
|
+
--ifm-color-primary-darker: rgb(31, 165, 136);
|
|
21
|
+
--ifm-color-primary-darkest: rgb(26, 136, 112);
|
|
22
|
+
--ifm-color-primary-light: rgb(70, 203, 174);
|
|
23
|
+
--ifm-color-primary-lighter: rgb(102, 212, 189);
|
|
24
|
+
--ifm-color-primary-lightest: rgb(146, 224, 208);
|
|
25
|
+
--ifm-code-font-size: 95%;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.docusaurus-highlight-code-line {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
background-color: rgb(72, 77, 91);
|
|
30
|
+
display: block;
|
|
31
|
+
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
32
|
+
padding: 0 var(--ifm-pre-padding);
|
|
33
33
|
}
|
|
File without changes
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* CSS files with the .module.css suffix will be treated as CSS modules
|
|
12
|
-
* and scoped locally.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
.heroBanner {
|
|
16
|
-
padding: 4rem 0;
|
|
17
|
-
text-align: center;
|
|
18
|
-
position: relative;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@media screen and (max-width: 966px) {
|
|
23
|
-
.heroBanner {
|
|
24
|
-
padding: 2rem;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.buttons {
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.features {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
padding: 2rem 0;
|
|
38
|
-
width: 100%;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.featureImage {
|
|
42
|
-
height: 200px;
|
|
43
|
-
width: 200px;
|
|
44
|
-
}
|
|
Binary file
|
|
Binary file
|