@winjs-dev/create-win 1.0.0-alpha.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/LICENSE +21 -0
- package/README.md +195 -0
- package/bin/create-win.js +4 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +23 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +396 -0
- package/dist/template.d.ts +13 -0
- package/dist/template.js +123 -0
- package/package.json +36 -0
- package/templates/app/.cursor/rules/clean-code.mdc +55 -0
- package/templates/app/.cursor/rules/general.mdc +51 -0
- package/templates/app/.cursor/rules/git-conventional-commit-messages.mdc +127 -0
- package/templates/app/.cursor/rules/gitflow.mdc +111 -0
- package/templates/app/.cursor/rules/project-structure.mdc +69 -0
- package/templates/app/.cursor/rules/typescript.mdc +57 -0
- package/templates/app/.cursor/rules/vue.mdc +86 -0
- package/templates/app/.editorconfig.tpl +23 -0
- package/templates/app/.eslintignore +13 -0
- package/templates/app/.eslintrc.js +9 -0
- package/templates/app/.gitignore.tpl +55 -0
- package/templates/app/.husky/commit-msg +6 -0
- package/templates/app/.husky/pre-commit +5 -0
- package/templates/app/.lintstagedrc.tpl +5 -0
- package/templates/app/.npmrc.tpl +2 -0
- package/templates/app/.prettierignore +13 -0
- package/templates/app/.prettierrc.js +4 -0
- package/templates/app/.stylelintignore +6 -0
- package/templates/app/.stylelintrc.js +16 -0
- package/templates/app/.winrc.ts.tpl +95 -0
- package/templates/app/README.md +244 -0
- package/templates/app/commitlint.config.js +3 -0
- package/templates/app/f2elint.config.js +6 -0
- package/templates/app/package.json.tpl +34 -0
- package/templates/app/plugin.ts.tpl +23 -0
- package/templates/app/src/app.js +55 -0
- package/templates/app/src/assets/fonts/demo.css +412 -0
- package/templates/app/src/assets/fonts/demo_fontclass.html +42 -0
- package/templates/app/src/assets/fonts/demo_symbol.html +69 -0
- package/templates/app/src/assets/fonts/demo_unicode.html +77 -0
- package/templates/app/src/assets/fonts/iconfont.css +20 -0
- package/templates/app/src/assets/fonts/iconfont.eot +0 -0
- package/templates/app/src/assets/fonts/iconfont.js +96 -0
- package/templates/app/src/assets/fonts/iconfont.svg +36 -0
- package/templates/app/src/assets/fonts/iconfont.ttf +0 -0
- package/templates/app/src/assets/fonts/iconfont.woff +0 -0
- package/templates/app/src/assets/img/logo.png +0 -0
- package/templates/app/src/assets/js/.gitkeep +0 -0
- package/templates/app/src/assets/style/app.less +5 -0
- package/templates/app/src/assets/style/main.less +39 -0
- package/templates/app/src/assets/style/variable.less +53 -0
- package/templates/app/src/constant.js +5 -0
- package/templates/app/src/global.less +1 -0
- package/templates/app/src/icons/cat.svg +1 -0
- package/templates/app/src/icons/dog.svg +1 -0
- package/templates/app/src/layouts/index.vue +15 -0
- package/templates/app/src/pages/docs.vue +5 -0
- package/templates/app/src/pages/hello/index.vue +88 -0
- package/templates/app/src/pages/hello/style.less +41 -0
- package/templates/app/src/pages/index.vue +9 -0
- package/templates/app/src/services/RESTFULURL.js +3 -0
- package/templates/app/src/services/autoMatchBaseUrl.js +18 -0
- package/templates/app/src/services/index.js +11 -0
- package/templates/app/src/services/request.js +178 -0
- package/templates/app/tsconfig.json.tpl +3 -0
- package/templates/app/typings.d.ts +1 -0
- package/templates/pc/.cursor/rules/clean-code.mdc +55 -0
- package/templates/pc/.cursor/rules/general.mdc +51 -0
- package/templates/pc/.cursor/rules/git-conventional-commit-messages.mdc +127 -0
- package/templates/pc/.cursor/rules/gitflow.mdc +111 -0
- package/templates/pc/.cursor/rules/project-structure.mdc +69 -0
- package/templates/pc/.cursor/rules/typescript.mdc +57 -0
- package/templates/pc/.cursor/rules/vue.mdc +86 -0
- package/templates/pc/.editorconfig.tpl +23 -0
- package/templates/pc/.eslintignore +13 -0
- package/templates/pc/.eslintrc.js +9 -0
- package/templates/pc/.gitignore.tpl +54 -0
- package/templates/pc/.husky/commit-msg +6 -0
- package/templates/pc/.husky/pre-commit +5 -0
- package/templates/pc/.lintstagedrc.tpl +5 -0
- package/templates/pc/.npmrc.tpl +2 -0
- package/templates/pc/.prettierignore +13 -0
- package/templates/pc/.prettierrc.js +4 -0
- package/templates/pc/.stylelintignore +6 -0
- package/templates/pc/.stylelintrc.js +16 -0
- package/templates/pc/.winrc.ts.tpl +74 -0
- package/templates/pc/README.md +255 -0
- package/templates/pc/commitlint.config.js +3 -0
- package/templates/pc/f2elint.config.js +6 -0
- package/templates/pc/package.json.tpl +33 -0
- package/templates/pc/plugin.ts.tpl +23 -0
- package/templates/pc/src/app.js +55 -0
- package/templates/pc/src/assets/fonts/demo.css +412 -0
- package/templates/pc/src/assets/fonts/demo_fontclass.html +42 -0
- package/templates/pc/src/assets/fonts/demo_symbol.html +69 -0
- package/templates/pc/src/assets/fonts/demo_unicode.html +77 -0
- package/templates/pc/src/assets/fonts/iconfont.css +20 -0
- package/templates/pc/src/assets/fonts/iconfont.eot +0 -0
- package/templates/pc/src/assets/fonts/iconfont.js +96 -0
- package/templates/pc/src/assets/fonts/iconfont.svg +36 -0
- package/templates/pc/src/assets/fonts/iconfont.ttf +0 -0
- package/templates/pc/src/assets/fonts/iconfont.woff +0 -0
- package/templates/pc/src/assets/img/logo.png +0 -0
- package/templates/pc/src/assets/js/.gitkeep +0 -0
- package/templates/pc/src/assets/style/app.less +5 -0
- package/templates/pc/src/assets/style/main.less +39 -0
- package/templates/pc/src/assets/style/variable.less +53 -0
- package/templates/pc/src/constant.js +5 -0
- package/templates/pc/src/global.less +1 -0
- package/templates/pc/src/icons/cat.svg +1 -0
- package/templates/pc/src/icons/dog.svg +1 -0
- package/templates/pc/src/layouts/index.vue +16 -0
- package/templates/pc/src/pages/docs.vue +5 -0
- package/templates/pc/src/pages/hello/index.vue +88 -0
- package/templates/pc/src/pages/hello/style.less +41 -0
- package/templates/pc/src/pages/index.vue +9 -0
- package/templates/pc/src/services/RESTFULURL.js +3 -0
- package/templates/pc/src/services/autoMatchBaseUrl.js +18 -0
- package/templates/pc/src/services/index.js +11 -0
- package/templates/pc/src/services/request.js +178 -0
- package/templates/pc/tsconfig.json.tpl +3 -0
- package/templates/pc/typings.d.ts +1 -0
- package/templates/plugin/.fatherrc.ts +5 -0
- package/templates/plugin/.gitignore.tpl +2 -0
- package/templates/plugin/.npmrc.tpl +2 -0
- package/templates/plugin/README.md.tpl +29 -0
- package/templates/plugin/package.json.tpl +26 -0
- package/templates/plugin/src/index.ts.tpl +5 -0
- package/templates/plugin/tsconfig.json +19 -0
- package/templates/sample/.cursor/rules/clean-code.mdc +55 -0
- package/templates/sample/.cursor/rules/general.mdc +51 -0
- package/templates/sample/.cursor/rules/git-conventional-commit-messages.mdc +127 -0
- package/templates/sample/.cursor/rules/gitflow.mdc +111 -0
- package/templates/sample/.cursor/rules/project-structure.mdc +69 -0
- package/templates/sample/.cursor/rules/typescript.mdc +57 -0
- package/templates/sample/.cursor/rules/vue.mdc +86 -0
- package/templates/sample/.editorconfig.tpl +23 -0
- package/templates/sample/.gitignore.tpl +19 -0
- package/templates/sample/.npmrc.tpl +2 -0
- package/templates/sample/.winrc.ts.tpl +7 -0
- package/templates/sample/package.json.tpl +21 -0
- package/templates/sample/plugin.ts.tpl +7 -0
- package/templates/sample/src/assets/img/logo.png +0 -0
- package/templates/sample/src/layouts/index.vue +8 -0
- package/templates/sample/src/pages/docs.vue +5 -0
- package/templates/sample/src/pages/hello/index.vue +77 -0
- package/templates/sample/src/pages/hello/style.less +41 -0
- package/templates/sample/src/pages/index.vue +9 -0
- package/templates/sample/tsconfig.json.tpl +3 -0
- package/templates/sample/typings.d.ts +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{{ projectName }}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"buildVersion": "V202101-00-000",
|
|
5
|
+
"private": true,
|
|
6
|
+
"author": "{{{ author }}}",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "win dev",
|
|
9
|
+
"build": "win build",
|
|
10
|
+
"postinstall": "win setup",
|
|
11
|
+
"setup": "win setup",
|
|
12
|
+
"start": "npm run dev",
|
|
13
|
+
"preview": "win preview"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@winner-fed/winjs": "{{{ version }}}"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.0.3"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 以下仅为事例代码,可以随意扩展修改
|
|
5
|
+
*/
|
|
6
|
+
const title = ref('Welcome to Your Vue.js App.');
|
|
7
|
+
</script>
|
|
8
|
+
<template>
|
|
9
|
+
<div class="page page-hello">
|
|
10
|
+
<div class="page-content">
|
|
11
|
+
<!-- 静态资源路径写法事例 -->
|
|
12
|
+
<img class="logo" src="@/assets/img/logo.png" alt="logo" />
|
|
13
|
+
<h1>{{ title }}</h1>
|
|
14
|
+
<p>
|
|
15
|
+
有关自定义配置指引, 请前往
|
|
16
|
+
<a
|
|
17
|
+
href="https://cloud-templates.github.io/create-project/"
|
|
18
|
+
target="_blank"
|
|
19
|
+
rel="noopener"
|
|
20
|
+
>create-project 文档</a
|
|
21
|
+
>.
|
|
22
|
+
</p>
|
|
23
|
+
<div class="demo">
|
|
24
|
+
<h3>方法示例</h3>
|
|
25
|
+
<pre>
|
|
26
|
+
<script setup>
|
|
27
|
+
/**
|
|
28
|
+
* 以下仅为事例代码,可以随意扩展修改
|
|
29
|
+
*/
|
|
30
|
+
// 工具类
|
|
31
|
+
import { formatDate } from '
|
|
32
|
+
import { ref } from '
|
|
33
|
+
import services from '
|
|
34
|
+
utils';
|
|
35
|
+
vue';
|
|
36
|
+
@/services';
|
|
37
|
+
|
|
38
|
+
const msg = ref('Welcome to Your Vue.js App.This a composition-api and setup demo');
|
|
39
|
+
const message = ref('现在时间是:' + formatDate(Date.now()));
|
|
40
|
+
|
|
41
|
+
function movieComingSoon () {
|
|
42
|
+
const data = {};
|
|
43
|
+
services
|
|
44
|
+
.octocat({
|
|
45
|
+
method: 'get',
|
|
46
|
+
data
|
|
47
|
+
})
|
|
48
|
+
.then((res) => {
|
|
49
|
+
console.log('接口请求成功:' + JSON.stringify(res, null, 2));
|
|
50
|
+
})
|
|
51
|
+
.catch((err) => {
|
|
52
|
+
console.log('接口请求异常:' + err);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
movieComingSoon();
|
|
57
|
+
</script>
|
|
58
|
+
<template>
|
|
59
|
+
<div class="page page-hello">
|
|
60
|
+
<div class="page-content">
|
|
61
|
+
<!-- 静态资源路径写法事例 -->
|
|
62
|
+
<img src="@/assets/img/logo.png" />
|
|
63
|
+
<h1 v-text="msg"></h1>
|
|
64
|
+
<h2 v-text="message"></h2>
|
|
65
|
+
<svg-icon icon-name="dog"></svg-icon>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<style lang="less" scoped src="./style.less"></style>
|
|
71
|
+
</pre>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<style lang="less" scoped src="./style.less"></style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.page-hello {
|
|
2
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
-webkit-font-smoothing: antialiased;
|
|
4
|
+
-moz-osx-font-smoothing: grayscale;
|
|
5
|
+
color: #2c3e50;
|
|
6
|
+
|
|
7
|
+
.icons {
|
|
8
|
+
font-size: 30px;
|
|
9
|
+
color: #ff5648;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page-content {
|
|
13
|
+
padding: 0 15px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
h1 {
|
|
17
|
+
margin-bottom: 20px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
p {
|
|
22
|
+
line-height: 23px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
color: #42b983;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.logo {
|
|
30
|
+
width: 200px;
|
|
31
|
+
height: 200px;
|
|
32
|
+
display: block;
|
|
33
|
+
margin: 30px auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.demo {
|
|
37
|
+
padding-top: 25px;
|
|
38
|
+
margin: 0 auto;
|
|
39
|
+
text-align: left;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'win/typings';
|