create-blocklet 0.4.78 → 0.4.80
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 +5 -1
- package/index.js +48 -61
- package/lib/utils.js +14 -5
- package/package.json +1 -1
- package/{common → templates/docsite}/.editorconfig +0 -0
- package/{common → templates/docsite}/.github/workflows/main.yml +0 -0
- package/{common → templates/docsite}/.github/workflows/pr-title.yml +0 -0
- package/{common → templates/docsite}/.github/workflows/version-check.yml +0 -0
- package/{common → templates/docsite}/.prettierrc +0 -0
- package/{common → templates/docsite}/LICENSE +0 -0
- package/{common → templates/docsite}/_gitignore +0 -0
- package/{common → templates/docsite}/_npmrc +0 -0
- package/{common → templates/docsite}/logo.png +0 -0
- package/templates/docsite/package.json +7 -3
- package/{common → templates/docsite}/public/favicon.ico +0 -0
- package/{common → templates/docsite}/public/robots.txt +0 -0
- package/{common → templates/docsite}/screenshots/.gitkeep +0 -0
- package/templates/docsite/scripts/build-clean.js +6 -0
- package/{common → templates/docsite}/scripts/bump-version.mjs +0 -0
- package/{common → templates/docsite}/version +0 -0
- package/templates/express-api/.editorconfig +23 -0
- package/templates/express-api/.github/workflows/main.yml +36 -0
- package/templates/express-api/.github/workflows/pr-title.yml +21 -0
- package/templates/express-api/.github/workflows/version-check.yml +20 -0
- package/{common → templates/express-api}/.husky/pre-commit +0 -0
- package/templates/express-api/.prettierrc +9 -0
- package/templates/express-api/LICENSE +13 -0
- package/templates/express-api/_gitignore +28 -0
- package/templates/express-api/_npmrc +3 -0
- package/templates/express-api/logo.png +0 -0
- package/templates/express-api/package.json +7 -3
- package/templates/express-api/public/favicon.ico +0 -0
- package/templates/express-api/public/robots.txt +3 -0
- package/{common → templates/express-api}/scripts/build-clean.js +0 -0
- package/templates/express-api/scripts/bump-version.mjs +33 -0
- package/templates/express-api/version +1 -0
- package/templates/html-static/.editorconfig +23 -0
- package/templates/html-static/.github/workflows/main.yml +36 -0
- package/templates/html-static/.github/workflows/pr-title.yml +21 -0
- package/templates/html-static/.github/workflows/version-check.yml +20 -0
- package/templates/html-static/.prettierrc +9 -0
- package/templates/html-static/LICENSE +13 -0
- package/templates/html-static/_gitignore +28 -0
- package/templates/html-static/_npmrc +3 -0
- package/templates/html-static/logo.png +0 -0
- package/templates/html-static/package.json +9 -3
- package/templates/html-static/public/favicon.ico +0 -0
- package/templates/html-static/public/robots.txt +3 -0
- package/templates/html-static/screenshots/.gitkeep +0 -0
- package/templates/html-static/scripts/build-clean.js +5 -0
- package/templates/html-static/scripts/bump-version.mjs +33 -0
- package/templates/html-static/version +1 -0
- package/templates/monorepo/README.md +1 -1
- package/templates/monorepo/package.json +1 -0
- package/templates/monorepo/scripts/bump-version.mjs +10 -5
- package/templates/nextjs-dapp/.editorconfig +23 -0
- package/templates/nextjs-dapp/.github/workflows/main.yml +36 -0
- package/templates/nextjs-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/nextjs-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/nextjs-dapp/.husky/pre-commit +4 -0
- package/templates/nextjs-dapp/.prettierrc +9 -0
- package/templates/nextjs-dapp/LICENSE +13 -0
- package/templates/nextjs-dapp/_gitignore +28 -0
- package/templates/nextjs-dapp/_npmrc +3 -0
- package/templates/nextjs-dapp/logo.png +0 -0
- package/templates/nextjs-dapp/package.json +7 -3
- package/templates/nextjs-dapp/public/favicon.ico +0 -0
- package/templates/nextjs-dapp/public/robots.txt +3 -0
- package/templates/nextjs-dapp/screenshots/.gitkeep +0 -0
- package/templates/nextjs-dapp/scripts/build-clean.js +5 -0
- package/templates/nextjs-dapp/scripts/bump-version.mjs +33 -0
- package/templates/nextjs-dapp/version +1 -0
- package/templates/react-dapp/.editorconfig +23 -0
- package/templates/react-dapp/.github/workflows/main.yml +36 -0
- package/templates/react-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/react-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/react-dapp/.husky/pre-commit +4 -0
- package/templates/react-dapp/.prettierrc +9 -0
- package/templates/react-dapp/LICENSE +13 -0
- package/templates/react-dapp/_gitignore +28 -0
- package/templates/react-dapp/_npmrc +3 -0
- package/templates/react-dapp/logo.png +0 -0
- package/templates/react-dapp/package.json +1 -1
- package/templates/react-dapp/public/favicon.ico +0 -0
- package/templates/react-dapp/public/robots.txt +3 -0
- package/templates/react-dapp/screenshots/.gitkeep +0 -0
- package/templates/react-dapp/scripts/build-clean.js +5 -0
- package/templates/react-dapp/scripts/bump-version.mjs +33 -0
- package/templates/react-dapp/version +1 -0
- package/templates/react-gun-dapp/.editorconfig +23 -0
- package/templates/react-gun-dapp/.github/workflows/main.yml +36 -0
- package/templates/react-gun-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/react-gun-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/react-gun-dapp/.husky/pre-commit +4 -0
- package/templates/react-gun-dapp/.prettierrc +9 -0
- package/templates/react-gun-dapp/LICENSE +13 -0
- package/templates/react-gun-dapp/_gitignore +28 -0
- package/templates/react-gun-dapp/_npmrc +3 -0
- package/templates/react-gun-dapp/logo.png +0 -0
- package/templates/react-gun-dapp/package.json +8 -4
- package/templates/react-gun-dapp/public/favicon.ico +0 -0
- package/templates/react-gun-dapp/public/robots.txt +3 -0
- package/templates/react-gun-dapp/screenshots/.gitkeep +0 -0
- package/templates/react-gun-dapp/scripts/build-clean.js +5 -0
- package/templates/react-gun-dapp/scripts/bump-version.mjs +33 -0
- package/templates/react-gun-dapp/version +1 -0
- package/templates/react-static/.editorconfig +23 -0
- package/templates/react-static/.github/workflows/main.yml +36 -0
- package/templates/react-static/.github/workflows/pr-title.yml +21 -0
- package/templates/react-static/.github/workflows/version-check.yml +20 -0
- package/templates/react-static/.husky/pre-commit +4 -0
- package/templates/react-static/.prettierrc +9 -0
- package/templates/react-static/LICENSE +13 -0
- package/templates/react-static/_gitignore +28 -0
- package/templates/react-static/_npmrc +3 -0
- package/templates/react-static/logo.png +0 -0
- package/templates/react-static/package.json +8 -4
- package/templates/react-static/public/favicon.ico +0 -0
- package/templates/react-static/public/robots.txt +3 -0
- package/templates/react-static/screenshots/.gitkeep +0 -0
- package/templates/react-static/scripts/build-clean.js +5 -0
- package/templates/react-static/scripts/bump-version.mjs +33 -0
- package/templates/react-static/version +1 -0
- package/templates/solidjs-dapp/.editorconfig +23 -0
- package/templates/solidjs-dapp/.github/workflows/main.yml +36 -0
- package/templates/solidjs-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/solidjs-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/solidjs-dapp/.husky/pre-commit +4 -0
- package/templates/solidjs-dapp/.prettierrc +9 -0
- package/templates/solidjs-dapp/LICENSE +13 -0
- package/templates/solidjs-dapp/_gitignore +28 -0
- package/templates/solidjs-dapp/_npmrc +3 -0
- package/templates/solidjs-dapp/logo.png +0 -0
- package/templates/solidjs-dapp/package.json +8 -4
- package/templates/solidjs-dapp/public/favicon.ico +0 -0
- package/templates/solidjs-dapp/public/robots.txt +3 -0
- package/templates/solidjs-dapp/screenshots/.gitkeep +0 -0
- package/templates/solidjs-dapp/scripts/build-clean.js +5 -0
- package/templates/solidjs-dapp/scripts/bump-version.mjs +33 -0
- package/templates/solidjs-dapp/version +1 -0
- package/templates/solidjs-static/.editorconfig +23 -0
- package/templates/solidjs-static/.github/workflows/main.yml +36 -0
- package/templates/solidjs-static/.github/workflows/pr-title.yml +21 -0
- package/templates/solidjs-static/.github/workflows/version-check.yml +20 -0
- package/templates/solidjs-static/.husky/pre-commit +4 -0
- package/templates/solidjs-static/.prettierrc +9 -0
- package/templates/solidjs-static/LICENSE +13 -0
- package/templates/solidjs-static/_gitignore +28 -0
- package/templates/solidjs-static/_npmrc +3 -0
- package/templates/solidjs-static/logo.png +0 -0
- package/templates/solidjs-static/package.json +8 -4
- package/templates/solidjs-static/public/favicon.ico +0 -0
- package/templates/solidjs-static/public/robots.txt +3 -0
- package/templates/solidjs-static/screenshots/.gitkeep +0 -0
- package/templates/solidjs-static/scripts/build-clean.js +5 -0
- package/templates/solidjs-static/scripts/bump-version.mjs +33 -0
- package/templates/solidjs-static/version +1 -0
- package/templates/svelte-dapp/.editorconfig +23 -0
- package/templates/svelte-dapp/.github/workflows/main.yml +36 -0
- package/templates/svelte-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/svelte-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/svelte-dapp/.husky/pre-commit +4 -0
- package/templates/svelte-dapp/.prettierrc +9 -0
- package/templates/svelte-dapp/LICENSE +13 -0
- package/templates/svelte-dapp/_gitignore +28 -0
- package/templates/svelte-dapp/_npmrc +3 -0
- package/templates/svelte-dapp/logo.png +0 -0
- package/templates/svelte-dapp/package.json +8 -4
- package/templates/svelte-dapp/public/favicon.ico +0 -0
- package/templates/svelte-dapp/public/robots.txt +3 -0
- package/templates/svelte-dapp/screenshots/.gitkeep +0 -0
- package/templates/svelte-dapp/scripts/build-clean.js +5 -0
- package/templates/svelte-dapp/scripts/bump-version.mjs +33 -0
- package/templates/svelte-dapp/version +1 -0
- package/templates/svelte-static/.editorconfig +23 -0
- package/templates/svelte-static/.github/workflows/main.yml +36 -0
- package/templates/svelte-static/.github/workflows/pr-title.yml +21 -0
- package/templates/svelte-static/.github/workflows/version-check.yml +20 -0
- package/templates/svelte-static/.husky/pre-commit +4 -0
- package/templates/svelte-static/.prettierrc +9 -0
- package/templates/svelte-static/LICENSE +13 -0
- package/templates/svelte-static/_gitignore +28 -0
- package/templates/svelte-static/_npmrc +3 -0
- package/templates/svelte-static/logo.png +0 -0
- package/templates/svelte-static/package.json +8 -4
- package/templates/svelte-static/public/favicon.ico +0 -0
- package/templates/svelte-static/public/robots.txt +3 -0
- package/templates/svelte-static/screenshots/.gitkeep +0 -0
- package/templates/svelte-static/scripts/build-clean.js +5 -0
- package/templates/svelte-static/scripts/bump-version.mjs +33 -0
- package/templates/svelte-static/version +1 -0
- package/templates/vue-dapp/.editorconfig +23 -0
- package/templates/vue-dapp/.github/workflows/main.yml +36 -0
- package/templates/vue-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/vue-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/vue-dapp/.husky/pre-commit +4 -0
- package/templates/vue-dapp/.prettierrc +9 -0
- package/templates/vue-dapp/LICENSE +13 -0
- package/templates/vue-dapp/_gitignore +28 -0
- package/templates/vue-dapp/_npmrc +3 -0
- package/templates/vue-dapp/logo.png +0 -0
- package/templates/vue-dapp/package.json +7 -3
- package/templates/vue-dapp/public/favicon.ico +0 -0
- package/templates/vue-dapp/public/robots.txt +3 -0
- package/templates/vue-dapp/screenshots/.gitkeep +0 -0
- package/templates/vue-dapp/scripts/build-clean.js +5 -0
- package/templates/vue-dapp/scripts/bump-version.mjs +33 -0
- package/templates/vue-dapp/version +1 -0
- package/templates/vue-static/.editorconfig +23 -0
- package/templates/vue-static/.github/workflows/main.yml +36 -0
- package/templates/vue-static/.github/workflows/pr-title.yml +21 -0
- package/templates/vue-static/.github/workflows/version-check.yml +20 -0
- package/templates/vue-static/.husky/pre-commit +4 -0
- package/templates/vue-static/.prettierrc +9 -0
- package/templates/vue-static/LICENSE +13 -0
- package/templates/vue-static/_gitignore +28 -0
- package/templates/vue-static/_npmrc +3 -0
- package/templates/vue-static/logo.png +0 -0
- package/templates/vue-static/package.json +8 -4
- package/templates/vue-static/public/favicon.ico +0 -0
- package/templates/vue-static/public/robots.txt +3 -0
- package/templates/vue-static/screenshots/.gitkeep +0 -0
- package/templates/vue-static/scripts/build-clean.js +5 -0
- package/templates/vue-static/scripts/bump-version.mjs +33 -0
- package/templates/vue-static/version +1 -0
- package/templates/vue2-dapp/.editorconfig +23 -0
- package/templates/vue2-dapp/.github/workflows/main.yml +36 -0
- package/templates/vue2-dapp/.github/workflows/pr-title.yml +21 -0
- package/templates/vue2-dapp/.github/workflows/version-check.yml +20 -0
- package/templates/vue2-dapp/.husky/pre-commit +4 -0
- package/templates/vue2-dapp/.prettierrc +9 -0
- package/templates/vue2-dapp/LICENSE +13 -0
- package/templates/vue2-dapp/_gitignore +28 -0
- package/templates/vue2-dapp/_npmrc +3 -0
- package/templates/vue2-dapp/logo.png +0 -0
- package/templates/vue2-dapp/package.json +7 -3
- package/templates/vue2-dapp/public/favicon.ico +0 -0
- package/templates/vue2-dapp/public/robots.txt +3 -0
- package/templates/vue2-dapp/screenshots/.gitkeep +0 -0
- package/templates/vue2-dapp/scripts/build-clean.js +5 -0
- package/templates/vue2-dapp/scripts/bump-version.mjs +33 -0
- package/templates/vue2-dapp/version +1 -0
- package/templates/vue2-static/.editorconfig +23 -0
- package/templates/vue2-static/.github/workflows/main.yml +36 -0
- package/templates/vue2-static/.github/workflows/pr-title.yml +21 -0
- package/templates/vue2-static/.github/workflows/version-check.yml +20 -0
- package/templates/vue2-static/.husky/pre-commit +4 -0
- package/templates/vue2-static/.prettierrc +9 -0
- package/templates/vue2-static/LICENSE +13 -0
- package/templates/vue2-static/_gitignore +28 -0
- package/templates/vue2-static/_npmrc +3 -0
- package/templates/vue2-static/logo.png +0 -0
- package/templates/vue2-static/package.json +7 -3
- package/templates/vue2-static/public/favicon.ico +0 -0
- package/templates/vue2-static/public/robots.txt +3 -0
- package/templates/vue2-static/screenshots/.gitkeep +0 -0
- package/templates/vue2-static/scripts/build-clean.js +5 -0
- package/templates/vue2-static/scripts/bump-version.mjs +33 -0
- package/templates/vue2-static/version +1 -0
- package/templates/website/.editorconfig +23 -0
- package/templates/website/.github/workflows/main.yml +36 -0
- package/templates/website/.github/workflows/pr-title.yml +21 -0
- package/templates/website/.github/workflows/version-check.yml +20 -0
- package/templates/website/.prettierrc +9 -0
- package/templates/website/LICENSE +13 -0
- package/templates/website/_gitignore +28 -0
- package/templates/website/_npmrc +3 -0
- package/templates/website/logo.png +0 -0
- package/templates/website/package.json +7 -3
- package/templates/website/public/favicon.ico +0 -0
- package/templates/website/public/robots.txt +3 -0
- package/templates/website/screenshots/.gitkeep +0 -0
- package/templates/website/scripts/build-clean.js +6 -0
- package/templates/website/scripts/bump-version.mjs +33 -0
- package/templates/website/version +1 -0
- package/common/.makefiles/bump_blocklet_version.sh +0 -5
- package/common/.makefiles/bump_node_version.sh +0 -9
- package/common/.makefiles/bump_version.sh +0 -51
- package/common/.makefiles/release.mk +0 -31
- package/common/.vscode/settings.json +0 -5
- package/common/Makefile +0 -21
- package/templates/monorepo/Makefile +0 -22
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2018-2020 ArcBlock
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
.pnp
|
|
5
|
+
.pnp.js
|
|
6
|
+
.DS_Store
|
|
7
|
+
node_modules
|
|
8
|
+
|
|
9
|
+
# testing
|
|
10
|
+
coverage
|
|
11
|
+
|
|
12
|
+
# production
|
|
13
|
+
build
|
|
14
|
+
dist
|
|
15
|
+
dist-ssr
|
|
16
|
+
.blocklet
|
|
17
|
+
|
|
18
|
+
# local env files
|
|
19
|
+
*.local
|
|
20
|
+
|
|
21
|
+
# Log files
|
|
22
|
+
logs
|
|
23
|
+
*.log
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
pnpm-debug.log*
|
|
28
|
+
lerna-debug.log*
|
|
Binary file
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "npm-run-all --parallel start:*",
|
|
9
9
|
"start:client": "vite",
|
|
10
10
|
"start:api": "NODE_ENV=development nodemon api/index.js -w api",
|
|
11
|
-
"clean": "
|
|
11
|
+
"clean": "node scripts/build-clean.js",
|
|
12
12
|
"bundle": "npm run bundle:client && npm run bundle:api",
|
|
13
13
|
"bundle:client": "vite build",
|
|
14
14
|
"bundle:api": "npm run clean && blocklet bundle --zip --create-release",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"lint:fix": "npm run lint -- --fix",
|
|
19
19
|
"deploy:child": "npm run bundle && blocklet deploy .blocklet/bundle --app-did=<%= did %>",
|
|
20
20
|
"dev:child": "blocklet dev --component --app-did=<%= did %>",
|
|
21
|
-
"prepare": "husky install"
|
|
21
|
+
"prepare": "husky install",
|
|
22
|
+
"bump-version": "zx scripts/bump-version.mjs"
|
|
22
23
|
},
|
|
23
24
|
"license": "MIT",
|
|
24
25
|
"devDependencies": {
|
|
@@ -32,9 +33,12 @@
|
|
|
32
33
|
"npm-run-all": "^4.1.5",
|
|
33
34
|
"prettier": "^2.7.1",
|
|
34
35
|
"vite": "^3.1.8",
|
|
35
|
-
"vite-plugin-blocklet": "^0.4.
|
|
36
|
+
"vite-plugin-blocklet": "^0.4.80",
|
|
36
37
|
"vite-plugin-html": "^3.2.0",
|
|
37
|
-
"vite-plugin-solid": "^2.3.9"
|
|
38
|
+
"vite-plugin-solid": "^2.3.9",
|
|
39
|
+
"zx": "^7.1.1",
|
|
40
|
+
"rimraf": "^3.0.2",
|
|
41
|
+
"bumpp": "^8.2.1"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
44
|
"@arcblock/did-auth": "^1.17.23",
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import { $, chalk, fs } from 'zx';
|
|
4
|
+
|
|
5
|
+
execSync('bumpp --no-tag --no-commit --no-push package.json', { stdio: 'inherit' });
|
|
6
|
+
|
|
7
|
+
const { version } = await fs.readJSON('package.json');
|
|
8
|
+
|
|
9
|
+
let newChangelog = '';
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
const gitRes = await $`git log --pretty=format:"- %s" "master"...HEAD`;
|
|
13
|
+
newChangelog = gitRes.stdout.trim();
|
|
14
|
+
} catch {
|
|
15
|
+
console.error(chalk.redBright('Could not get git log, please write changelog manually.'));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const now = new Date();
|
|
19
|
+
const currentDate = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
|
|
20
|
+
const title = `## ${version} (${currentDate})`;
|
|
21
|
+
|
|
22
|
+
await fs.ensureFile('CHANGELOG.md');
|
|
23
|
+
const oldChangelog = await fs.readFile('CHANGELOG.md', 'utf8');
|
|
24
|
+
const changelog = [title, newChangelog, oldChangelog].filter((item) => !!item).join('\n\n');
|
|
25
|
+
await fs.writeFile('CHANGELOG.md', changelog);
|
|
26
|
+
|
|
27
|
+
console.log(`\nNow you can make adjustments to ${chalk.cyan('CHANGELOG.md')}. Then press enter to continue.`);
|
|
28
|
+
|
|
29
|
+
process.stdin.setRawMode(true);
|
|
30
|
+
process.stdin.resume();
|
|
31
|
+
process.stdin.on('data', process.exit.bind(process, 0));
|
|
32
|
+
|
|
33
|
+
await fs.writeFileSync('version', version);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# For more information about the properties used in
|
|
2
|
+
# this file, please see the EditorConfig documentation:
|
|
3
|
+
# http://editorconfig.org/
|
|
4
|
+
#
|
|
5
|
+
# Sensible EditorConfig defaults
|
|
6
|
+
# https://gist.github.com/matijs/662bf45dd4ec37b3a068
|
|
7
|
+
root = true
|
|
8
|
+
|
|
9
|
+
[*]
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
indent_size = 2
|
|
13
|
+
indent_style = space
|
|
14
|
+
insert_final_newline = true
|
|
15
|
+
trim_trailing_whitespace = true
|
|
16
|
+
|
|
17
|
+
# Make sure package.json always uses 2 spaces to indent
|
|
18
|
+
[{package.json}]
|
|
19
|
+
indent_size = 2
|
|
20
|
+
indent_style = space
|
|
21
|
+
|
|
22
|
+
[{makefile, Makefile}]
|
|
23
|
+
indent_style = tab
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
Deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repo
|
|
16
|
+
uses: actions/checkout@v2
|
|
17
|
+
|
|
18
|
+
- name: Set yarn cache
|
|
19
|
+
uses: c-hive/gha-yarn-cache@v2
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: yarn
|
|
23
|
+
|
|
24
|
+
- name: Blocklet workflow
|
|
25
|
+
uses: blocklet/action-workflow@v1
|
|
26
|
+
with:
|
|
27
|
+
skip-upload: false
|
|
28
|
+
skip-deploy: false
|
|
29
|
+
bundle-command: yarn bundle
|
|
30
|
+
store-endpoint: ${{ secrets.STORE_ENDPOINT }}
|
|
31
|
+
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN }}
|
|
32
|
+
server-endpoint: ${{ secrets.SERVER_ENDPOINT }}
|
|
33
|
+
server-access-key: ${{ secrets.SERVER_ACCESS_KEY }}
|
|
34
|
+
server-access-secret: ${{ secrets.SERVER_ACCESS_SECRET }}
|
|
35
|
+
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: 'Lint PR Title'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- dev
|
|
13
|
+
- master
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint-title:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: ArcBlock/action-lint-pull-request-title@master
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: 'Version Check'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
main:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: action-version-check
|
|
18
|
+
uses: arcblock/action-version-check@master
|
|
19
|
+
env:
|
|
20
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2018-2020 ArcBlock
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
.pnp
|
|
5
|
+
.pnp.js
|
|
6
|
+
.DS_Store
|
|
7
|
+
node_modules
|
|
8
|
+
|
|
9
|
+
# testing
|
|
10
|
+
coverage
|
|
11
|
+
|
|
12
|
+
# production
|
|
13
|
+
build
|
|
14
|
+
dist
|
|
15
|
+
dist-ssr
|
|
16
|
+
.blocklet
|
|
17
|
+
|
|
18
|
+
# local env files
|
|
19
|
+
*.local
|
|
20
|
+
|
|
21
|
+
# Log files
|
|
22
|
+
logs
|
|
23
|
+
*.log
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
pnpm-debug.log*
|
|
28
|
+
lerna-debug.log*
|
|
Binary file
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
"lint": "eslint src --ext .mjs,.js,.jsx",
|
|
9
9
|
"lint:fix": "npm run lint -- --fix",
|
|
10
10
|
"serve": "vite preview",
|
|
11
|
-
"clean": "
|
|
11
|
+
"clean": "node scripts/build-clean.js",
|
|
12
12
|
"bundle": "npm run clean && vite build && blocklet bundle --zip --create-release",
|
|
13
13
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
14
14
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
15
15
|
"deploy:child": "npm run bundle && blocklet deploy .blocklet/bundle --app-did=<%= did %>",
|
|
16
16
|
"dev:child": "blocklet dev --component --app-did=<%= did %>",
|
|
17
|
-
"prepare": "husky install"
|
|
17
|
+
"prepare": "husky install",
|
|
18
|
+
"bump-version": "zx scripts/bump-version.mjs"
|
|
18
19
|
},
|
|
19
20
|
"license": "MIT",
|
|
20
21
|
"devDependencies": {
|
|
@@ -26,9 +27,12 @@
|
|
|
26
27
|
"lint-staged": "^12.5.0",
|
|
27
28
|
"prettier": "^2.7.1",
|
|
28
29
|
"vite": "^3.1.8",
|
|
29
|
-
"vite-plugin-blocklet": "^0.4.
|
|
30
|
+
"vite-plugin-blocklet": "^0.4.80",
|
|
30
31
|
"vite-plugin-html": "^3.2.0",
|
|
31
|
-
"vite-plugin-solid": "^2.3.9"
|
|
32
|
+
"vite-plugin-solid": "^2.3.9",
|
|
33
|
+
"zx": "^7.1.1",
|
|
34
|
+
"rimraf": "^3.0.2",
|
|
35
|
+
"bumpp": "^8.2.1"
|
|
32
36
|
},
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"solid-js": "^1.5.9"
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import { $, chalk, fs } from 'zx';
|
|
4
|
+
|
|
5
|
+
execSync('bumpp --no-tag --no-commit --no-push package.json', { stdio: 'inherit' });
|
|
6
|
+
|
|
7
|
+
const { version } = await fs.readJSON('package.json');
|
|
8
|
+
|
|
9
|
+
let newChangelog = '';
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
const gitRes = await $`git log --pretty=format:"- %s" "master"...HEAD`;
|
|
13
|
+
newChangelog = gitRes.stdout.trim();
|
|
14
|
+
} catch {
|
|
15
|
+
console.error(chalk.redBright('Could not get git log, please write changelog manually.'));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const now = new Date();
|
|
19
|
+
const currentDate = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
|
|
20
|
+
const title = `## ${version} (${currentDate})`;
|
|
21
|
+
|
|
22
|
+
await fs.ensureFile('CHANGELOG.md');
|
|
23
|
+
const oldChangelog = await fs.readFile('CHANGELOG.md', 'utf8');
|
|
24
|
+
const changelog = [title, newChangelog, oldChangelog].filter((item) => !!item).join('\n\n');
|
|
25
|
+
await fs.writeFile('CHANGELOG.md', changelog);
|
|
26
|
+
|
|
27
|
+
console.log(`\nNow you can make adjustments to ${chalk.cyan('CHANGELOG.md')}. Then press enter to continue.`);
|
|
28
|
+
|
|
29
|
+
process.stdin.setRawMode(true);
|
|
30
|
+
process.stdin.resume();
|
|
31
|
+
process.stdin.on('data', process.exit.bind(process, 0));
|
|
32
|
+
|
|
33
|
+
await fs.writeFileSync('version', version);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# For more information about the properties used in
|
|
2
|
+
# this file, please see the EditorConfig documentation:
|
|
3
|
+
# http://editorconfig.org/
|
|
4
|
+
#
|
|
5
|
+
# Sensible EditorConfig defaults
|
|
6
|
+
# https://gist.github.com/matijs/662bf45dd4ec37b3a068
|
|
7
|
+
root = true
|
|
8
|
+
|
|
9
|
+
[*]
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
indent_size = 2
|
|
13
|
+
indent_style = space
|
|
14
|
+
insert_final_newline = true
|
|
15
|
+
trim_trailing_whitespace = true
|
|
16
|
+
|
|
17
|
+
# Make sure package.json always uses 2 spaces to indent
|
|
18
|
+
[{package.json}]
|
|
19
|
+
indent_size = 2
|
|
20
|
+
indent_style = space
|
|
21
|
+
|
|
22
|
+
[{makefile, Makefile}]
|
|
23
|
+
indent_style = tab
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
Deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repo
|
|
16
|
+
uses: actions/checkout@v2
|
|
17
|
+
|
|
18
|
+
- name: Set yarn cache
|
|
19
|
+
uses: c-hive/gha-yarn-cache@v2
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: yarn
|
|
23
|
+
|
|
24
|
+
- name: Blocklet workflow
|
|
25
|
+
uses: blocklet/action-workflow@v1
|
|
26
|
+
with:
|
|
27
|
+
skip-upload: false
|
|
28
|
+
skip-deploy: false
|
|
29
|
+
bundle-command: yarn bundle
|
|
30
|
+
store-endpoint: ${{ secrets.STORE_ENDPOINT }}
|
|
31
|
+
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN }}
|
|
32
|
+
server-endpoint: ${{ secrets.SERVER_ENDPOINT }}
|
|
33
|
+
server-access-key: ${{ secrets.SERVER_ACCESS_KEY }}
|
|
34
|
+
server-access-secret: ${{ secrets.SERVER_ACCESS_SECRET }}
|
|
35
|
+
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: 'Lint PR Title'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- dev
|
|
13
|
+
- master
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint-title:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: ArcBlock/action-lint-pull-request-title@master
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: 'Version Check'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
main:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: action-version-check
|
|
18
|
+
uses: arcblock/action-version-check@master
|
|
19
|
+
env:
|
|
20
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2018-2020 ArcBlock
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
.pnp
|
|
5
|
+
.pnp.js
|
|
6
|
+
.DS_Store
|
|
7
|
+
node_modules
|
|
8
|
+
|
|
9
|
+
# testing
|
|
10
|
+
coverage
|
|
11
|
+
|
|
12
|
+
# production
|
|
13
|
+
build
|
|
14
|
+
dist
|
|
15
|
+
dist-ssr
|
|
16
|
+
.blocklet
|
|
17
|
+
|
|
18
|
+
# local env files
|
|
19
|
+
*.local
|
|
20
|
+
|
|
21
|
+
# Log files
|
|
22
|
+
logs
|
|
23
|
+
*.log
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
pnpm-debug.log*
|
|
28
|
+
lerna-debug.log*
|
|
Binary file
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "npm-run-all --parallel start:*",
|
|
9
9
|
"start:client": "vite",
|
|
10
10
|
"start:api": "NODE_ENV=development nodemon api/index.js -w api",
|
|
11
|
-
"clean": "
|
|
11
|
+
"clean": "node scripts/build-clean.js",
|
|
12
12
|
"bundle": "npm run bundle:client && npm run bundle:api",
|
|
13
13
|
"bundle:client": "vite build",
|
|
14
14
|
"bundle:api": "npm run clean && blocklet bundle --zip --create-release",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
17
17
|
"deploy:child": "npm run bundle && blocklet deploy .blocklet/bundle --app-did=<%= did %>",
|
|
18
18
|
"dev:child": "blocklet dev --component --app-did=<%= did %>",
|
|
19
|
-
"prepare": "husky install"
|
|
19
|
+
"prepare": "husky install",
|
|
20
|
+
"bump-version": "zx scripts/bump-version.mjs"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"@arcblock/did-auth": "^1.17.23",
|
|
@@ -46,8 +47,11 @@
|
|
|
46
47
|
"prettier": "^2.7.1",
|
|
47
48
|
"svelte": "^3.52.0",
|
|
48
49
|
"vite": "^3.1.8",
|
|
49
|
-
"vite-plugin-blocklet": "^0.4.
|
|
50
|
-
"vite-plugin-html": "^3.2.0"
|
|
50
|
+
"vite-plugin-blocklet": "^0.4.80",
|
|
51
|
+
"vite-plugin-html": "^3.2.0",
|
|
52
|
+
"zx": "^7.1.1",
|
|
53
|
+
"rimraf": "^3.0.2",
|
|
54
|
+
"bumpp": "^8.2.1"
|
|
51
55
|
},
|
|
52
56
|
"lint-staged": {
|
|
53
57
|
"*.{mjs,js,vue}": [
|
|
Binary file
|
|
File without changes
|