automan-cmd 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +56 -0
  3. package/bin/automan +3 -0
  4. package/bin/automan-build +3 -0
  5. package/bin/automan-config +3 -0
  6. package/bin/automan-create +3 -0
  7. package/bin/automan-publish +3 -0
  8. package/lib/automan-build.js +41 -0
  9. package/lib/automan-config.js +82 -0
  10. package/lib/automan-create.js +137 -0
  11. package/lib/automan-publish.js +331 -0
  12. package/lib/index.js +13 -0
  13. package/lib/install.js.tpl +47 -0
  14. package/lib/util.js +174 -0
  15. package/package.json +37 -0
  16. package/tpl/.babelrc +16 -0
  17. package/tpl/.browserslistrc +3 -0
  18. package/tpl/.eslintignore +2 -0
  19. package/tpl/.eslintrc.js +228 -0
  20. package/tpl/.gitignore.ejs +12 -0
  21. package/tpl/.postcssrc.js +12 -0
  22. package/tpl/README.md +1 -0
  23. package/tpl/changelog.md +1 -0
  24. package/tpl/editor/index.vue +45 -0
  25. package/tpl/icon.png +0 -0
  26. package/tpl/jsconfig.json +7 -0
  27. package/tpl/package.json.ejs +66 -0
  28. package/tpl/preview/app.vue +326 -0
  29. package/tpl/preview/attr/Data.vue +69 -0
  30. package/tpl/preview/attr/Resource.vue +79 -0
  31. package/tpl/preview/attr/com.vue +21 -0
  32. package/tpl/preview/attr/index.js +16 -0
  33. package/tpl/preview/components/Attribute.vue +365 -0
  34. package/tpl/preview/components/FitImg.vue +152 -0
  35. package/tpl/preview/components/ImgViewer.vue +80 -0
  36. package/tpl/preview/components/Loading.vue +55 -0
  37. package/tpl/preview/components/Toast.vue +111 -0
  38. package/tpl/preview/index.js +22 -0
  39. package/tpl/preview/index.tpl +13 -0
  40. package/tpl/preview/lib/ESlog.js +46 -0
  41. package/tpl/preview/lib/Util.js +57 -0
  42. package/tpl/preview/lib/fetch.js +139 -0
  43. package/tpl/preview/lib/index.js +15 -0
  44. package/tpl/preview/lib/vue/filters.js +53 -0
  45. package/tpl/preview/lib/vue/index.js +9 -0
  46. package/tpl/preview/lib/vue/mixin.js +166 -0
  47. package/tpl/preview/mint-ui/message-box/index.js +1503 -0
  48. package/tpl/preview/mint-ui/message-box/style.css +159 -0
  49. package/tpl/preview/mint-ui/popup/index.js +1046 -0
  50. package/tpl/preview/mint-ui/popup/style.css +115 -0
  51. package/tpl/preview/mint-ui/spinner/index.js +657 -0
  52. package/tpl/preview/mint-ui/spinner/style.css +227 -0
  53. package/tpl/preview/mint-ui/swipe/index.js +907 -0
  54. package/tpl/preview/mint-ui/swipe/style.css +43 -0
  55. package/tpl/preview/mint-ui/swipe-item/index.js +171 -0
  56. package/tpl/preview/mint-ui/swipe-item/style.css +1 -0
  57. package/tpl/preview/style.css +126 -0
  58. package/tpl/server.config.js +6 -0
  59. package/tpl/src/assets/css/index.scss +29 -0
  60. package/tpl/src/example.vue +165 -0
  61. package/tpl/src/index.vue.ejs +32 -0
  62. package/tpl/webpack.config.js.ejs +267 -0
  63. package/tpl/yarn.lock +6037 -0
