@build-script/single-dog-asset 1.0.26 → 1.0.30

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/link-here.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -Eeuo pipefail
4
+
5
+ TARGET="$(pwd)"
6
+ SOURCE="$(dirname "${BASH_SOURCE[0]}")/package"
7
+
8
+ echo -e ":: will link/copy assets\n\tfrom '$SOURCE'\n\tto '$TARGET'"
9
+ read -r -p "Do you want to continue? [y/N] " response
10
+
11
+ if ! [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
12
+ echo ":: canceled"
13
+ exit 1
14
+ fi
15
+
16
+ copy() {
17
+ local from="$SOURCE/$1" to="$TARGET/$2"
18
+ if [[ -e $to ]]; then
19
+ echo " - skip copy $2"
20
+ return
21
+ fi
22
+ mkdir -p "$(dirname "$to")"
23
+ echo " - copy $2"
24
+ cp "$from" "$to"
25
+ }
26
+
27
+ link() {
28
+ local from="$SOURCE/$1" to="$TARGET/$2" to_dir frel
29
+ if [[ -L $to ]]; then
30
+ unlink "$to"
31
+ fi
32
+ if [[ -e $to ]]; then
33
+ echo " - skip link $2"
34
+ return
35
+ fi
36
+ to_dir="$(dirname "$to")"
37
+ mkdir -p "$(dirname "$to_dir")"
38
+ frel=$(realpath -s --relative-to="$to_dir" "$from")
39
+ echo " - link $2 ($frel)"
40
+ ln -s "./$frel" "$to"
41
+ }
42
+
43
+ copy vscode/extensions.json .vscode/extensions.json
44
+ copy vscode/settings.json .vscode/settings.json
45
+ link editorconfig .editorconfig
46
+ copy gitattributes .gitattributes
47
+ copy gitignore .gitignore
48
+ copy LICENSE LICENSE
49
+ copy npmignore common/config/rush/.npmignore
50
+ link prettierignore .prettierignore
51
+ link prettierrc.js .prettierrc.js
52
+ link rush-pretty-package.json common/autoinstallers/rush-prettier/package.json
53
+ link rush-pretty-pre-commit common/git-hooks/pre-commit
54
+
55
+ echo ":: done"
package/package/gitignore CHANGED
@@ -10,6 +10,7 @@ common/temp
10
10
  common/deploy
11
11
  *.tsbuildinfo
12
12
  .rpt2_cache/
13
+ /.vscode/local-history
13
14
 
14
15
  ### Temp Files
15
16
  *.lock
package/package/npmignore CHANGED
@@ -15,8 +15,6 @@ package-deps.json
15
15
  temp
16
16
 
17
17
  ### Build Source
18
- # index.ts
19
- # /src
20
18
  /build-script.json
21
19
  /Gulpfile.*
22
20
  *.tsbuildinfo
@@ -27,8 +25,14 @@ temp
27
25
  ### Tests
28
26
  /tests
29
27
  /test
28
+ lib/**/test/
29
+ lib/**/tests/
30
+ lib/**/*.test.*
31
+ lib/**/test.*
30
32
 
31
33
  ### Temp Files
32
34
 
33
35
  ### Examples
34
36
  /example
37
+
38
+ !lib/**/*
@@ -1,5 +1,19 @@
1
- docs/
2
- /common/scripts/
1
+ # Rush files
2
+ common/changes/
3
+ common/scripts/
4
+ CHANGELOG.*
5
+
6
+ # Package manager files
7
+ pnpm-lock.yaml
8
+ yarn.lock
9
+ package-lock.json
10
+ shrinkwrap.json
3
11
  jspm_packages
12
+
13
+ # Build outputs
14
+ dist/
15
+ docs/
4
16
  lib/
5
- pnpm-lock.yaml
17
+
18
+ # Prettier reformats code blocks inside Markdown, which affects rendered output
19
+ *.md
@@ -1,12 +1,11 @@
1
+ /** @type {import("prettier").Config} */
1
2
  module.exports = {
2
3
  printWidth: 120,
3
- useTabs: true,
4
- tabWidth: 4,
5
4
  semi: true,
6
5
  singleQuote: true,
7
6
  quoteProps: 'as-needed',
8
7
  jsxSingleQuote: false,
9
- trailingComma: 'es5',
8
+ trailingComma: 'all',
10
9
  bracketSpacing: true,
11
10
  bracketSameLine: false,
12
11
  arrowParens: 'always',
@@ -22,9 +21,18 @@ module.exports = {
22
21
  },
23
22
  },
24
23
  {
25
- files: ['package.json'],
24
+ files: ['*.js', '*.mjs', '*.cjs'],
25
+ options: {
26
+ parser: 'typescript',
27
+ },
28
+ },
29
+ {
30
+ files: ['*.json'],
31
+ excludeFiles: ['package.json'],
26
32
  options: {
27
33
  parser: 'json',
34
+ quoteProps: 'consistent',
35
+ singleQuote: false,
28
36
  },
29
37
  },
30
38
  ],
