Skip to content

Commit 34c037c

Browse files
committed
docs: generate README for packages
1 parent 69381fb commit 34c037c

File tree

9 files changed

+161
-19
lines changed

9 files changed

+161
-19
lines changed

ant/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
# @vue-js-cron/ant
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
22

3-
**Cron editor for Ant Vue**
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
46

5-
[Get Started](https://abichinger.github.io/vue-js-cron/next/guide/getting-started.html#ant)
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@vue-js-cron/core">Core</a> |
9+
<a href="https://www.npmjs.com/package/@vue-js-cron/light">Light</a> |
10+
<a href="https://www.npmjs.com/package/@vue-js-cron/vuetify">Vuetify</a> |
11+
<a href="https://www.npmjs.com/package/@vue-js-cron/element-plus">Element Plus</a> |
12+
<a href="https://www.npmjs.com/package/@vue-js-cron/ant">Ant</a>
13+
</p>
14+
15+
## Usage - Ant
16+
17+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
18+
19+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#ant)
20+
21+
[API - cron-ant](https://abichinger.github.io/vue-js-cron/api/ant.html)
622

723
## Attribution
824

core/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
# Vue.js Cron Core
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
22

3-
**Renderless Vue.js cron editor**
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
46

5-
![Vue.js Cron Core Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/next/assets/cron-light-hero.png)
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@vue-js-cron/core">Core</a> |
9+
<a href="https://www.npmjs.com/package/@vue-js-cron/light">Light</a> |
10+
<a href="https://www.npmjs.com/package/@vue-js-cron/vuetify">Vuetify</a> |
11+
<a href="https://www.npmjs.com/package/@vue-js-cron/element-plus">Element Plus</a> |
12+
<a href="https://www.npmjs.com/package/@vue-js-cron/ant">Ant</a>
13+
</p>
614

7-
[Get Started](https://abichinger.github.io/vue-js-cron/next/guide/getting-started.html#renderless)
15+
## Usage - Core
16+
17+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
18+
19+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#renderless)
20+
21+
[API - cron-core](https://abichinger.github.io/vue-js-cron/api/core.html)
822

923
## Attribution
1024

element-plus/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
# @vue-js-cron/element-plus
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
22

3-
**Cron editor for Element Plus**
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
46

5-
[Get Started](https://abichinger.github.io/vue-js-cron/next/guide/getting-started.html#element-plus)
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@vue-js-cron/core">Core</a> |
9+
<a href="https://www.npmjs.com/package/@vue-js-cron/light">Light</a> |
10+
<a href="https://www.npmjs.com/package/@vue-js-cron/vuetify">Vuetify</a> |
11+
<a href="https://www.npmjs.com/package/@vue-js-cron/element-plus">Element Plus</a> |
12+
<a href="https://www.npmjs.com/package/@vue-js-cron/ant">Ant</a>
13+
</p>
14+
15+
## Usage - Element Plus
16+
17+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
18+
19+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#element-plus)
20+
21+
[API - cron-element-plus](https://abichinger.github.io/vue-js-cron/api/element-plus.html)
622

723
## Attribution
824

light/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
# Vue.js Cron Light
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
22

3-
**lightweight vue.js cron editor**
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
46

5-
![Vue.js Cron Core Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/next/assets/cron-light-hero.png)
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@vue-js-cron/core">Core</a> |
9+
<a href="https://www.npmjs.com/package/@vue-js-cron/light">Light</a> |
10+
<a href="https://www.npmjs.com/package/@vue-js-cron/vuetify">Vuetify</a> |
11+
<a href="https://www.npmjs.com/package/@vue-js-cron/element-plus">Element Plus</a> |
12+
<a href="https://www.npmjs.com/package/@vue-js-cron/ant">Ant</a>
13+
</p>
614

7-
[Get Started](https://abichinger.github.io/vue-js-cron/next/guide/getting-started.html#light)
15+
## Usage - Light
16+
17+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
18+
19+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#light)
20+
21+
[API - cron-light](https://abichinger.github.io/vue-js-cron/api/light.html)
822

923
## Attribution
1024

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"eslint-plugin-vue": "^9.3.0",
5555
"jest": "^26.6.3",
5656
"multi-semantic-release": "^2.11.0",
57+
"nunjucks": "^3.2.3",
5758
"rollup": "^2.38.5",
5859
"rollup-jest": "^1.1.1",
5960
"rollup-plugin-css-only": "^3.1.0",

scripts/gen_readme.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const nunjucks = require('nunjucks')
2+
const fs = require('fs')
3+
4+
const packages = [
5+
{ name: 'Core', dir: 'core', anchor: 'renderless' },
6+
{ name: 'Light', dir: 'light' },
7+
{ name: 'Vuetify', dir: 'vuetify' },
8+
{ name: 'Element Plus', dir: 'element-plus' },
9+
{ name: 'Ant', dir: 'ant' }
10+
]
11+
packages.forEach((p) => {
12+
p.json = readPackageJson(p.dir)
13+
p.anchor = p.anchor || p.dir
14+
})
15+
16+
function readPackageJson (path) {
17+
const content = fs.readFileSync(path + '/package.json')
18+
return JSON.parse(content)
19+
}
20+
21+
for (const entry of packages) {
22+
const rendered = nunjucks.render('./scripts/template/README.md', { entry, packages })
23+
fs.writeFileSync(entry.dir + '/README.md', rendered)
24+
}

scripts/template/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
2+
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
6+
7+
<p align="center">
8+
{%- for p in packages %}
9+
{%- if loop.index != 1 %} | {%- endif %}
10+
<a href="https://www.npmjs.com/package/{{ p.json.name }}">{{p.name}}</a>
11+
{%- endfor %}
12+
</p>
13+
14+
## Usage - {{ entry.name }}
15+
16+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
17+
18+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#{{ entry.anchor }})
19+
20+
[API - cron-{{ entry.dir }}](https://abichinger.github.io/vue-js-cron/api/{{ entry.dir }}.html)
21+
22+
## Attribution
23+
24+
This component is inspired by [react-js-cron](https://github.com/xrutayisire/react-js-cron) and [jqcron](https://github.com/arnapou/jqcron)

vuetify/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
# Vue.js Cron Vuetify
1+
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/main/assets/vue-js-cron-hero.png)
22

3-
**Cron editor for vuetify**
3+
<p align="center">
4+
<em>generate cron expressions using vue.js</em>
5+
</p>
46

5-
![Vue.js Cron Vuetify Hero](https://raw.githubusercontent.com/abichinger/vue-js-cron/next/assets/cron-vuetify-hero.png)
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/@vue-js-cron/core">Core</a> |
9+
<a href="https://www.npmjs.com/package/@vue-js-cron/light">Light</a> |
10+
<a href="https://www.npmjs.com/package/@vue-js-cron/vuetify">Vuetify</a> |
11+
<a href="https://www.npmjs.com/package/@vue-js-cron/element-plus">Element Plus</a> |
12+
<a href="https://www.npmjs.com/package/@vue-js-cron/ant">Ant</a>
13+
</p>
614

7-
[Get Started](https://abichinger.github.io/vue-js-cron/next/guide/getting-started.html#vuetify)
15+
## Usage - Vuetify
16+
17+
[Demo](https://abichinger.github.io/vue-js-cron/demo.html)
18+
19+
[Get Started](https://abichinger.github.io/vue-js-cron/guide/getting-started.html#vuetify)
20+
21+
[API - cron-vuetify](https://abichinger.github.io/vue-js-cron/api/vuetify.html)
822

923
## Attribution
1024

yarn.lock

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,11 @@ JSONStream@^1.0.4:
27312731
jsonparse "^1.2.0"
27322732
through ">=2.2.7 <3"
27332733

2734+
a-sync-waterfall@^1.0.0:
2735+
version "1.0.1"
2736+
resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7"
2737+
integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==
2738+
27342739
abab@^2.0.3, abab@^2.0.5:
27352740
version "2.0.5"
27362741
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
@@ -3092,7 +3097,7 @@ arrify@^1.0.1:
30923097
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
30933098
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
30943099

3095-
asap@^2.0.0:
3100+
asap@^2.0.0, asap@^2.0.3:
30963101
version "2.0.6"
30973102
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
30983103
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
@@ -3880,6 +3885,11 @@ commander@^2.20.0:
38803885
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
38813886
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
38823887

3888+
commander@^5.1.0:
3889+
version "5.1.0"
3890+
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
3891+
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
3892+
38833893
commander@^7.2.0:
38843894
version "7.2.0"
38853895
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
@@ -8529,6 +8539,15 @@ number-is-nan@^1.0.0:
85298539
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
85308540
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
85318541

8542+
nunjucks@^3.2.3:
8543+
version "3.2.3"
8544+
resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.3.tgz#1b33615247290e94e28263b5d855ece765648a31"
8545+
integrity sha512-psb6xjLj47+fE76JdZwskvwG4MYsQKXUtMsPh6U0YMvmyjRtKRFcxnlXGWglNybtNTNVmGdp94K62/+NjF5FDQ==
8546+
dependencies:
8547+
a-sync-waterfall "^1.0.0"
8548+
asap "^2.0.3"
8549+
commander "^5.1.0"
8550+
85328551
nwsapi@^2.2.0:
85338552
version "2.2.0"
85348553
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"

0 commit comments

Comments
 (0)