@@ -0,0 +1,228 @@
1
+ module.exports = {
2
+ root: true,
3
+ parserOptions: {
4
+ parser: '@babel/eslint-parser',
5
+ ecmaVersion: 2018,
6
+ sourceType: 'module'
7
+ },
8
+ env: {
9
+ browser: true,
10
+ node: true,
11
+ es6: true,
12
+ commonjs: true,
13
+ amd: true
14
+ },
15
+ extends: [
16
+ 'eslint:recommended',
17
+ 'plugin:vue/recommended'
18
+ ],
19
+ // add your custom rules here
20
+ //it is base on https://github.com/vuejs/eslint-config-vue
21
+ rules: {
22
+ "strict": ["off", "function"],
23
+ "indent": ["warn", 2, { "SwitchCase": 1 }],
24
+ "no-console": "off",
25
+ //"brace-style": [1, "stroustrup", {"allowSingleLine": false}],
26
+ "comma-style": [1, "last"],
27
+ "default-case": 2,
28
+ "no-floating-decimal": 2,
29
+ "space-before-function-paren": [1, {
30
+ "anonymous": "never",
31
+ "named": "never",
32
+ "asyncArrow": "always"
33
+ }],
34
+ "keyword-spacing": 2,
35
+ "space-before-blocks": 1,
36
+ "wrap-iife": [2, "any"],
37
+ "curly": [2, "all"],
38
+ "no-empty": [2, { "allowEmptyCatch": true }],
39
+ "no-obj-calls": 2,
40
+ "no-unused-vars": [1, { "vars": "local", "args": "after-used" }],
41
+ "no-invalid-regexp": 2,
42
+ "comma-dangle": [1, "never"],
43
+ "no-undef": 2,
44
+ "no-extra-semi": 0,
45
+ "no-caller": 1,
46
+ "semi": 0,
47
+ "no-unreachable": 2,
48
+ "no-multi-str": 1,
49
+ "no-mixed-spaces-and-tabs": 1,
50
+ "no-trailing-spaces": 1,
51
+ "space-infix-ops": 1,
52
+ "no-with": 2,
53
+ "dot-notation": 1,
54
+ "semi-spacing": 1,
55
+ "key-spacing": [1, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
56
+ "space-in-parens": [1, "never"],
57
+ "prefer-const": 2,
58
+ 'accessor-pairs': 2,
59
+ 'arrow-spacing': [2, {
60
+ 'before': true,
61
+ 'after': true
62
+ }],
63
+ 'block-spacing': [2, 'always'],
64
+ 'camelcase': [0, {
65
+ 'properties': 'always'
66
+ }],
67
+ 'comma-spacing': [2, {
68
+ 'before': false,
69
+ 'after': true
70
+ }],
71
+ 'constructor-super': 2,
72
+ 'dot-location': [2, 'property'],
73
+ 'eol-last': 2,
74
+ 'generator-star-spacing': 0,
75
+ 'handle-callback-err': [2, '^(err|error)$'],
76
+ 'jsx-quotes': [2, 'prefer-single'],
77
+ 'new-parens': 2,
78
+ 'no-array-constructor': 2,
79
+ 'no-class-assign': 2,
80
+ 'no-cond-assign': 2,
81
+ 'no-const-assign': 2,
82
+ 'no-control-regex': 2,
83
+ 'no-delete-var': 2,
84
+ 'no-dupe-args': 2,
85
+ 'no-dupe-class-members': 2,
86
+ 'no-dupe-keys': 2,
87
+ 'no-duplicate-case': 2,
88
+ 'no-empty-character-class': 2,
89
+ 'no-empty-pattern': 2,
90
+ 'no-eval': 2,
91
+ 'no-ex-assign': 2,
92
+ 'no-extra-bind': 2,
93
+ 'no-extra-boolean-cast': 2,
94
+ 'no-fallthrough': 2,
95
+ 'no-func-assign': 2,
96
+ 'no-implied-eval': 2,
97
+ 'no-inner-declarations': [2, 'functions'],
98
+ 'no-irregular-whitespace': 2,
99
+ 'no-iterator': 2,
100
+ 'no-label-var': 2,
101
+ 'no-labels': [2, {
102
+ 'allowLoop': false,
103
+ 'allowSwitch': false
104
+ }],
105
+ 'no-lone-blocks': 2,
106
+ 'no-native-reassign': 2,
107
+ 'no-negated-in-lhs': 2,
108
+ 'no-new-object': 2,
109
+ 'no-new-require': 2,
110
+ 'no-new-symbol': 2,
111
+ 'no-new-wrappers': 2,
112
+ 'no-octal': 2,
113
+ 'no-octal-escape': 2,
114
+ 'no-path-concat': 2,
115
+ 'no-proto': 2,
116
+ 'no-redeclare': 2,
117
+ 'no-regex-spaces': 2,
118
+ 'no-self-assign': 2,
119
+ 'no-self-compare': 2,
120
+ 'no-sequences': 2,
121
+ 'no-shadow-restricted-names': 2,
122
+ 'no-spaced-func': 2,
123
+ 'no-sparse-arrays': 2,
124
+ 'no-this-before-super': 2,
125
+ 'no-undef-init': 2,
126
+ 'no-unexpected-multiline': 2,
127
+ 'no-unneeded-ternary': [2, {
128
+ 'defaultAssignment': false
129
+ }],
130
+ 'no-unsafe-finally': 2,
131
+ 'no-useless-call': 2,
132
+ 'no-useless-computed-key': 2,
133
+ 'no-useless-constructor': 2,
134
+ 'no-useless-escape': 0,
135
+ 'no-whitespace-before-property': 2,
136
+ 'space-unary-ops': [2, {
137
+ 'words': true,
138
+ 'nonwords': false
139
+ }],
140
+ 'template-curly-spacing': [2, 'never'],
141
+ 'use-isnan': 2,
142
+ 'valid-typeof': 2,
143
+ 'yield-star-spacing': [2, 'both'],
144
+ 'yoda': [2, 'never'],
145
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
146
+ 'object-curly-spacing': [1, 'always', { objectsInObjects: true }],
147
+ 'array-bracket-spacing': [2, 'never'],
148
+ 'no-var': 2,
149
+
150
+ 'vue/max-attributes-per-line': 0,
151
+ 'vue/attributes-order': 0,
152
+ 'vue/html-self-closing': ['error', {
153
+ 'html': {
154
+ 'void': 'never',
155
+ 'normal': 'never',
156
+ 'component': 'always'
157
+ },
158
+ 'svg': 'always',
159
+ 'math': 'always'
160
+ }],
161
+ 'vue/require-default-prop': 0,
162
+ 'vue/no-parsing-error': ['error', {
163
+ 'abrupt-closing-of-empty-comment': true,
164
+ 'absence-of-digits-in-numeric-character-reference': true,
165
+ 'cdata-in-html-content': true,
166
+ 'character-reference-outside-unicode-range': true,
167
+ 'control-character-in-input-stream': true,
168
+ 'control-character-reference': true,
169
+ 'eof-before-tag-name': true,
170
+ 'eof-in-cdata': true,
171
+ 'eof-in-comment': true,
172
+ 'eof-in-tag': true,
173
+ 'incorrectly-closed-comment': true,
174
+ 'incorrectly-opened-comment': true,
175
+ 'invalid-first-character-of-tag-name': true,
176
+ 'missing-attribute-value': true,
177
+ 'missing-end-tag-name': true,
178
+ 'missing-semicolon-after-character-reference': true,
179
+ 'missing-whitespace-between-attributes': true,
180
+ 'nested-comment': true,
181
+ 'noncharacter-character-reference': true,
182
+ 'noncharacter-in-input-stream': true,
183
+ 'null-character-reference': true,
184
+ 'surrogate-character-reference': true,
185
+ 'surrogate-in-input-stream': true,
186
+ 'unexpected-character-in-attribute-name': true,
187
+ 'unexpected-character-in-unquoted-attribute-value': true,
188
+ 'unexpected-equals-sign-before-attribute-name': true,
189
+ 'unexpected-null-character': true,
190
+ 'unexpected-question-mark-instead-of-tag-name': true,
191
+ 'unexpected-solidus-in-tag': true,
192
+ 'unknown-named-character-reference': true,
193
+ 'end-tag-with-attributes': true,
194
+ 'duplicate-attribute': true,
195
+ 'end-tag-with-trailing-solidus': true,
196
+ 'non-void-html-element-start-tag-with-trailing-solidus': false,
197
+ 'x-invalid-end-tag': true,
198
+ 'x-invalid-namespace': true
199
+ }],
200
+ 'vue/multiline-html-element-content-newline': 0,
201
+ 'vue/singleline-html-element-content-newline': 0,
202
+ 'vue/no-use-v-if-with-v-for': [1, {
203
+ "allowUsingIterationVar": true
204
+ }],
205
+ 'vue/require-prop-type-constructor': 0,
206
+ 'vue/html-closing-bracket-newline': 0,
207
+ 'vue/arrow-spacing': [2, {
208
+ 'before': true,
209
+ 'after': true
210
+ }],
211
+ 'vue/block-spacing': [2, 'always'],
212
+ 'vue/brace-style': [1, 'stroustrup', { 'allowSingleLine': true }],
213
+ 'vue/comma-dangle': [1, 'never'],
214
+ 'vue/key-spacing': [1, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
215
+ // "vue/keyword-spacing": [2, {"after": true}],
216
+ // 'vue/no-empty-pattern': 2,
217
+ 'vue/object-curly-spacing': [1, 'always', { objectsInObjects: true }],
218
+ "vue/space-infix-ops": 1,
219
+ 'vue/space-unary-ops': [2, {
220
+ 'words': true,
221
+ 'nonwords': false
222
+ }],
223
+ 'vue/custom-event-name-casing': 0,
224
+ 'vue/no-mutating-props': 0,
225
+ 'vue/component-tags-order': 0,
226
+ 'vue/require-prop-types': 0
227
+ }
228
+ }
@@ -0,0 +1,12 @@
1
+ *.log
2
+ .cache
3
+ .DS_Store
4
+ .idea
5
+ build
6
+ dist
7
+ node_modules
8
+ .gitkeep
9
+ converage
10
+ .history
11
+ .idea
12
+ *.zip
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ plugins: [
3
+ require('autoprefixer'),
4
+ require('postcss-unit-processor')({
5
+ processor: (value, unit) => {
6
+ if (unit === 'px') {
7
+ return value / 2;
8
+ }
9
+ }
10
+ })
11
+ ]
12
+ }
package/tpl/README.md ADDED
@@ -0,0 +1 @@
1
+ README
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div class="component-editor">
3
+ 你可以在这里自己开发属性编辑器,扩展更高级的功能
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'maliangeditor',
10
+ props: {
11
+ // 编辑器会传递给编辑面板组件的属性值,编辑器可以修改这些值来达到控制组件数据的作用
12
+ componentInfo: { // 固定字段,收集所有属性值
13
+ type: [Object],
14
+ default () {
15
+ return {
16
+ }
17
+ }
18
+ }
19
+ },
20
+ data: function () {
21
+ return {
22
+ usedatasource: false,
23
+ }
24
+ },
25
+ computed: {
26
+ },
27
+ watch: {
28
+ 'componentInfo': {
29
+ handler (v) {
30
+ console.log(v)
31
+ },
32
+ deep: true
33
+ }
34
+ },
35
+ mounted: function () {
36
+ },
37
+ methods: {
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <style lang="scss" scoped>
43
+ .component-editor {
44
+ }
45
+ </style>
package/tpl/icon.png ADDED
Binary file
@@ -0,0 +1,7 @@
1
+ {
2
+ "include": [
3
+ "./editor/**/*",
4
+ "./preview/**/*",
5
+ "./src/**/*"
6
+ ]
7
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "<%= name %>",
3
+ "label": "<%= label %>",
4
+ "version": "1.0.0",
5
+ "description": "<%= description %>",
6
+ "type": <%= type %>,
7
+ "private": true,
8
+ "keywords": [],
9
+ "scripts": {
10
+ "editor": "cross-env NODE_ENV=development PREVIEW_ENV=editor webpack-dev-server --mode development",
11
+ "dev": "cross-env NODE_ENV=development PREVIEW_ENV=local webpack-dev-server --mode development",
12
+ "build": "rm -rf dist && cross-env NODE_ENV=production webpack --mode production --hide-modules",
13
+ "start": "npm run dev",
14
+ "dist": "npm run build"
15
+ },
16
+ "style": {},
17
+ "dependencies": {
18
+ "axios": "^0.21.1",
19
+ "element-ui": "2.4.6",
20
+ "size-sensor": "^0.2.6",
21
+ "vue": "^2.5.9",
22
+ "vue-draggable-resizable": "^2.3.0"
23
+ },
24
+ "devDependencies": {
25
+ "@babel/core": "^7.13.10",
26
+ "@babel/eslint-parser": "^7.13.10",
27
+ "@babel/plugin-transform-runtime": "^7.13.10",
28
+ "@babel/preset-env": "^7.13.10",
29
+ "autoprefixer": "^9.0.1",
30
+ "babel-loader": "^8.2.2",
31
+ "babel-preset-stage-3": "^6.24.1",
32
+ "cross-env": "^5.0.5",
33
+ "css-loader": "^5.0.0",
34
+ "ejs-loader": "^0.4.0",
35
+ "eslint": "^7.22.0",
36
+ "eslint-config-standard": "^16.0.2",
37
+ "eslint-friendly-formatter": "^4.0.1",
38
+ "eslint-loader": "^4.0.2",
39
+ "eslint-plugin-html": "^6.1.2",
40
+ "eslint-plugin-import": "^2.7.0",
41
+ "eslint-plugin-node": "^5.2.0",
42
+ "eslint-plugin-promise": "^3.4.0",
43
+ "eslint-plugin-standard": "^3.0.1",
44
+ "eslint-plugin-vue": "^7.7.0",
45
+ "file-loader": "^1.1.4",
46
+ "html-webpack-plugin": "^3.0.0",
47
+ "less": "^3.8.0",
48
+ "less-loader": "^4.1.0",
49
+ "postcss": "^8.3.5",
50
+ "postcss-loader": "^4.3.0",
51
+ "postcss-unit-processor": "^1.0.1",
52
+ "sass": "^1.32.8",
53
+ "sass-loader": "^10.1.1",
54
+ "stylus": "^0.54.8",
55
+ "stylus-loader": "^3.0.2",
56
+ "uglifyjs-webpack-plugin": "^2.2.0",
57
+ "url-loader": "^4.1.1",
58
+ "vue-loader": "^15.9.6",
59
+ "vue-style-loader": "^4.1.3",
60
+ "vue-template-compiler": "^2.5.9",
61
+ "webpack": "^4.46.0",
62
+ "webpack-cli": "^3.3.12",
63
+ "webpack-dev-server": "^3.3.2",
64
+ "webpack-merge": "^4.1.3"
65
+ }
66
+ }