@@ -1,11 +1,76 @@
1
1
  {
2
- "extends": "./tsconfig.no-lib.json",
3
2
  "compilerOptions": {
4
- "module": "ESNext",
5
- "plugins": [
6
- {
7
- "transform": "@build-script/typescript-transformer-dual-package"
8
- }
9
- ]
3
+ "target": "ESNext",
4
+ "module": "CommonJS",
5
+ "moduleResolution": "Node",
6
+ "resolvePackageJsonExports": false,
7
+ "resolvePackageJsonImports": false,
8
+ "allowJs": false,
9
+ "allowSyntheticDefaultImports": true,
10
+ "allowUnreachableCode": false,
11
+ "allowUnusedLabels": false,
12
+ "allowArbitraryExtensions": false,
13
+ "allowImportingTsExtensions": false,
14
+ "allowUmdGlobalAccess": false,
15
+ "exactOptionalPropertyTypes": false,
16
+ "alwaysStrict": true,
17
+ "assumeChangesOnlyAffectDirectDependencies": true,
18
+ "moduleDetection": "auto",
19
+ "checkJs": false,
20
+ "composite": false,
21
+ "declaration": true,
22
+ "declarationMap": true,
23
+ "downlevelIteration": true,
24
+ "emitBOM": false,
25
+ "emitDeclarationOnly": false,
26
+ "emitDecoratorMetadata": false,
27
+ "noEmitHelpers": false,
28
+ "noEmitOnError": false,
29
+ "esModuleInterop": true,
30
+ "experimentalDecorators": false,
31
+ "forceConsistentCasingInFileNames": true,
32
+ "inlineSourceMap": false,
33
+ "inlineSources": false,
34
+ "isolatedModules": false,
35
+ "keyofStringsOnly": false,
36
+ "lib": [
37
+ "ESNext",
38
+ "ESNext.Array",
39
+ "ESNext.AsyncIterable",
40
+ "ESNext.BigInt",
41
+ "ESNext.Promise",
42
+ "ESNext.String",
43
+ "ESNext.WeakRef"
44
+ ],
45
+ "noImplicitThis": true,
46
+ "noImplicitAny": true,
47
+ "noImplicitOverride": true,
48
+ "noPropertyAccessFromIndexSignature": false,
49
+ "noStrictGenericChecks": false,
50
+ "noUncheckedIndexedAccess": false,
51
+ "noUnusedLocals": true,
52
+ "noUnusedParameters": true,
53
+ "verbatimModuleSyntax": false,
54
+ "useUnknownInCatchVariables": true,
55
+ "preserveConstEnums": true,
56
+ "pretty": true,
57
+ "typeRoots": ["../node_modules/@types", "../node_modules"],
58
+ "types": [],
59
+ "removeComments": false,
60
+ "sourceMap": true,
61
+ "stripInternal": true,
62
+ "strictBindCallApply": true,
63
+ "strict": true,
64
+ "strictFunctionTypes": true,
65
+ "strictNullChecks": true,
66
+ "strictPropertyInitialization": true,
67
+ "useDefineForClassFields": true,
68
+ "newLine": "lf",
69
+ "importHelpers": true,
70
+ "noImplicitReturns": true,
71
+ "noFallthroughCasesInSwitch": true,
72
+ "incremental": false,
73
+ "jsxImportSource": "react",
74
+ "jsx": "react-jsx"
10
75
  }
11
76
  }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@build-script/single-dog-asset",
