openatc-components 0.0.1 → 0.0.2
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/.babelrc +18 -18
- package/.editorconfig +9 -9
- package/.eslintignore +5 -5
- package/.eslintrc.js +29 -29
- package/.postcssrc.js +10 -10
- package/README.md +30 -30
- package/build/build.js +41 -41
- package/build/check-versions.js +54 -54
- package/build/package.config.js +58 -58
- package/build/package.dev.config.js +25 -25
- package/build/package.prod.config.js +60 -60
- package/build/utils.js +101 -101
- package/build/vue-loader.conf.js +22 -22
- package/build/webpack.base.conf.js +109 -109
- package/build/webpack.dev.conf.js +95 -95
- package/build/webpack.prod.conf.js +149 -149
- package/config/dev.env.js +7 -7
- package/config/index.js +76 -76
- package/config/prod.env.js +4 -4
- package/config/test.env.js +7 -7
- package/index.html +12 -12
- package/package/kisscomps/components/CircleMenu/KissCircleMenu.vue +398 -398
- package/package/kisscomps/components/CircleMenu/index.js +2 -2
- package/package/kisscomps/components/DashBoard/MakeGradientColor.js +84 -84
- package/package/kisscomps/components/DashBoard/dashboard.js +471 -471
- package/package/kisscomps/components/DashBoard/dashboard.vue +57 -57
- package/package/kisscomps/components/DashBoard/index.js +2 -2
- package/package/kisscomps/components/Horizontal/KissHorizontal.vue +146 -146
- package/package/kisscomps/components/Horizontal/index.js +2 -2
- package/package/kisscomps/components/HorizontalChildren/KissHorizontalChildren.vue +196 -196
- package/package/kisscomps/components/HorizontalChildren/index.js +2 -2
- package/package/kisscomps/components/KissCircleMenu/CircleMenu.vue +113 -113
- package/package/kisscomps/components/KissCircleMenu/index.js +2 -2
- package/package/kisscomps/components/KissCircleMenu/style/index.less +1 -1
- package/package/kisscomps/components/KissCircleMenu/style/main/core.less +161 -161
- package/package/kisscomps/components/KissCircleMenu/style/main/other.less +94 -94
- package/package/kisscomps/components/KissCircleMenu/style/mixin/mixin.less +36 -36
- package/package/kisscomps/components/KissCircleMenu/style/var/var.less +21 -21
- package/package/kisscomps/components/KissCircleMenu/utils/colorRE.js +5 -5
- package/package/kisscomps/components/KissMessageBox/KissMessageBox.vue +108 -108
- package/package/kisscomps/components/KissMessageBox/index.js +2 -2
- package/package/kisscomps/components/KissSearchInput/index.js +2 -2
- package/package/kisscomps/components/KissSearchInput/kisssearchinput.vue +77 -77
- package/package/kisscomps/components/KissSimulationProgress/KissSimulationProgress.vue +294 -294
- package/package/kisscomps/components/KissSimulationProgress/index.js +2 -2
- package/package/kisscomps/components/StatusBar/StatusBar.vue +222 -222
- package/package/kisscomps/components/StatusBar/index.js +2 -2
- package/package/kisscomps/components/TragResize/index.js +2 -2
- package/package/kisscomps/components/TragResize/kissdragresize.vue +536 -536
- package/package/kisscomps/components/TragResize/util/dom.js +23 -23
- package/package/kisscomps/components/TragResize/util/fns.js +3 -3
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.1.vue +320 -320
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +345 -345
- package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
- package/package/kisscomps/components/button/index.js +2 -2
- package/package/kisscomps/components/button/kissbutton.vue +168 -168
- package/package/kisscomps/components/compass3D/compass.vue +180 -180
- package/package/kisscomps/components/compass3D/index.js +2 -2
- package/package/kisscomps/components/header/index.js +2 -2
- package/package/kisscomps/components/header/kissHead.vue +83 -83
- package/package/kisscomps/components/horizontalMenu/index.js +2 -2
- package/package/kisscomps/components/horizontalMenu/kissHorizontalMenu.vue +254 -254
- package/package/kisscomps/components/input/index.js +2 -2
- package/package/kisscomps/components/input/kissinput.vue +57 -57
- package/package/kisscomps/components/menu/index.js +2 -2
- package/package/kisscomps/components/menu/kissmenu.vue +324 -324
- package/package/kisscomps/components/mutipletips/Tdrag.js +585 -585
- package/package/kisscomps/components/mutipletips/index.js +2 -2
- package/package/kisscomps/components/mutipletips/kissmutipletips.vue +192 -192
- package/package/kisscomps/components/panel/index.js +2 -2
- package/package/kisscomps/components/panel/kissPanel.vue +151 -151
- package/package/kisscomps/components/select/chosen.jquery.min.js +3 -3
- package/package/kisscomps/components/select/index.js +2 -2
- package/package/kisscomps/components/select/kissselect.vue +527 -527
- package/package/kisscomps/components/tablebutton/index.js +2 -2
- package/package/kisscomps/components/tablebutton/tablebutton.vue +97 -97
- package/package/kisscomps/components/timectrl/KissTimeCtrl.vue +67 -67
- package/package/kisscomps/components/timectrl/index.js +2 -2
- package/package/kisscomps/components/timectrl/timectrl.css +851 -851
- package/package/kisscomps/components/tip/Tdrag.js +585 -585
- package/package/kisscomps/components/tip/index.js +2 -2
- package/package/kisscomps/components/tip/kisstips.1.vue +154 -154
- package/package/kisscomps/components/tip/kisstips.vue +154 -154
- package/package/kisscomps/components/tip/kisstips.vue.bak +211 -211
- package/package/kisscomps/index.js +71 -71
- package/package/kissui.js +203 -203
- package/package/kissui.min.js +203 -203
- package/package.json +1 -1
- package/src/App.vue +25 -25
- package/src/kisscomps/components/CircleMenu/KissCircleMenu.vue +398 -398
- package/src/kisscomps/components/CircleMenu/index.js +2 -2
- package/src/kisscomps/components/DashBoard/MakeGradientColor.js +84 -84
- package/src/kisscomps/components/DashBoard/dashboard.js +471 -471
- package/src/kisscomps/components/DashBoard/dashboard.vue +57 -57
- package/src/kisscomps/components/DashBoard/index.js +2 -2
- package/src/kisscomps/components/KissCircleMenu/CircleMenu.vue +113 -113
- package/src/kisscomps/components/KissCircleMenu/index.js +2 -2
- package/src/kisscomps/components/KissCircleMenu/style/index.less +1 -1
- package/src/kisscomps/components/KissCircleMenu/style/main/core.less +161 -161
- package/src/kisscomps/components/KissCircleMenu/style/main/other.less +94 -94
- package/src/kisscomps/components/KissCircleMenu/style/mixin/mixin.less +36 -36
- package/src/kisscomps/components/KissCircleMenu/style/var/var.less +21 -21
- package/src/kisscomps/components/KissCircleMenu/utils/colorRE.js +5 -5
- package/src/kisscomps/components/KissSearchInput/index.js +2 -2
- package/src/kisscomps/components/KissSearchInput/kisssearchinput.vue +77 -77
- package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +193 -0
- package/src/kisscomps/components/SchemeConfig/index.js +2 -0
- package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +214 -0
- package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +176 -0
- package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +294 -0
- package/src/kisscomps/components/SchemeConfig/schemeconfig.vue +711 -0
- package/src/kisscomps/components/StatusBar/StatusBar.vue +222 -222
- package/src/kisscomps/components/StatusBar/index.js +2 -2
- package/src/kisscomps/components/TragResize/index.js +2 -2
- package/src/kisscomps/components/TragResize/kissdragresize.vue +536 -536
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.1.vue +320 -320
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +345 -345
- package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
- package/src/kisscomps/components/button/index.js +2 -2
- package/src/kisscomps/components/button/kissbutton.vue +168 -168
- package/src/kisscomps/components/compass3D/compass.vue +180 -180
- package/src/kisscomps/components/compass3D/index.js +2 -2
- package/src/kisscomps/components/horizontalMenu/index.js +2 -2
- package/src/kisscomps/components/horizontalMenu/kissHorizontalMenu.vue +254 -254
- package/src/kisscomps/components/input/index.js +2 -2
- package/src/kisscomps/components/input/kissinput.vue +57 -57
- package/src/kisscomps/components/menu/index.js +2 -2
- package/src/kisscomps/components/menu/kissmenu.vue +324 -324
- package/src/kisscomps/components/mutipletips/Tdrag.js +585 -585
- package/src/kisscomps/components/mutipletips/index.js +2 -2
- package/src/kisscomps/components/mutipletips/kissmutipletips.vue +192 -192
- package/src/kisscomps/components/select/chosen.jquery.min.js +3 -3
- package/src/kisscomps/components/select/index.js +2 -2
- package/src/kisscomps/components/select/kissselect.vue +527 -527
- package/src/kisscomps/components/timectrl/KissTimeCtrl.vue +67 -67
- package/src/kisscomps/components/timectrl/index.js +2 -2
- package/src/kisscomps/components/tip/Tdrag.js +585 -585
- package/src/kisscomps/components/tip/index.js +2 -2
- package/src/kisscomps/components/tip/kisstips.1.vue +154 -154
- package/src/kisscomps/components/tip/kisstips.vue +154 -154
- package/src/kisscomps/components/tip/kisstips.vue.bak +211 -211
- package/src/kisscomps/index.js +73 -71
- package/src/main.js +23 -23
- package/src/router/index.js +15 -15
- package/src/views/home.1.vue +479 -479
- package/src/views/home.vue +196 -196
- package/test/e2e/custom-assertions/elementCount.js +27 -27
- package/test/e2e/nightwatch.conf.js +46 -46
- package/test/e2e/runner.js +48 -48
- package/test/e2e/specs/test.js +19 -19
- package/test/unit/.eslintrc +7 -7
- package/test/unit/jest.conf.js +30 -30
- package/test/unit/setup.js +3 -3
- package/test/unit/specs/HelloWorld.spec.js +11 -11
package/.babelrc
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
["env", {
|
|
4
|
-
"modules": false,
|
|
5
|
-
"targets": {
|
|
6
|
-
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
|
7
|
-
}
|
|
8
|
-
}],
|
|
9
|
-
"stage-2"
|
|
10
|
-
],
|
|
11
|
-
"plugins": ["transform-vue-jsx", "transform-runtime"],
|
|
12
|
-
"env": {
|
|
13
|
-
"test": {
|
|
14
|
-
"presets": ["env", "stage-2"],
|
|
15
|
-
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
["env", {
|
|
4
|
+
"modules": false,
|
|
5
|
+
"targets": {
|
|
6
|
+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
|
7
|
+
}
|
|
8
|
+
}],
|
|
9
|
+
"stage-2"
|
|
10
|
+
],
|
|
11
|
+
"plugins": ["transform-vue-jsx", "transform-runtime"],
|
|
12
|
+
"env": {
|
|
13
|
+
"test": {
|
|
14
|
+
"presets": ["env", "stage-2"],
|
|
15
|
+
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
package/.editorconfig
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
charset = utf-8
|
|
5
|
-
indent_style = space
|
|
6
|
-
indent_size = 2
|
|
7
|
-
end_of_line = lf
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
package/.eslintignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/build/
|
|
2
|
-
/config/
|
|
3
|
-
/dist/
|
|
4
|
-
/*.js
|
|
5
|
-
/test/unit/coverage/
|
|
1
|
+
/build/
|
|
2
|
+
/config/
|
|
3
|
+
/dist/
|
|
4
|
+
/*.js
|
|
5
|
+
/test/unit/coverage/
|
package/.eslintrc.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// https://eslint.org/docs/user-guide/configuring
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
root: true,
|
|
5
|
-
parserOptions: {
|
|
6
|
-
parser: 'babel-eslint'
|
|
7
|
-
},
|
|
8
|
-
env: {
|
|
9
|
-
browser: true,
|
|
10
|
-
},
|
|
11
|
-
extends: [
|
|
12
|
-
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
|
|
13
|
-
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
|
|
14
|
-
'plugin:vue/essential',
|
|
15
|
-
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
|
16
|
-
'standard'
|
|
17
|
-
],
|
|
18
|
-
// required to lint *.vue files
|
|
19
|
-
plugins: [
|
|
20
|
-
'vue'
|
|
21
|
-
],
|
|
22
|
-
// add your custom rules here
|
|
23
|
-
rules: {
|
|
24
|
-
// allow async-await
|
|
25
|
-
'generator-star-spacing': 'off',
|
|
26
|
-
// allow debugger during development
|
|
27
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
// https://eslint.org/docs/user-guide/configuring
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
root: true,
|
|
5
|
+
parserOptions: {
|
|
6
|
+
parser: 'babel-eslint'
|
|
7
|
+
},
|
|
8
|
+
env: {
|
|
9
|
+
browser: true,
|
|
10
|
+
},
|
|
11
|
+
extends: [
|
|
12
|
+
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
|
|
13
|
+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
|
|
14
|
+
'plugin:vue/essential',
|
|
15
|
+
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
|
16
|
+
'standard'
|
|
17
|
+
],
|
|
18
|
+
// required to lint *.vue files
|
|
19
|
+
plugins: [
|
|
20
|
+
'vue'
|
|
21
|
+
],
|
|
22
|
+
// add your custom rules here
|
|
23
|
+
rules: {
|
|
24
|
+
// allow async-await
|
|
25
|
+
'generator-star-spacing': 'off',
|
|
26
|
+
// allow debugger during development
|
|
27
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
|
28
|
+
}
|
|
29
|
+
}
|
package/.postcssrc.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// https://github.com/michael-ciniawsky/postcss-load-config
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
"plugins": {
|
|
5
|
-
"postcss-import": {},
|
|
6
|
-
"postcss-url": {},
|
|
7
|
-
// to edit target browsers: use "browserslist" field in package.json
|
|
8
|
-
"autoprefixer": {}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
// https://github.com/michael-ciniawsky/postcss-load-config
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
"plugins": {
|
|
5
|
+
"postcss-import": {},
|
|
6
|
+
"postcss-url": {},
|
|
7
|
+
// to edit target browsers: use "browserslist" field in package.json
|
|
8
|
+
"autoprefixer": {}
|
|
9
|
+
}
|
|
10
|
+
}
|
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# kissui
|
|
2
|
-
|
|
3
|
-
> A Vue.js project
|
|
4
|
-
|
|
5
|
-
## Build Setup
|
|
6
|
-
|
|
7
|
-
``` bash
|
|
8
|
-
# install dependencies
|
|
9
|
-
npm install
|
|
10
|
-
|
|
11
|
-
# serve with hot reload at localhost:8080
|
|
12
|
-
npm run dev
|
|
13
|
-
|
|
14
|
-
# build for production with minification
|
|
15
|
-
npm run build
|
|
16
|
-
|
|
17
|
-
# build for production and view the bundle analyzer report
|
|
18
|
-
npm run build --report
|
|
19
|
-
|
|
20
|
-
# run unit tests
|
|
21
|
-
npm run unit
|
|
22
|
-
|
|
23
|
-
# run e2e tests
|
|
24
|
-
npm run e2e
|
|
25
|
-
|
|
26
|
-
# run all tests
|
|
27
|
-
npm test
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
|
|
1
|
+
# kissui
|
|
2
|
+
|
|
3
|
+
> A Vue.js project
|
|
4
|
+
|
|
5
|
+
## Build Setup
|
|
6
|
+
|
|
7
|
+
``` bash
|
|
8
|
+
# install dependencies
|
|
9
|
+
npm install
|
|
10
|
+
|
|
11
|
+
# serve with hot reload at localhost:8080
|
|
12
|
+
npm run dev
|
|
13
|
+
|
|
14
|
+
# build for production with minification
|
|
15
|
+
npm run build
|
|
16
|
+
|
|
17
|
+
# build for production and view the bundle analyzer report
|
|
18
|
+
npm run build --report
|
|
19
|
+
|
|
20
|
+
# run unit tests
|
|
21
|
+
npm run unit
|
|
22
|
+
|
|
23
|
+
# run e2e tests
|
|
24
|
+
npm run e2e
|
|
25
|
+
|
|
26
|
+
# run all tests
|
|
27
|
+
npm test
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
|
package/build/build.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
require('./check-versions')()
|
|
3
|
-
|
|
4
|
-
process.env.NODE_ENV = 'production'
|
|
5
|
-
|
|
6
|
-
const ora = require('ora')
|
|
7
|
-
const rm = require('rimraf')
|
|
8
|
-
const path = require('path')
|
|
9
|
-
const chalk = require('chalk')
|
|
10
|
-
const webpack = require('webpack')
|
|
11
|
-
const config = require('../config')
|
|
12
|
-
const webpackConfig = require('./webpack.prod.conf')
|
|
13
|
-
|
|
14
|
-
const spinner = ora('building for production...')
|
|
15
|
-
spinner.start()
|
|
16
|
-
|
|
17
|
-
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
|
18
|
-
if (err) throw err
|
|
19
|
-
webpack(webpackConfig, (err, stats) => {
|
|
20
|
-
spinner.stop()
|
|
21
|
-
if (err) throw err
|
|
22
|
-
process.stdout.write(stats.toString({
|
|
23
|
-
colors: true,
|
|
24
|
-
modules: false,
|
|
25
|
-
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
|
26
|
-
chunks: false,
|
|
27
|
-
chunkModules: false
|
|
28
|
-
}) + '\n\n')
|
|
29
|
-
|
|
30
|
-
if (stats.hasErrors()) {
|
|
31
|
-
console.log(chalk.red(' Build failed with errors.\n'))
|
|
32
|
-
process.exit(1)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
console.log(chalk.cyan(' Build complete.\n'))
|
|
36
|
-
console.log(chalk.yellow(
|
|
37
|
-
' Tip: built files are meant to be served over an HTTP server.\n' +
|
|
38
|
-
' Opening index.html over file:// won\'t work.\n'
|
|
39
|
-
))
|
|
40
|
-
})
|
|
41
|
-
})
|
|
1
|
+
'use strict'
|
|
2
|
+
require('./check-versions')()
|
|
3
|
+
|
|
4
|
+
process.env.NODE_ENV = 'production'
|
|
5
|
+
|
|
6
|
+
const ora = require('ora')
|
|
7
|
+
const rm = require('rimraf')
|
|
8
|
+
const path = require('path')
|
|
9
|
+
const chalk = require('chalk')
|
|
10
|
+
const webpack = require('webpack')
|
|
11
|
+
const config = require('../config')
|
|
12
|
+
const webpackConfig = require('./webpack.prod.conf')
|
|
13
|
+
|
|
14
|
+
const spinner = ora('building for production...')
|
|
15
|
+
spinner.start()
|
|
16
|
+
|
|
17
|
+
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
|
18
|
+
if (err) throw err
|
|
19
|
+
webpack(webpackConfig, (err, stats) => {
|
|
20
|
+
spinner.stop()
|
|
21
|
+
if (err) throw err
|
|
22
|
+
process.stdout.write(stats.toString({
|
|
23
|
+
colors: true,
|
|
24
|
+
modules: false,
|
|
25
|
+
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
|
26
|
+
chunks: false,
|
|
27
|
+
chunkModules: false
|
|
28
|
+
}) + '\n\n')
|
|
29
|
+
|
|
30
|
+
if (stats.hasErrors()) {
|
|
31
|
+
console.log(chalk.red(' Build failed with errors.\n'))
|
|
32
|
+
process.exit(1)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
console.log(chalk.cyan(' Build complete.\n'))
|
|
36
|
+
console.log(chalk.yellow(
|
|
37
|
+
' Tip: built files are meant to be served over an HTTP server.\n' +
|
|
38
|
+
' Opening index.html over file:// won\'t work.\n'
|
|
39
|
+
))
|
|
40
|
+
})
|
|
41
|
+
})
|
package/build/check-versions.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const chalk = require('chalk')
|
|
3
|
-
const semver = require('semver')
|
|
4
|
-
const packageConfig = require('../package.json')
|
|
5
|
-
const shell = require('shelljs')
|
|
6
|
-
|
|
7
|
-
function exec (cmd) {
|
|
8
|
-
return require('child_process').execSync(cmd).toString().trim()
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const versionRequirements = [
|
|
12
|
-
{
|
|
13
|
-
name: 'node',
|
|
14
|
-
currentVersion: semver.clean(process.version),
|
|
15
|
-
versionRequirement: packageConfig.engines.node
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
if (shell.which('npm')) {
|
|
20
|
-
versionRequirements.push({
|
|
21
|
-
name: 'npm',
|
|
22
|
-
currentVersion: exec('npm --version'),
|
|
23
|
-
versionRequirement: packageConfig.engines.npm
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
module.exports = function () {
|
|
28
|
-
const warnings = []
|
|
29
|
-
|
|
30
|
-
for (let i = 0; i < versionRequirements.length; i++) {
|
|
31
|
-
const mod = versionRequirements[i]
|
|
32
|
-
|
|
33
|
-
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
|
34
|
-
warnings.push(mod.name + ': ' +
|
|
35
|
-
chalk.red(mod.currentVersion) + ' should be ' +
|
|
36
|
-
chalk.green(mod.versionRequirement)
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (warnings.length) {
|
|
42
|
-
console.log('')
|
|
43
|
-
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
|
44
|
-
console.log()
|
|
45
|
-
|
|
46
|
-
for (let i = 0; i < warnings.length; i++) {
|
|
47
|
-
const warning = warnings[i]
|
|
48
|
-
console.log(' ' + warning)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
console.log()
|
|
52
|
-
process.exit(1)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
const chalk = require('chalk')
|
|
3
|
+
const semver = require('semver')
|
|
4
|
+
const packageConfig = require('../package.json')
|
|
5
|
+
const shell = require('shelljs')
|
|
6
|
+
|
|
7
|
+
function exec (cmd) {
|
|
8
|
+
return require('child_process').execSync(cmd).toString().trim()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const versionRequirements = [
|
|
12
|
+
{
|
|
13
|
+
name: 'node',
|
|
14
|
+
currentVersion: semver.clean(process.version),
|
|
15
|
+
versionRequirement: packageConfig.engines.node
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
if (shell.which('npm')) {
|
|
20
|
+
versionRequirements.push({
|
|
21
|
+
name: 'npm',
|
|
22
|
+
currentVersion: exec('npm --version'),
|
|
23
|
+
versionRequirement: packageConfig.engines.npm
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = function () {
|
|
28
|
+
const warnings = []
|
|
29
|
+
|
|
30
|
+
for (let i = 0; i < versionRequirements.length; i++) {
|
|
31
|
+
const mod = versionRequirements[i]
|
|
32
|
+
|
|
33
|
+
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
|
34
|
+
warnings.push(mod.name + ': ' +
|
|
35
|
+
chalk.red(mod.currentVersion) + ' should be ' +
|
|
36
|
+
chalk.green(mod.versionRequirement)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (warnings.length) {
|
|
42
|
+
console.log('')
|
|
43
|
+
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
|
44
|
+
console.log()
|
|
45
|
+
|
|
46
|
+
for (let i = 0; i < warnings.length; i++) {
|
|
47
|
+
const warning = warnings[i]
|
|
48
|
+
console.log(' ' + warning)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log()
|
|
52
|
+
process.exit(1)
|
|
53
|
+
}
|
|
54
|
+
}
|
package/build/package.config.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const webpack = require('webpack')
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
entry: {
|
|
6
|
-
'kissui': './src/kisscomps/index.js'
|
|
7
|
-
},
|
|
8
|
-
output: {
|
|
9
|
-
path: path.resolve(__dirname, '../package'),
|
|
10
|
-
publicPath: '/package/',
|
|
11
|
-
library: 'kissui',
|
|
12
|
-
libraryTarget: 'umd',
|
|
13
|
-
umdNamedDefine: true
|
|
14
|
-
},
|
|
15
|
-
externals: {
|
|
16
|
-
vue: {
|
|
17
|
-
root: 'Vue',
|
|
18
|
-
commonjs: 'vue',
|
|
19
|
-
commonjs2: 'vue',
|
|
20
|
-
amd: 'vue'
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
resolve: {
|
|
24
|
-
extensions: ['.js', '.vue']
|
|
25
|
-
},
|
|
26
|
-
module: {
|
|
27
|
-
loaders: [{
|
|
28
|
-
test: /\.vue$/,
|
|
29
|
-
loader: 'vue-loader',
|
|
30
|
-
options: {
|
|
31
|
-
loaders: {
|
|
32
|
-
css: 'vue-style-loader!css-loader',
|
|
33
|
-
sass: 'vue-style-loader!css-loader!sass-loader'
|
|
34
|
-
},
|
|
35
|
-
postLoaders: {
|
|
36
|
-
html: 'babel-loader'
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}, {
|
|
40
|
-
test: /\.js$/,
|
|
41
|
-
loader: 'babel-loader',
|
|
42
|
-
exclude: /node_modules/
|
|
43
|
-
}, {
|
|
44
|
-
test: /\.css$/,
|
|
45
|
-
use: [
|
|
46
|
-
'style-loader',
|
|
47
|
-
'css-loader',
|
|
48
|
-
'autoprefixer-loader'
|
|
49
|
-
]
|
|
50
|
-
}, {
|
|
51
|
-
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
|
52
|
-
loader: 'url-loader?limit=100000'
|
|
53
|
-
}]
|
|
54
|
-
},
|
|
55
|
-
plugins: [
|
|
56
|
-
new webpack.optimize.ModuleConcatenationPlugin()
|
|
57
|
-
]
|
|
58
|
-
}
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const webpack = require('webpack')
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
entry: {
|
|
6
|
+
'kissui': './src/kisscomps/index.js'
|
|
7
|
+
},
|
|
8
|
+
output: {
|
|
9
|
+
path: path.resolve(__dirname, '../package'),
|
|
10
|
+
publicPath: '/package/',
|
|
11
|
+
library: 'kissui',
|
|
12
|
+
libraryTarget: 'umd',
|
|
13
|
+
umdNamedDefine: true
|
|
14
|
+
},
|
|
15
|
+
externals: {
|
|
16
|
+
vue: {
|
|
17
|
+
root: 'Vue',
|
|
18
|
+
commonjs: 'vue',
|
|
19
|
+
commonjs2: 'vue',
|
|
20
|
+
amd: 'vue'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
resolve: {
|
|
24
|
+
extensions: ['.js', '.vue']
|
|
25
|
+
},
|
|
26
|
+
module: {
|
|
27
|
+
loaders: [{
|
|
28
|
+
test: /\.vue$/,
|
|
29
|
+
loader: 'vue-loader',
|
|
30
|
+
options: {
|
|
31
|
+
loaders: {
|
|
32
|
+
css: 'vue-style-loader!css-loader',
|
|
33
|
+
sass: 'vue-style-loader!css-loader!sass-loader'
|
|
34
|
+
},
|
|
35
|
+
postLoaders: {
|
|
36
|
+
html: 'babel-loader'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
test: /\.js$/,
|
|
41
|
+
loader: 'babel-loader',
|
|
42
|
+
exclude: /node_modules/
|
|
43
|
+
}, {
|
|
44
|
+
test: /\.css$/,
|
|
45
|
+
use: [
|
|
46
|
+
'style-loader',
|
|
47
|
+
'css-loader',
|
|
48
|
+
'autoprefixer-loader'
|
|
49
|
+
]
|
|
50
|
+
}, {
|
|
51
|
+
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
|
52
|
+
loader: 'url-loader?limit=100000'
|
|
53
|
+
}]
|
|
54
|
+
},
|
|
55
|
+
plugins: [
|
|
56
|
+
new webpack.optimize.ModuleConcatenationPlugin()
|
|
57
|
+
]
|
|
58
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const webpack = require('webpack')
|
|
2
|
-
const merge = require('webpack-merge')
|
|
3
|
-
const baseWebpackConfig = require('./package.config')
|
|
4
|
-
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
5
|
-
const extractScss = new ExtractTextPlugin('/kissui.min.css')
|
|
6
|
-
|
|
7
|
-
module.exports = merge(baseWebpackConfig, {
|
|
8
|
-
output: {
|
|
9
|
-
filename: '[name].js'
|
|
10
|
-
},
|
|
11
|
-
module: {
|
|
12
|
-
loaders: [{
|
|
13
|
-
test: /\.scss$/i,
|
|
14
|
-
loader: extractScss.extract(['css-loader', 'sass-loader'])
|
|
15
|
-
}]
|
|
16
|
-
},
|
|
17
|
-
plugins: [
|
|
18
|
-
new webpack.DefinePlugin({
|
|
19
|
-
'process.env': {
|
|
20
|
-
NODE_ENV: '"development"'
|
|
21
|
-
}
|
|
22
|
-
}),
|
|
23
|
-
extractScss
|
|
24
|
-
]
|
|
25
|
-
})
|
|
1
|
+
const webpack = require('webpack')
|
|
2
|
+
const merge = require('webpack-merge')
|
|
3
|
+
const baseWebpackConfig = require('./package.config')
|
|
4
|
+
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
5
|
+
const extractScss = new ExtractTextPlugin('/kissui.min.css')
|
|
6
|
+
|
|
7
|
+
module.exports = merge(baseWebpackConfig, {
|
|
8
|
+
output: {
|
|
9
|
+
filename: '[name].js'
|
|
10
|
+
},
|
|
11
|
+
module: {
|
|
12
|
+
loaders: [{
|
|
13
|
+
test: /\.scss$/i,
|
|
14
|
+
loader: extractScss.extract(['css-loader', 'sass-loader'])
|
|
15
|
+
}]
|
|
16
|
+
},
|
|
17
|
+
plugins: [
|
|
18
|
+
new webpack.DefinePlugin({
|
|
19
|
+
'process.env': {
|
|
20
|
+
NODE_ENV: '"development"'
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
extractScss
|
|
24
|
+
]
|
|
25
|
+
})
|