@dword-design/base 13.0.4 → 13.0.6
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/dist/get-generated-files/get-package-config/index.js +2 -4
- package/dist/get-generated-files/get-typescript.d.ts +1 -0
- package/dist/get-generated-files/get-typescript.js +21 -0
- package/dist/get-generated-files/index.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/package.json +2 -1
- package/dist/get-generated-files/typescript.d.ts +0 -17
- package/dist/get-generated-files/typescript.js +0 -16
|
@@ -15,7 +15,6 @@ export default function () {
|
|
|
15
15
|
...mapValues(this.config.commands, stubTrue)
|
|
16
16
|
};
|
|
17
17
|
return {
|
|
18
|
-
type: 'module',
|
|
19
18
|
...pick(this.packageConfig, Object.keys({
|
|
20
19
|
baseConfig: true,
|
|
21
20
|
bin: true,
|
|
@@ -31,14 +30,13 @@ export default function () {
|
|
|
31
30
|
pnpm: true,
|
|
32
31
|
private: true,
|
|
33
32
|
publishConfig: true,
|
|
34
|
-
resolutions: true
|
|
35
|
-
type: true,
|
|
36
|
-
types: true
|
|
33
|
+
resolutions: true
|
|
37
34
|
})),
|
|
38
35
|
funding: 'https://github.com/sponsors/dword-design',
|
|
39
36
|
publishConfig: {
|
|
40
37
|
access: 'public'
|
|
41
38
|
},
|
|
39
|
+
type: 'module',
|
|
42
40
|
version: this.packageConfig.version || '1.0.0',
|
|
43
41
|
...(this.config.git && {
|
|
44
42
|
repository: `dword-design/${this.config.git.project}`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import defu from '@dword-design/defu';
|
|
2
|
+
export default function () {
|
|
3
|
+
return defu(this.config.typescriptConfig, {
|
|
4
|
+
compilerOptions: {
|
|
5
|
+
declaration: true,
|
|
6
|
+
esModuleInterop: true,
|
|
7
|
+
module: 'ESNext',
|
|
8
|
+
moduleResolution: 'bundler',
|
|
9
|
+
outDir: 'dist',
|
|
10
|
+
...(this.config.hasTypescriptConfigRootAlias && {
|
|
11
|
+
paths: {
|
|
12
|
+
'@/*': ['./*']
|
|
13
|
+
}
|
|
14
|
+
}),
|
|
15
|
+
skipLibCheck: true,
|
|
16
|
+
target: 'ESNext'
|
|
17
|
+
},
|
|
18
|
+
exclude: ['**/*.spec.ts'],
|
|
19
|
+
include: ['src']
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -11,7 +11,6 @@ import githubFunding from "./github-funding.js";
|
|
|
11
11
|
import githubLabelsConfig from "./github-labels.js";
|
|
12
12
|
import githubSyncLabelsConfig from "./github-sync-labels.js";
|
|
13
13
|
import npmrc from "./npmrc.js";
|
|
14
|
-
import typescriptConfig from "./typescript.js";
|
|
15
14
|
export default function () {
|
|
16
15
|
const packageConfig = this.getPackageConfig();
|
|
17
16
|
return {
|
|
@@ -50,6 +49,6 @@ export default function () {
|
|
|
50
49
|
'README.md': this.getReadmeString(),
|
|
51
50
|
'eslint.config.ts': this.getEslintConfig(),
|
|
52
51
|
'package.json': `${JSON.stringify(sortPackageJson(packageConfig), undefined, 2)}\n`,
|
|
53
|
-
'tsconfig.json': `${JSON.stringify(
|
|
52
|
+
'tsconfig.json': `${JSON.stringify(this.getTypescriptConfig(), undefined, 2)}\n`
|
|
54
53
|
};
|
|
55
54
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import getPackageConfig from "./get-generated-files/get-package-config/index.js"
|
|
|
32
32
|
import getReadmeString from "./get-generated-files/get-readme-string/index.js";
|
|
33
33
|
import getReleaseConfig from "./get-generated-files/get-release/index.js";
|
|
34
34
|
import getRenovateConfig from "./get-generated-files/get-renovate/index.js";
|
|
35
|
+
import getTypescriptConfig from "./get-generated-files/get-typescript.js";
|
|
35
36
|
import getVscodeConfig from "./get-generated-files/get-vscode/index.js";
|
|
36
37
|
import githubCodespacesConfig from "./get-generated-files/github-codespaces.js";
|
|
37
38
|
import getGitInfo from "./get-git-info/index.js";
|
|
@@ -113,6 +114,9 @@ class Base {
|
|
|
113
114
|
getVscodeConfig(...args) {
|
|
114
115
|
return getVscodeConfig.call(this, ...args);
|
|
115
116
|
}
|
|
117
|
+
getTypescriptConfig(...args) {
|
|
118
|
+
return getTypescriptConfig.call(this, ...args);
|
|
119
|
+
}
|
|
116
120
|
constructor(config = null, {
|
|
117
121
|
cwd = '.'
|
|
118
122
|
} = {}) {
|
|
@@ -150,6 +154,7 @@ class Base {
|
|
|
150
154
|
cwd: this.cwd
|
|
151
155
|
}),
|
|
152
156
|
gitignore: [],
|
|
157
|
+
hasTypescriptConfigRootAlias: true,
|
|
153
158
|
lint: identity,
|
|
154
159
|
macos: true,
|
|
155
160
|
minNodeVersion: null,
|
|
@@ -170,6 +175,7 @@ class Base {
|
|
|
170
175
|
seeAlso: [],
|
|
171
176
|
supportedNodeVersions: [18, 20],
|
|
172
177
|
syncKeywords: true,
|
|
178
|
+
typescriptConfig: {},
|
|
173
179
|
windows: true
|
|
174
180
|
};
|
|
175
181
|
const configsToMerge = [defaultConfig];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.6",
|
|
4
4
|
"description": "Base package for projects.",
|
|
5
5
|
"repository": "dword-design/base",
|
|
6
6
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@commitlint/config-conventional": "^18.6.3",
|
|
29
29
|
"@dword-design/base-config-node": "^3.0.7",
|
|
30
30
|
"@dword-design/ci": "^4.0.6",
|
|
31
|
+
"@dword-design/defu": "^1.0.0",
|
|
31
32
|
"@dword-design/eslint-config": "^7.0.3",
|
|
32
33
|
"@dword-design/personal-data": "^2.0.3",
|
|
33
34
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
compilerOptions: {
|
|
3
|
-
declaration: boolean;
|
|
4
|
-
esModuleInterop: boolean;
|
|
5
|
-
module: string;
|
|
6
|
-
moduleResolution: string;
|
|
7
|
-
outDir: string;
|
|
8
|
-
paths: {
|
|
9
|
-
'@/*': string[];
|
|
10
|
-
};
|
|
11
|
-
skipLibCheck: boolean;
|
|
12
|
-
target: string;
|
|
13
|
-
};
|
|
14
|
-
exclude: string[];
|
|
15
|
-
include: string[];
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
compilerOptions: {
|
|
3
|
-
declaration: true,
|
|
4
|
-
esModuleInterop: true,
|
|
5
|
-
module: 'ESNext',
|
|
6
|
-
moduleResolution: 'bundler',
|
|
7
|
-
outDir: 'dist',
|
|
8
|
-
paths: {
|
|
9
|
-
'@/*': ['./*']
|
|
10
|
-
},
|
|
11
|
-
skipLibCheck: true,
|
|
12
|
-
target: 'ESNext'
|
|
13
|
-
},
|
|
14
|
-
exclude: ['**/*.spec.ts'],
|
|
15
|
-
include: ['src']
|
|
16
|
-
};
|