system-phone 3.1.87 → 3.1.89

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.
Files changed (196) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.serena/project.yml +87 -0
  5. package/CHANGELOG.md +1 -1
  6. package/Dockerfile +3 -3
  7. package/README.md +36 -36
  8. package/build/css-loaders.js +34 -34
  9. package/build/dev-client.js +8 -8
  10. package/build/example-server.js +80 -80
  11. package/build/release.sh +28 -28
  12. package/build/utils.js +71 -71
  13. package/build/webpack.dev.conf.js +31 -31
  14. package/build/webpack.example.conf.js +49 -49
  15. package/build/webpack.prod.conf.js +60 -60
  16. package/build/webpack.test.conf.js +31 -31
  17. package/config/dev.env.js +6 -6
  18. package/config/index.js +38 -38
  19. package/config/prod.env.js +3 -3
  20. package/config/test.env.js +6 -6
  21. package/nginx.conf +304 -304
  22. package/package.json +101 -101
  23. package/release.bat +5 -5
  24. package/src/App.vue +25 -25
  25. package/src/Util.js +415 -415
  26. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  27. package/src/android-bootstrap/less/.csscomb.json +304 -304
  28. package/src/android-bootstrap/less/.csslintrc +19 -19
  29. package/src/android-bootstrap/less/alerts.less +73 -73
  30. package/src/android-bootstrap/less/badges.less +66 -66
  31. package/src/android-bootstrap/less/bootstrap.less +56 -56
  32. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  33. package/src/android-bootstrap/less/button-groups.less +247 -247
  34. package/src/android-bootstrap/less/buttons.less +173 -173
  35. package/src/android-bootstrap/less/carousel.less +269 -269
  36. package/src/android-bootstrap/less/close.less +34 -34
  37. package/src/android-bootstrap/less/code.less +69 -69
  38. package/src/android-bootstrap/less/component-animations.less +33 -33
  39. package/src/android-bootstrap/less/dropdowns.less +216 -216
  40. package/src/android-bootstrap/less/forms.less +626 -626
  41. package/src/android-bootstrap/less/glyphicons.less +305 -305
  42. package/src/android-bootstrap/less/grid.less +84 -84
  43. package/src/android-bootstrap/less/input-groups.less +167 -167
  44. package/src/android-bootstrap/less/jumbotron.less +52 -52
  45. package/src/android-bootstrap/less/labels.less +64 -64
  46. package/src/android-bootstrap/less/list-group.less +141 -141
  47. package/src/android-bootstrap/less/media.less +66 -66
  48. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  49. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  50. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  51. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  52. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  53. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  54. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  55. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  56. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  57. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  58. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  59. package/src/android-bootstrap/less/mixins/image.less +33 -33
  60. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  61. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  62. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  63. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  64. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  65. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  66. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  67. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  68. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  69. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  70. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  71. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  72. package/src/android-bootstrap/less/mixins/size.less +10 -10
  73. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  74. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  75. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  76. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  77. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  78. package/src/android-bootstrap/less/mixins.less +40 -40
  79. package/src/android-bootstrap/less/modals.less +151 -151
  80. package/src/android-bootstrap/less/navbar.less +660 -660
  81. package/src/android-bootstrap/less/navs.less +290 -290
  82. package/src/android-bootstrap/less/normalize.less +424 -424
  83. package/src/android-bootstrap/less/pager.less +76 -76
  84. package/src/android-bootstrap/less/pagination.less +89 -89
  85. package/src/android-bootstrap/less/panels.less +274 -274
  86. package/src/android-bootstrap/less/popovers.less +131 -131
  87. package/src/android-bootstrap/less/print.less +101 -101
  88. package/src/android-bootstrap/less/progress-bars.less +87 -87
  89. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  90. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  91. package/src/android-bootstrap/less/scaffolding.less +161 -161
  92. package/src/android-bootstrap/less/tables.less +262 -262
  93. package/src/android-bootstrap/less/theme.less +291 -291
  94. package/src/android-bootstrap/less/thumbnails.less +36 -36
  95. package/src/android-bootstrap/less/tooltip.less +102 -102
  96. package/src/android-bootstrap/less/type.less +303 -303
  97. package/src/android-bootstrap/less/utilities.less +55 -55
  98. package/src/android-bootstrap/less/variables.less +896 -896
  99. package/src/android-bootstrap/less/wells.less +29 -29
  100. package/src/assets//345/215/241/350/264/264/346/226/275/345/260/201.png +0 -0
  101. package/src/bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  102. package/src/bootstrap/less/.csscomb.json +304 -304
  103. package/src/bootstrap/less/.csslintrc +19 -19
  104. package/src/bootstrap/less/alerts.less +73 -73
  105. package/src/bootstrap/less/badges.less +66 -66
  106. package/src/bootstrap/less/bootstrap.less +56 -56
  107. package/src/bootstrap/less/breadcrumbs.less +26 -26
  108. package/src/bootstrap/less/button-groups.less +247 -247
  109. package/src/bootstrap/less/buttons.less +172 -172
  110. package/src/bootstrap/less/carousel.less +269 -269
  111. package/src/bootstrap/less/close.less +34 -34
  112. package/src/bootstrap/less/code.less +69 -69
  113. package/src/bootstrap/less/component-animations.less +33 -33
  114. package/src/bootstrap/less/dropdowns.less +216 -216
  115. package/src/bootstrap/less/forms.less +626 -626
  116. package/src/bootstrap/less/glyphicons.less +305 -305
  117. package/src/bootstrap/less/grid.less +84 -84
  118. package/src/bootstrap/less/input-groups.less +167 -167
  119. package/src/bootstrap/less/jumbotron.less +52 -52
  120. package/src/bootstrap/less/labels.less +64 -64
  121. package/src/bootstrap/less/list-group.less +141 -141
  122. package/src/bootstrap/less/media.less +66 -66
  123. package/src/bootstrap/less/mixins/alerts.less +14 -14
  124. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  125. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  126. package/src/bootstrap/less/mixins/buttons.less +69 -69
  127. package/src/bootstrap/less/mixins/center-block.less +7 -7
  128. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  129. package/src/bootstrap/less/mixins/forms.less +90 -90
  130. package/src/bootstrap/less/mixins/gradients.less +59 -59
  131. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  132. package/src/bootstrap/less/mixins/grid.less +122 -122
  133. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  134. package/src/bootstrap/less/mixins/image.less +33 -33
  135. package/src/bootstrap/less/mixins/labels.less +12 -12
  136. package/src/bootstrap/less/mixins/list-group.less +30 -30
  137. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  138. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  139. package/src/bootstrap/less/mixins/opacity.less +8 -8
  140. package/src/bootstrap/less/mixins/pagination.less +24 -24
  141. package/src/bootstrap/less/mixins/panels.less +24 -24
  142. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  143. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  144. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  145. package/src/bootstrap/less/mixins/resize.less +6 -6
  146. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  147. package/src/bootstrap/less/mixins/size.less +10 -10
  148. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  149. package/src/bootstrap/less/mixins/table-row.less +44 -44
  150. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  151. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  152. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  153. package/src/bootstrap/less/mixins.less +40 -40
  154. package/src/bootstrap/less/modals.less +151 -151
  155. package/src/bootstrap/less/navbar.less +660 -660
  156. package/src/bootstrap/less/navs.less +286 -286
  157. package/src/bootstrap/less/normalize.less +424 -424
  158. package/src/bootstrap/less/pager.less +76 -76
  159. package/src/bootstrap/less/pagination.less +89 -89
  160. package/src/bootstrap/less/panels.less +275 -275
  161. package/src/bootstrap/less/popovers.less +131 -131
  162. package/src/bootstrap/less/print.less +101 -101
  163. package/src/bootstrap/less/progress-bars.less +87 -87
  164. package/src/bootstrap/less/responsive-embed.less +35 -35
  165. package/src/bootstrap/less/responsive-utilities.less +194 -194
  166. package/src/bootstrap/less/scaffolding.less +161 -161
  167. package/src/bootstrap/less/tables.less +262 -262
  168. package/src/bootstrap/less/theme.less +291 -291
  169. package/src/bootstrap/less/thumbnails.less +36 -36
  170. package/src/bootstrap/less/tooltip.less +102 -102
  171. package/src/bootstrap/less/type.less +303 -303
  172. package/src/bootstrap/less/utilities.less +55 -55
  173. package/src/bootstrap/less/variables.less +895 -895
  174. package/src/bootstrap/less/wells.less +29 -29
  175. package/src/components/AloneLoadParams.vue +26 -26
  176. package/src/components/EncryptUtil.js +53 -53
  177. package/src/components/LoadAppdata.vue +38 -38
  178. package/src/components/LoginApp.vue +775 -775
  179. package/src/components/SystemSetUp.vue +8 -0
  180. package/src/components/Test.vue +14 -14
  181. package/src/plugins/GetStringData.js +18 -18
  182. package/src/plugins/LoadParams.js +24 -24
  183. package/src/services/ConfigService.js +24 -24
  184. package/static/app.json +4 -4
  185. package/static/globals.txt +74 -74
  186. package/test/unit/.eslintrc +5 -5
  187. package/test/unit/TestUtil.js +35 -35
  188. package/test/unit/context.html +20 -20
  189. package/test/unit/index.js +13 -13
  190. package/test/unit/init.js +13 -13
  191. package/test/unit/karma.conf.js +50 -50
  192. package/test/unit/specs/App.spec.js +17 -17
  193. package/test/unit/specs/Test.spec.js +28 -28
  194. package/test/unit/specs/components/LoginApp.spec.js +21 -21
  195. package/test/unit/specs/sevices/ConfigService.spec.js +23 -23
  196. package/test/unit/specs/sevices/GetDBTest.spec.js +28 -28