3
- "version": "1.0.26",
3
+ "version": "1.0.30",
4
4
  "license": "MIT",
5
5
  "repository": "https://github.com/GongT/baobao",
6
6
  "dependencies": {
7
- "tslib": "^2.4.1"
7
+ "tslib": "^2.6.0"
8
+ },
9
+ "devDependencies": {
10
+ "@types/prettier": "^2.7.3"
8
11
  },
9
12
  "scripts": {
10
13
  "build": "",
@@ -1,76 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "CommonJS",
5
- "moduleResolution": "Node",
6
- "resolvePackageJsonExports": false,
7
- "resolvePackageJsonImports": false,
8
- "allowJs": false,
9
- "allowSyntheticDefaultImports": true,
10
- "allowUnreachableCode": false,
11
- "allowUnusedLabels": false,
12
- "allowArbitraryExtensions": false,
13
- "allowImportingTsExtensions": false,
14
- "allowUmdGlobalAccess": false,
15
- "exactOptionalPropertyTypes": false,
16
- "alwaysStrict": true,
17
- "assumeChangesOnlyAffectDirectDependencies": true,
18
- "moduleDetection": "auto",
19
- "checkJs": false,
20
- "composite": false,
21
- "declaration": true,
22
- "declarationMap": true,
23
- "downlevelIteration": true,
24
- "emitBOM": false,
25
- "emitDeclarationOnly": false,
26
- "emitDecoratorMetadata": true,
27
- "noEmitHelpers": false,
28
- "noEmitOnError": false,
29
- "esModuleInterop": true,
30
- "experimentalDecorators": true,
31
- "forceConsistentCasingInFileNames": true,
32
- "inlineSourceMap": false,
33
- "inlineSources": false,
34
- "isolatedModules": true,
35
- "keyofStringsOnly": false,
36
- "lib": [
37
- "ESNext",
38
- "ESNext.Array",
39
- "ESNext.AsyncIterable",
40
- "ESNext.BigInt",
41
- "ESNext.Promise",
42
- "ESNext.String",
43
- "ESNext.WeakRef"
44
- ],
45
- "noImplicitThis": true,
46
- "noImplicitAny": true,
47
- "noImplicitOverride": true,
48
- "noPropertyAccessFromIndexSignature": false,
49
- "noStrictGenericChecks": false,
50
- "noUncheckedIndexedAccess": true,
51
- "noUnusedLocals": true,
52
- "noUnusedParameters": true,
53
- "verbatimModuleSyntax": false,
54
- "useUnknownInCatchVariables": true,
55
- "preserveConstEnums": true,
56
- "pretty": true,
57
- "typeRoots": ["../node_modules/@types", "../node_modules"],
58
- "types": [],
59
- "removeComments": false,
60
- "sourceMap": true,
61
- "stripInternal": true,
62
- "strictBindCallApply": true,
63
- "strict": true,
64
- "strictFunctionTypes": true,
65
- "strictNullChecks": true,
66
- "strictPropertyInitialization": true,
67
- "useDefineForClassFields": true,
68
- "newLine": "lf",
69
- "importHelpers": true,
70
- "noImplicitReturns": true,
71
- "noFallthroughCasesInSwitch": true,
72
- "incremental": false,
73
- "jsxImportSource": "react",
74
- "jsx": "react-jsx"
75
- }
76
- }