Skip to content

Commit e59b49a

Browse files
committed
refactor: convert to monorepo
add docs using docute add package @vue-js-cron/vuetify
1 parent d97c081 commit e59b49a

37 files changed

+1811
-1490
lines changed

.babelrc renamed to core/.babelrc

File renamed without changes.

core/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode
2+
node_modules
3+
dist

core/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Vue.js Cron Core
2+
3+
A renderless Vue.js component to generate cron expressions.
4+
5+
This component is inspired by [react-js-cron](https://github.com/xrutayisire/react-js-cron) and [jqcron](https://github.com/arnapou/jqcron)
6+
7+
# Development
8+
9+
## Install dependencies
10+
```
11+
yarn install
12+
```
13+
14+
## Run example component
15+
```
16+
yarn serve
17+
```
18+
19+
## Test
20+
```
21+
yarn test
22+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

core/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@vue-js-cron/core",
3+
"version": "1.0.0",
4+
"description": "A renderless Vue.js cron editor.",
5+
"main": "dist/core.umd.js",
6+
"module": "dist/core.esm.js",
7+
"unpkg": "dist/core.min.js",
8+
"browser": {
9+
"./sfc": "src/core.vue"
10+
},
11+
"scripts": {
12+
"test": "jest",
13+
"serve": "vue serve examples/vue-cron.vue",
14+
"build": "yarn build:umd & yarn run build:es & yarn run build:unpkg",
15+
"build:umd": "yarn rollup --config build/rollup.config.js --format umd --file dist/core.umd.js",
16+
"build:es": "yarn rollup --config build/rollup.config.js --format es --file dist/core.esm.js",
17+
"build:unpkg": "yarn rollup --config build/rollup.config.js --format iife --file dist/core.min.js"
18+
},
19+
"keywords": [
20+
"cron",
21+
"editor",
22+
"renderless",
23+
"vue.js",
24+
"vue"
25+
],
26+
"author": "Andreas Bichinger",
27+
"license": "MIT",
28+
"dependencies": {
29+
"mustache": "^4.2.0"
30+
}
31+
}

src/core.vue renamed to core/src/core.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export default {
200200
continue
201201
}
202202
let array = selected[field.id]
203-
let str = multiple.arrayToStr(array, field)
203+
let str = multiple.arrayToStr(this.sort(array), field)
204204
if(str === null){
205205
this.error = 'invalid selection'
206206
return
@@ -209,6 +209,12 @@ export default {
209209
}
210210
this.error = ''
211211
this.$emit('input', strings.join(' '))
212+
},
213+
214+
sort(array){
215+
let a = array.slice()
216+
a.sort((a,b) => a-b)
217+
return a
212218
}
213219
}
214220
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)