package/.babelrc CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "presets": ["es2015", "stage-2"],
3
- "plugins": ["transform-runtime"],
4
- "comments": false
5
- }
1
+ {
2
+ "presets": ["es2015", "stage-2"],
3
+ "plugins": ["transform-runtime"],
4
+ "comments": false
5
+ }
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/.eslintrc.js CHANGED
@@ -1,16 +1,16 @@
1
- module.exports = {
2
- root: true,
3
- // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
4
- extends: 'standard',
5
- // required to lint *.vue files
6
- plugins: [
7
- 'eslint-plugin-html'
8
- ],
9
- // add your custom rules here
10
- 'rules': {
11
- // allow paren-less arrow functions
12
- 'arrow-parens': 0,
13
- // allow debugger during development
14
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
15
- }
16
- }
1
+ module.exports = {
2
+ root: true,
3
+ // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
4
+ extends: 'standard',
5
+ // required to lint *.vue files
6
+ plugins: [
7
+ 'eslint-plugin-html'
8
+ ],
9
+ // add your custom rules here
10
+ 'rules': {
11
+ // allow paren-less arrow functions
12
+ 'arrow-parens': 0,
13
+ // allow debugger during development
14
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
15
+ }
16
+ }
@@ -0,0 +1,87 @@
1
+ # list of languages for which language servers are started; choose from:
2
+ # al bash clojure cpp csharp csharp_omnisharp
3
+ # dart elixir elm erlang fortran fsharp
4
+ # go groovy haskell java julia kotlin
5
+ # lua markdown nix pascal perl php
6
+ # powershell python python_jedi r rego ruby
7
+ # ruby_solargraph rust scala swift terraform toml
8
+ # typescript typescript_vts yaml zig
9
+ # Note:
10
+ # - For C, use cpp
11
+ # - For JavaScript, use typescript
12
+ # - For Free Pascal / Lazarus, use pascal
13
+ # Special requirements:
14
+ # - csharp: Requires the presence of a .sln file in the project folder.
15
+ # - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus.
16
+ # When using multiple languages, the first language server that supports a given file will be used for that file.
17
+ # The first language is the default language and the respective language server will be used as a fallback.
18
+ # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
19
+ languages:
20
+ - vue
21
+
22
+ # the encoding used by text files in the project
23
+ # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
24
+ encoding: "utf-8"
25
+
26
+ # whether to use the project's gitignore file to ignore files
27
+ # Added on 2025-04-07
28
+ ignore_all_files_in_gitignore: true
29
+
30
+ # list of additional paths to ignore
31
+ # same syntax as gitignore, so you can use * and **
32
+ # Was previously called `ignored_dirs`, please update your config if you are using that.
33
+ # Added (renamed) on 2025-04-07
34
+ ignored_paths: []
35
+
36
+ # whether the project is in read-only mode
37
+ # If set to true, all editing tools will be disabled and attempts to use them will result in an error
38
+ # Added on 2025-04-18
39
+ read_only: false
40
+
41
+ # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
42
+ # Below is the complete list of tools for convenience.
43
+ # To make sure you have the latest list of tools, and to view their descriptions,
44
+ # execute `uv run scripts/print_tool_overview.py`.
45
+ #
46
+ # * `activate_project`: Activates a project by name.
47
+ # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
48
+ # * `create_text_file`: Creates/overwrites a file in the project directory.
49
+ # * `delete_lines`: Deletes a range of lines within a file.
50
+ # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
51
+ # * `execute_shell_command`: Executes a shell command.
52
+ # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
53
+ # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
54
+ # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
55
+ # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
56
+ # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
57
+ # * `initial_instructions`: Gets the initial instructions for the current project.
58
+ # Should only be used in settings where the system prompt cannot be set,
59
+ # e.g. in clients you have no control over, like Claude Desktop.
60
+ # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
61
+ # * `insert_at_line`: Inserts content at a given line in a file.
62
+ # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
63
+ # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
64
+ # * `list_memories`: Lists memories in Serena's project-specific memory store.
65
+ # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
66
+ # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
67
+ # * `read_file`: Reads a file within the project directory.
68
+ # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
69
+ # * `remove_project`: Removes a project from the Serena configuration.
70
+ # * `replace_lines`: Replaces a range of lines within a file with new content.
71
+ # * `replace_symbol_body`: Replaces the full definition of a symbol.
72
+ # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
73
+ # * `search_for_pattern`: Performs a search for a pattern in the project.
74
+ # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
75
+ # * `switch_modes`: Activates modes by providing a list of their names
76
+ # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
77
+ # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
78
+ # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
79
+ # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
80
+ excluded_tools: []
81
+
82
+ # initial prompt for the project. It will always be given to the LLM upon activating the project
83
+ # (contrary to the memories, which are loaded on demand).
84
+ initial_prompt: ""
85
+
86
+ project_name: "SystemPhone"
87
+ included_optional_tools: []
package/CHANGELOG.md CHANGED
@@ -1,2 +1,2 @@
1
- # Change Log
1
+ # Change Log
2
2
  所有关于本产品的变化都在该文档里。
