create-blocklet 0.2.16 → 0.3.0
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/README.md +8 -3
- package/common/.github/workflows/main.yml +5 -5
- package/common/.husky/pre-commit +4 -0
- package/common/_eslintignore +10 -0
- package/common/_eslintrc.js +1 -0
- package/common/_gitignore +15 -9
- package/common/logo.png +0 -0
- package/common/public/favicon.ico +0 -0
- package/index.js +177 -105
- package/lib/arcblock.js +3 -1
- package/lib/git.js +25 -0
- package/lib/index.js +17 -5
- package/lib/npm.js +7 -9
- package/lib/server.js +26 -20
- package/package.json +18 -16
- package/template-dapp/react/README.md +5 -5
- package/template-dapp/react/{server → api}/hooks/pre-start.js +0 -0
- package/template-dapp/react/{server → api}/index.js +0 -0
- package/template-dapp/react/{server → api}/libs/auth.js +0 -0
- package/template-dapp/react/{server → api}/libs/env.js +0 -0
- package/template-dapp/react/{server → api}/libs/logger.js +0 -0
- package/template-dapp/{vue2/server → react/api}/routes/index.js +1 -1
- package/template-dapp/react/blocklet.yml +6 -6
- package/template-dapp/react/package.json +35 -23
- package/template-dapp/react/public/index.html +1 -3
- package/template-dapp/react/src/app.js +8 -8
- package/template-dapp/vue/.browserslistrc +4 -0
- package/template-dapp/vue/.eslintrc.js +25 -0
- package/template-dapp/vue/{server → api}/hooks/pre-start.js +0 -0
- package/template-dapp/vue/{server → api}/index.js +0 -0
- package/template-dapp/vue/{server → api}/libs/auth.js +0 -0
- package/template-dapp/vue/{server → api}/libs/env.js +0 -0
- package/template-dapp/vue/{server → api}/libs/logger.js +0 -0
- package/template-dapp/{react/server → vue/api}/routes/index.js +1 -1
- package/template-dapp/vue/blocklet.yml +6 -5
- package/template-dapp/vue/index.html +2 -3
- package/template-dapp/vue/package.json +38 -21
- package/template-dapp/vue/src/App.vue +4 -2
- package/template-dapp/vue/vite.config.js +8 -6
- package/template-dapp/vue2/.browserslistrc +4 -0
- package/template-dapp/vue2/.eslintrc.js +14 -0
- package/template-dapp/vue2/{server → api}/hooks/pre-start.js +0 -0
- package/template-dapp/vue2/{server → api}/index.js +0 -0
- package/template-dapp/vue2/{server → api}/libs/auth.js +0 -0
- package/template-dapp/vue2/{server → api}/libs/env.js +0 -0
- package/template-dapp/vue2/{server → api}/libs/logger.js +0 -0
- package/template-dapp/{vue/server → vue2/api}/routes/index.js +1 -1
- package/template-dapp/vue2/blocklet.yml +7 -5
- package/template-dapp/vue2/jsconfig.json +19 -0
- package/template-dapp/vue2/package.json +38 -43
- package/template-dapp/vue2/public/index.html +2 -9
- package/template-dapp/vue2/src/App.vue +17 -1
- package/template-dapp/vue2/src/main.js +0 -2
- package/template-dapp/vue2/vue.config.js +0 -1
- package/template-static/blocklet-page/package.json +5 -5
- package/template-static/react/blocklet.yml +3 -3
- package/template-static/react/package.json +21 -9
- package/template-static/react/public/index.html +1 -3
- package/template-static/react/src/app.js +8 -8
- package/template-static/vue/.browserslistrc +4 -0
- package/template-static/vue/.eslintrc.js +25 -0
- package/template-static/vue/blocklet.yml +3 -3
- package/template-static/vue/index.html +2 -3
- package/template-static/vue/package.json +25 -8
- package/template-static/vue/vite.config.js +8 -6
- package/template-static/vue2/.browserslistrc +4 -0
- package/template-static/vue2/.eslintrc.js +14 -0
- package/template-static/vue2/blocklet.yml +3 -3
- package/template-static/vue2/jsconfig.json +19 -0
- package/template-static/vue2/package.json +25 -30
- package/template-static/vue2/public/index.html +2 -9
- package/template-static/vue2/src/App.vue +7 -1
- package/template-static/vue2/src/main.js +0 -2
- package/template-static/vue2/vue.config.js +0 -3
- package/common/public/favicon.svg +0 -1
- package/template-dapp/vue2/src/pages/About.vue +0 -13
- package/template-dapp/vue2/src/pages/Home.vue +0 -27
- package/template-dapp/vue2/src/router.js +0 -24
- package/template-static/vue2/src/pages/About.vue +0 -13
- package/template-static/vue2/src/pages/Home.vue +0 -20
- package/template-static/vue2/src/router.js +0 -24
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app">
|
|
3
|
-
<
|
|
3
|
+
<img alt="Vue logo" src="./assets/logo.png" />
|
|
4
|
+
<HelloWorld msg="Welcome to Your Vue.js App" />
|
|
4
5
|
</div>
|
|
5
6
|
</template>
|
|
6
7
|
|
|
7
8
|
<script>
|
|
9
|
+
import HelloWorld from './components/HelloWorld.vue';
|
|
10
|
+
|
|
8
11
|
export default {
|
|
9
12
|
name: 'App',
|
|
13
|
+
components: {
|
|
14
|
+
HelloWorld,
|
|
15
|
+
},
|
|
10
16
|
};
|
|
11
17
|
</script>
|
|
12
18
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="520" viewBox="0 0 45 52"><g fill="none" fill-rule="evenodd" stroke="#4F6AF5"><path d="M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"></path><path d="M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"></path></g></svg>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<img alt="Vue logo" src="../assets/logo.png" />
|
|
4
|
-
<div>
|
|
5
|
-
<router-link to="/about">About page</router-link>
|
|
6
|
-
</div>
|
|
7
|
-
<HelloWorld msg="Welcome to Your Vue.js App" />
|
|
8
|
-
<div :style="{ display: 'flex', justifyContent: 'center' }">
|
|
9
|
-
<pre :style="{ textAlign: 'left' }">
|
|
10
|
-
<code>{{ JSON.stringify(window.blocklet, null, 2) }}</code>
|
|
11
|
-
</pre>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import HelloWorld from '../components/HelloWorld.vue';
|
|
18
|
-
import api from '../libs/api';
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
components: {
|
|
22
|
-
HelloWorld,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style></style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import VueRouter from 'vue-router';
|
|
3
|
-
|
|
4
|
-
import Home from './pages/Home';
|
|
5
|
-
import About from './pages/About';
|
|
6
|
-
|
|
7
|
-
Vue.use(VueRouter);
|
|
8
|
-
const basename = window?.blocklet?.prefix || '/';
|
|
9
|
-
|
|
10
|
-
export default new VueRouter({
|
|
11
|
-
base: basename,
|
|
12
|
-
routes: [
|
|
13
|
-
{
|
|
14
|
-
path: '/',
|
|
15
|
-
name: 'home',
|
|
16
|
-
component: Home,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
path: '/about',
|
|
20
|
-
name: 'about',
|
|
21
|
-
component: About,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<img alt="Vue logo" src="../assets/logo.png" />
|
|
4
|
-
<div>
|
|
5
|
-
<router-link to="/about">About page</router-link>
|
|
6
|
-
</div>
|
|
7
|
-
<HelloWorld msg="Welcome to Your Vue.js App" />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import HelloWorld from '../components/HelloWorld.vue';
|
|
13
|
-
export default {
|
|
14
|
-
components: {
|
|
15
|
-
HelloWorld,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<style></style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import VueRouter from 'vue-router';
|
|
3
|
-
|
|
4
|
-
import Home from './pages/Home';
|
|
5
|
-
import About from './pages/About';
|
|
6
|
-
|
|
7
|
-
Vue.use(VueRouter);
|
|
8
|
-
const basename = window?.blocklet?.prefix || '/';
|
|
9
|
-
|
|
10
|
-
export default new VueRouter({
|
|
11
|
-
base: basename,
|
|
12
|
-
routes: [
|
|
13
|
-
{
|
|
14
|
-
path: '/',
|
|
15
|
-
name: 'home',
|
|
16
|
-
component: Home,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
path: '/about',
|
|
20
|
-
name: 'about',
|
|
21
|
-
component: About,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
});
|