@lntvow/dev 0.0.4 → 0.0.9
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/package.json +5 -2
- package/script/postinstall.js +10 -0
- package/.czrc +0 -3
- package/.editorconfig +0 -14
- package/.eslintignore +0 -25
- package/.eslintrc.cjs +0 -5
- package/.github/workflows/publish-npm.yml +0 -44
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.prettierrc +0 -8
- package/commitlint.config.cjs +0 -4
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/dev",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "开发环境依赖包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "lntvow",
|
|
8
|
+
"files": [
|
|
9
|
+
"script"
|
|
10
|
+
],
|
|
8
11
|
"dependencies": {
|
|
9
12
|
"@commitlint/cli": "^19.1.0",
|
|
10
13
|
"@commitlint/config-conventional": "^19.1.0",
|
|
@@ -27,6 +30,6 @@
|
|
|
27
30
|
"commit": "git add . && git-cz && git push",
|
|
28
31
|
"rimraf": "rimraf ./node_modules/",
|
|
29
32
|
"release": "git add . && bumpp package.json --all --commit --no-tag --push",
|
|
30
|
-
"postinstall": "
|
|
33
|
+
"postinstall": "node ./script/postinstall.js"
|
|
31
34
|
}
|
|
32
35
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { writeFileSync } from 'node:fs'
|
|
2
|
+
import { dirname } from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
6
|
+
const __dirname = dirname(__filename)
|
|
7
|
+
|
|
8
|
+
const str = `__filename${__filename}\n__dirname${__dirname}\n process.cwd()${process.cwd()}\n`
|
|
9
|
+
|
|
10
|
+
writeFileSync(`E:\\git\\utils\\test.text`, str)
|
package/.czrc
DELETED
package/.editorconfig
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
end_of_line = lf
|
|
9
|
-
insert_final_newline = true
|
|
10
|
-
trim_trailing_whitespace = true
|
|
11
|
-
|
|
12
|
-
[*.md]
|
|
13
|
-
insert_final_newline = false
|
|
14
|
-
trim_trailing_whitespace = false
|
package/.eslintignore
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
.DS_Store
|
|
12
|
-
dist
|
|
13
|
-
dist-ssr
|
|
14
|
-
coverage
|
|
15
|
-
*.local
|
|
16
|
-
|
|
17
|
-
/cypress/videos/
|
|
18
|
-
/cypress/screenshots/
|
|
19
|
-
|
|
20
|
-
# Editor directories and files
|
|
21
|
-
*.suo
|
|
22
|
-
*.ntvs*
|
|
23
|
-
*.njsproj
|
|
24
|
-
*.sln
|
|
25
|
-
*.sw?
|
package/.eslintrc.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: publish-npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
paths:
|
|
7
|
-
- 'package.json'
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
publish-npm:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
timeout-minutes: 10
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout
|
|
15
|
-
uses: actions/checkout@v3
|
|
16
|
-
|
|
17
|
-
- name: Set Node
|
|
18
|
-
uses: actions/setup-node@v3
|
|
19
|
-
with:
|
|
20
|
-
node-version: 18
|
|
21
|
-
registry-url: https://registry.npmjs.org/
|
|
22
|
-
|
|
23
|
-
- name: Set pnpm
|
|
24
|
-
uses: pnpm/action-setup@v2
|
|
25
|
-
with:
|
|
26
|
-
version: 8
|
|
27
|
-
|
|
28
|
-
- name: Get pnpm store directory
|
|
29
|
-
shell: bash
|
|
30
|
-
run: |
|
|
31
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
32
|
-
|
|
33
|
-
- uses: actions/cache@v3
|
|
34
|
-
name: Setup pnpm cache
|
|
35
|
-
with:
|
|
36
|
-
path: ${{ env.STORE_PATH }}
|
|
37
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
38
|
-
restore-keys: |
|
|
39
|
-
${{ runner.os }}-pnpm-store-
|
|
40
|
-
|
|
41
|
-
- run: pnpm install
|
|
42
|
-
- run: pnpm publish --access public
|
|
43
|
-
env:
|
|
44
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH}}
|
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
package/.prettierrc
DELETED
package/commitlint.config.cjs
DELETED