package/Dockerfile CHANGED
@@ -1,3 +1,3 @@
1
- FROM af/openresty
2
- COPY dist/ /usr/local/openresty/nginx/html
3
- COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
1
+ FROM af/openresty
2
+ COPY dist/ /usr/local/openresty/nginx/html
3
+ COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
package/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # SystemPhone
2
-
3
- #### 项目介绍
4
- System手机前端模块
5
-
6
- #### 软件架构
7
- 软件架构说明
8
-
9
-
10
- #### 安装教程
11
-
12
- 1. xxxx
13
- 2. xxxx
14
- 3. xxxx
15
-
16
- #### 使用说明
17
-
18
- 1. xxxx
19
- 2. xxxx
20
- 3. xxxx
21
-
22
- #### 参与贡献
23
-
24
- 1. Fork 本项目
25
- 2. 新建 Feat_xxx 分支
26
- 3. 提交代码
27
- 4. 新建 Pull Request
28
-
29
-
30
- #### 码云特技
31
-
32
- 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
33
- 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
34
- 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
35
- 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
36
- 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
1
+ # SystemPhone
2
+
3
+ #### 项目介绍
4
+ System手机前端模块
5
+
6
+ #### 软件架构
7
+ 软件架构说明
8
+
9
+
10
+ #### 安装教程
11
+
12
+ 1. xxxx
13
+ 2. xxxx
14
+ 3. xxxx
15
+
16
+ #### 使用说明
17
+
18
+ 1. xxxx
19
+ 2. xxxx
20
+ 3. xxxx
21
+
22
+ #### 参与贡献
23
+
24
+ 1. Fork 本项目
25
+ 2. 新建 Feat_xxx 分支
26
+ 3. 提交代码
27
+ 4. 新建 Pull Request
28
+
29
+
30
+ #### 码云特技
31
+
32
+ 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
33
+ 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
34
+ 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
35
+ 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
36
+ 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
37
37
  6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
@@ -1,34 +1,34 @@
1
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
2
-
3
- module.exports = function (options) {
4
- // generate loader string to be used with extract text plugin
5
- function generateLoaders (loaders) {
6
- var sourceLoader = loaders.map(function (loader) {
7
- var extraParamChar
8
- if (/\?/.test(loader)) {
9
- loader = loader.replace(/\?/, '-loader?')
10
- extraParamChar = '&'
11
- } else {
12
- loader = loader + '-loader'
13
- extraParamChar = '?'
14
- }
15
- return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
16
- }).join('!')
17
-
18
- if (options.extract) {
19
- return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
20
- } else {
21
- return ['vue-style-loader', sourceLoader].join('!')
22
- }
23
- }
24
-
25
- // http://vuejs.github.io/vue-loader/configurations/extract-css.html
26
- return {
27
- css: generateLoaders(['css']),
28
- less: generateLoaders(['css', 'less']),
29
- sass: generateLoaders(['css', 'sass?indentedSyntax']),
30
- scss: generateLoaders(['css', 'sass']),
31
- stylus: generateLoaders(['css', 'stylus']),
32
- styl: generateLoaders(['css', 'stylus'])
33
- }
34
- }
1
+ var ExtractTextPlugin = require('extract-text-webpack-plugin')
2
+
3
+ module.exports = function (options) {
4
+ // generate loader string to be used with extract text plugin
5
+ function generateLoaders (loaders) {
6
+ var sourceLoader = loaders.map(function (loader) {
7
+ var extraParamChar
8
+ if (/\?/.test(loader)) {
9
+ loader = loader.replace(/\?/, '-loader?')
10
+ extraParamChar = '&'
11
+ } else {
12
+ loader = loader + '-loader'
13
+ extraParamChar = '?'
14
+ }
15
+ return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
16
+ }).join('!')
17
+
18
+ if (options.extract) {
19
+ return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
20
+ } else {
21
+ return ['vue-style-loader', sourceLoader].join('!')
22
+ }
23
+ }
24
+
25
+ // http://vuejs.github.io/vue-loader/configurations/extract-css.html
26
+ return {
27
+ css: generateLoaders(['css']),
28
+ less: generateLoaders(['css', 'less']),
29
+ sass: generateLoaders(['css', 'sass?indentedSyntax']),
30
+ scss: generateLoaders(['css', 'sass']),
31
+ stylus: generateLoaders(['css', 'stylus']),
32
+ styl: generateLoaders(['css', 'stylus'])
33
+ }
34
+ }
@@ -1,8 +1,8 @@
1
- require('eventsource-polyfill')
2
- var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
3
-
4
- hotClient.subscribe(function (event) {
5
- if (event.action === 'reload') {
6
- window.location.reload()
7
- }
8
- })
1
+ require('eventsource-polyfill')
2
+ var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
3
+
4
+ hotClient.subscribe(function (event) {
5
+ if (event.action === 'reload') {
6
+ window.location.reload()
7
+ }
8
+ })
@@ -1,80 +1,80 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.example.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- var httpProxy = require('http-proxy')
6
-
7
- var app = express()
8
- var compiler = webpack(config)
9
- var proxy = httpProxy.createProxyServer()
10
-
11
- // Define HTTP proxies to your custom API backend
12
- // https://github.com/chimurai/http-proxy-middleware
13
- var proxyTable = {
14
- // '/api': {
15
- // target: 'http://jsonplaceholder.typicode.com',
16
- // changeOrigin: true,
17
- // pathRewrite: {
18
- // '^/api': ''
19
- // }
20
- // }
21
- }
22
-
23
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
24
- publicPath: config.output.publicPath,
25
- stats: {
26
- colors: true,
27
- chunks: false
28
- }
29
- })
30
-
31
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
32
- // force page reload when html-webpack-plugin template changes
33
- compiler.plugin('compilation', function (compilation) {
34
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
35
- hotMiddleware.publish({ action: 'reload' })
36
- cb()
37
- })
38
- })
39
-
40
- // proxy api requests
41
- Object.keys(proxyTable).forEach(function (context) {
42
- var options = proxyTable[context]
43
- if (typeof options === 'string') {
44
- options = { target: options }
45
- }
46
- app.use(proxyMiddleware(context, options))
47
- })
48
-
49
- // handle fallback for HTML5 history API
50
- app.use(require('connect-history-api-fallback')())
51
-
52
- // serve webpack bundle output
53
- app.use(devMiddleware)
54
-
55
- // enable hot-reload and state-preserving
56
- // compilation error display
57
- app.use(hotMiddleware)
58
-
59
- // serve pure static assets
60
- app.use('/static', express.static('./static'))
61
-
62
- // app.all('/images/*', function (req, res) {
63
- // proxy.web(req, res, {
64
- // target: 'http://127.0.0.1:82'
65
- // })
66
- // })
67
- //
68
- // app.all('/*', function (req, res) {
69
- // proxy.web(req, res, {
70
- // target: 'http://127.0.0.1:8082'
71
- // })
72
- // })
73
-
74
- module.exports = app.listen(8081, function (err) {
75
- if (err) {
76
- console.log(err)
77
- return
78
- }
79
- console.log('Listening at http://localhost:8081')
80
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.example.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ var httpProxy = require('http-proxy')
6
+
7
+ var app = express()
8
+ var compiler = webpack(config)
9
+ var proxy = httpProxy.createProxyServer()
10
+
11
+ // Define HTTP proxies to your custom API backend
12
+ // https://github.com/chimurai/http-proxy-middleware
13
+ var proxyTable = {
14
+ // '/api': {
15
+ // target: 'http://jsonplaceholder.typicode.com',
16
+ // changeOrigin: true,
17
+ // pathRewrite: {
18
+ // '^/api': ''
19
+ // }
20
+ // }
21
+ }
22
+
23
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
24
+ publicPath: config.output.publicPath,
25
+ stats: {
26
+ colors: true,
27
+ chunks: false
28
+ }
29
+ })
30
+
31
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
32
+ // force page reload when html-webpack-plugin template changes
33
+ compiler.plugin('compilation', function (compilation) {
34
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
35
+ hotMiddleware.publish({ action: 'reload' })
36
+ cb()
37
+ })
38
+ })
39
+
40
+ // proxy api requests
41
+ Object.keys(proxyTable).forEach(function (context) {
42
+ var options = proxyTable[context]
43
+ if (typeof options === 'string') {
44
+ options = { target: options }
45
+ }
46
+ app.use(proxyMiddleware(context, options))
47
+ })
48
+
49
+ // handle fallback for HTML5 history API
50
+ app.use(require('connect-history-api-fallback')())
51
+
52
+ // serve webpack bundle output
53
+ app.use(devMiddleware)
54
+
55
+ // enable hot-reload and state-preserving
56
+ // compilation error display
57
+ app.use(hotMiddleware)
58
+
59
+ // serve pure static assets
60
+ app.use('/static', express.static('./static'))
61
+
62
+ // app.all('/images/*', function (req, res) {
63
+ // proxy.web(req, res, {
64
+ // target: 'http://127.0.0.1:82'
65
+ // })
66
+ // })
67
+ //
68
+ // app.all('/*', function (req, res) {
69
+ // proxy.web(req, res, {
70
+ // target: 'http://127.0.0.1:8082'
71
+ // })
72
+ // })
73
+
74
+ module.exports = app.listen(8081, function (err) {
75
+ if (err) {
76
+ console.log(err)
77
+ return
78
+ }
79
+ console.log('Listening at http://localhost:8081')
80
+ })
package/build/release.sh CHANGED
@@ -1,28 +1,28 @@
1
- set -e
2
- echo "Enter release version: "
3
- read VERSION
4
-
5
- read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6
- echo # (optional) move to a new line
7
- if [[ $REPLY =~ ^[Yy]$ ]]
8
- then
9
- echo "Releasing $VERSION ..."
10
-
11
- # lint
12
- npm run lint 2>/dev/null
13
-
14
- # e2e
15
- npm run e2e 2>/dev/null
16
-
17
- #build
18
- npm run build
19
-
20
- # commit
21
- git add -A
22
- git commit -m "[build] $VERSION"
23
- npm version $VERSION --message "[release] $VERSION"
24
-
25
- # publish
26
- git push origin refs/tags/v$VERSION
27
- git push
28
- fi
1
+ set -e
2
+ echo "Enter release version: "
3
+ read VERSION
4
+
5
+ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6
+ echo # (optional) move to a new line
7
+ if [[ $REPLY =~ ^[Yy]$ ]]
8
+ then
9
+ echo "Releasing $VERSION ..."
10
+
11
+ # lint
12
+ npm run lint 2>/dev/null
13
+
14
+ # e2e
15
+ npm run e2e 2>/dev/null
16
+
17
+ #build
18
+ npm run build
19
+
20
+ # commit
21
+ git add -A
22
+ git commit -m "[build] $VERSION"
23
+ npm version $VERSION --message "[release] $VERSION"
24
+
25
+ # publish
26
+ git push origin refs/tags/v$VERSION
27
+ git push
28
+ fi