@jakubmazanec/carson-templates 1.0.0 → 2.0.0-next.2fa8a2c
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/LICENSE.md +0 -2
- package/README.md +1 -1
- package/build/constants.d.ts +60 -0
- package/build/constants.js +89 -0
- package/build/constants.js.map +7 -0
- package/build/dependency-versions.d.ts +1 -0
- package/build/dependency-versions.js +58 -0
- package/build/dependency-versions.js.map +7 -0
- package/build/getDependencies.d.ts +2 -0
- package/build/getDependencies.js +44 -0
- package/build/getDependencies.js.map +7 -0
- package/build/getDevelopmentBranch.d.ts +2 -0
- package/build/getDevelopmentBranch.js +11 -0
- package/build/getDevelopmentBranch.js.map +7 -0
- package/build/getMainBranch.d.ts +2 -0
- package/build/getMainBranch.js +11 -0
- package/build/getMainBranch.js.map +7 -0
- package/build/getReferences.d.ts +4 -0
- package/build/getReferences.js +20 -0
- package/build/getReferences.js.map +7 -0
- package/build/getWorkspaceName.d.ts +2 -0
- package/build/getWorkspaceName.js +16 -0
- package/build/getWorkspaceName.js.map +7 -0
- package/build/main.d.ts +8 -0
- package/build/main.js +10 -0
- package/build/main.js.map +7 -0
- package/package.json +31 -20
- package/source/constants.ts +94 -0
- package/source/dependency-versions.ts +69 -0
- package/source/getDependencies.ts +58 -0
- package/source/getDevelopmentBranch.ts +13 -0
- package/source/getMainBranch.ts +13 -0
- package/source/getReferences.ts +29 -0
- package/source/getWorkspaceName.ts +20 -0
- package/source/main.ts +8 -0
- package/templates/projects/carson-templates/.eslintrc.cjs.ejs +21 -0
- package/templates/projects/carson-templates/.prettierignore.ejs +3 -0
- package/templates/projects/carson-templates/CONTRIBUTING.md.ejs +3 -0
- package/templates/projects/carson-templates/package.json.ejs +26 -12
- package/templates/projects/carson-templates/prettier.config.cjs.ejs +3 -0
- package/templates/projects/carson-templates/source/main.ts.check.ejs +4 -0
- package/templates/projects/carson-templates/source/main.ts.create.ejs +6 -0
- package/templates/projects/carson-templates/tests/tsconfig.json.ejs +19 -12
- package/templates/projects/carson-templates/tsconfig.json.ejs +23 -9
- package/templates/projects/carson-templates/tsconfig.typecheck.json.ejs +1 -12
- package/templates/projects/carson-templates/typedoc.config.cjs.ejs +1 -10
- package/templates/projects/changesets-changelog/.eslintrc.cjs.ejs +21 -0
- package/templates/projects/changesets-changelog/.prettierignore.ejs +3 -0
- package/templates/projects/changesets-changelog/CONTRIBUTING.md.ejs +3 -0
- package/templates/projects/changesets-changelog/package.json.ejs +38 -20
- package/templates/projects/changesets-changelog/prettier.config.cjs.ejs +3 -0
- package/templates/projects/changesets-changelog/source/main.ts.check.ejs +4 -0
- package/templates/projects/changesets-changelog/source/main.ts.create.ejs +6 -0
- package/templates/projects/changesets-changelog/tests/tsconfig.json.ejs +19 -12
- package/templates/projects/changesets-changelog/tsconfig.json.ejs +23 -9
- package/templates/projects/changesets-changelog/tsconfig.typecheck.json.ejs +21 -10
- package/templates/projects/eslint-config/.eslintrc.cjs.ejs +21 -0
- package/templates/projects/eslint-config/.prettierignore.ejs +3 -0
- package/templates/projects/eslint-config/CONTRIBUTING.md.ejs +3 -0
- package/templates/projects/eslint-config/package.json.ejs +39 -25
- package/templates/projects/eslint-config/prettier.config.cjs.ejs +3 -0
- package/templates/projects/eslint-config/source/main.ts.check.ejs +4 -0
- package/templates/projects/eslint-config/source/main.ts.create.ejs +6 -0
- package/templates/projects/eslint-config/tsconfig.json.ejs +23 -9
- package/templates/projects/eslint-config/tsconfig.typecheck.json.ejs +20 -9
- package/templates/projects/library/.eslintrc.cjs.ejs +21 -0
- package/templates/projects/library/.prettierignore.ejs +3 -0
- package/templates/projects/library/CONTRIBUTING.md.ejs +18 -0
- package/templates/projects/library/README.md.create.ejs +36 -0
- package/templates/projects/library/package.json.create.ejs +1 -1
- package/templates/projects/library/package.json.ejs +35 -13
- package/templates/projects/library/prettier.config.cjs.ejs +3 -0
- package/templates/projects/library/source/main.ts.check.ejs +4 -0
- package/templates/projects/library/source/main.ts.create.ejs +5 -0
- package/templates/projects/library/tests/tsconfig.json.ejs +19 -12
- package/templates/projects/library/tsconfig.json.ejs +23 -9
- package/templates/projects/library/tsconfig.typecheck.json.ejs +20 -9
- package/templates/projects/library/typedoc.config.cjs.ejs +13 -7
- package/templates/projects/remix-app/.eslintrc.cjs.ejs +21 -0
- package/templates/projects/remix-app/.prettierignore.ejs +3 -0
- package/templates/projects/remix-app/CONTRIBUTING.md.ejs +3 -0
- package/templates/projects/remix-app/Dockerfile.ejs +47 -0
- package/templates/projects/remix-app/README.md.create.ejs +26 -0
- package/templates/projects/remix-app/app/entry.client.tsx.create.ejs +16 -0
- package/templates/projects/remix-app/app/root.tsx.create.ejs +26 -0
- package/templates/projects/remix-app/app/routes/_index.tsx.create.ejs +18 -0
- package/templates/projects/remix-app/app/tailwind.css.create.ejs +7 -0
- package/templates/projects/remix-app/config.json +4 -0
- package/templates/projects/remix-app/env.d.ts.ejs +14 -0
- package/templates/projects/remix-app/fly.toml.ejs +18 -0
- package/templates/projects/remix-app/package.json.create.ejs +14 -0
- package/templates/projects/remix-app/package.json.ejs +67 -0
- package/templates/projects/remix-app/postcss.config.cjs.ejs +18 -0
- package/templates/projects/remix-app/prettier.config.cjs.ejs +19 -0
- package/templates/projects/remix-app/tailwind.config.ts.ejs +21 -0
- package/templates/projects/remix-app/tests/setup.ts.ejs +13 -0
- package/templates/projects/remix-app/tests/tsconfig.json.ejs +24 -0
- package/templates/projects/remix-app/tsconfig.json.ejs +30 -0
- package/templates/projects/remix-app/tsconfig.typecheck.json.ejs +19 -0
- package/templates/projects/remix-app/vite.config.ts.ejs +40 -0
- package/templates/workspace/.eslintrc.cjs.ejs +9 -13
- package/templates/workspace/.github/workflows/{pull-request.yaml.ejs → check-pull-request.yaml.ejs} +30 -7
- package/templates/workspace/.github/workflows/merge-to-main-branch.yaml.ejs +12 -4
- package/templates/workspace/.github/workflows/release-pull-request.yaml.ejs +105 -0
- package/templates/workspace/.github/workflows/release.yaml.ejs +65 -105
- package/templates/workspace/.github/workflows/update-pull-request.yaml.ejs +139 -0
- package/templates/workspace/.gitignore.ejs +9 -1
- package/templates/workspace/.prettierignore.ejs +9 -10
- package/templates/workspace/CONTRIBUTING.md.ejs +18 -0
- package/templates/workspace/README.md.create.ejs +16 -0
- package/templates/workspace/README.md.insert.ejs +1 -0
- package/templates/workspace/package.json.ejs +6 -16
- package/templates/workspace/prettier.config.cjs.ejs +19 -0
- package/templates/workspace/tsconfig.json.ejs +23 -0
- package/templates/workspace/tsconfig.typecheck.json.ejs +10 -4
- package/templates/workspace/turbo.json.ejs +1 -1
- package/dist/main.d.ts +0 -10
- package/dist/main.js +0 -128
- package/dist/main.js.map +0 -1
- package/src/main.ts +0 -166
- package/templates/projects/carson-templates/.swcrc.ejs +0 -23
- package/templates/projects/carson-templates/jest.config.ts.ejs +0 -30
- package/templates/projects/carson-templates/src/main.ts.check.ejs +0 -5
- package/templates/projects/carson-templates/src/main.ts.create.ejs +0 -4
- package/templates/projects/changesets-changelog/.swcrc.ejs +0 -25
- package/templates/projects/changesets-changelog/jest.config.ts.ejs +0 -24
- package/templates/projects/changesets-changelog/src/main.ts.check.ejs +0 -5
- package/templates/projects/changesets-changelog/src/main.ts.create.ejs +0 -4
- package/templates/projects/eslint-config/.swcrc.ejs +0 -25
- package/templates/projects/eslint-config/jest.config.ts.ejs +0 -24
- package/templates/projects/eslint-config/src/main.ts.check.ejs +0 -5
- package/templates/projects/eslint-config/src/main.ts.create.ejs +0 -4
- package/templates/projects/eslint-config/tests/tsconfig.json.ejs +0 -17
- package/templates/projects/library/.swcrc.ejs +0 -23
- package/templates/projects/library/jest.config.ts.ejs +0 -30
- package/templates/projects/library/src/main.ts.check.ejs +0 -5
- package/templates/projects/library/src/main.ts.create.ejs +0 -4
- package/templates/workspace/prettier.config.js.ejs +0 -19
- package/templates/workspace/tsconfig.options.json.ejs +0 -24
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
to: 'tests/tsconfig.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = {
|
|
7
|
+
compilerOptions: {
|
|
8
|
+
...TSCONFIG_COMPILER_OPTIONS,
|
|
9
|
+
composite: false,
|
|
10
|
+
noEmit: true,
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
include: ['./**/*'],
|
|
13
|
+
references: [{path: '..'}],
|
|
14
|
+
};
|
|
15
|
+
-%>
|
|
16
|
+
//
|
|
17
|
+
// DO NOT EDIT!
|
|
18
|
+
// This file was autogenerated by Carson.
|
|
19
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
20
|
+
//
|
|
21
|
+
// Run `npx carson update workspace` to regenerate.
|
|
22
|
+
//
|
|
23
|
+
|
|
24
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,13 +2,27 @@
|
|
|
2
2
|
to: 'tsconfig.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = lodash.merge(
|
|
7
|
+
{
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
...TSCONFIG_COMPILER_OPTIONS,
|
|
10
|
+
emitDeclarationOnly: true,
|
|
11
|
+
outDir: `./${BUILD_DIRECTORY}`,
|
|
12
|
+
rootDir: `./${SOURCE_DIRECTORY}`,
|
|
13
|
+
},
|
|
14
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`],
|
|
15
|
+
references: getReferences(workspace, project),
|
|
11
16
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
project.config.overrides?.tsconfig ?? {},
|
|
18
|
+
);
|
|
19
|
+
-%>
|
|
20
|
+
//
|
|
21
|
+
// DO NOT EDIT!
|
|
22
|
+
// This file was autogenerated by Carson.
|
|
23
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
24
|
+
//
|
|
25
|
+
// Run `npx carson update workspace` to regenerate.
|
|
26
|
+
//
|
|
27
|
+
|
|
28
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,14 +2,25 @@
|
|
|
2
2
|
to: 'tsconfig.typecheck.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = {
|
|
7
|
+
extends: './tsconfig.json',
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
composite: false,
|
|
10
|
+
emitDeclarationOnly: false,
|
|
11
|
+
exactOptionalPropertyTypes: false, // TODO: fix the source code and remove this
|
|
12
|
+
noEmit: true,
|
|
13
|
+
rootDir: '.',
|
|
13
14
|
},
|
|
14
|
-
|
|
15
|
-
}
|
|
15
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`, './tests/**/*', './*'],
|
|
16
|
+
};
|
|
17
|
+
-%>
|
|
18
|
+
//
|
|
19
|
+
// DO NOT EDIT!
|
|
20
|
+
// This file was autogenerated by Carson.
|
|
21
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
22
|
+
//
|
|
23
|
+
// Run `npx carson update workspace` to regenerate.
|
|
24
|
+
//
|
|
25
|
+
|
|
26
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: '.eslintrc.cjs'
|
|
3
|
+
strategy: overwrite
|
|
4
|
+
---
|
|
5
|
+
/**
|
|
6
|
+
* DO NOT EDIT!
|
|
7
|
+
* This file was autogenerated by Carson.
|
|
8
|
+
* Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
9
|
+
*
|
|
10
|
+
* Run `npx carson update workspace` to regenerate.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
root: true,
|
|
15
|
+
extends: [
|
|
16
|
+
'@jakubmazanec/eslint-config',
|
|
17
|
+
'@jakubmazanec/eslint-config/nodejs',
|
|
18
|
+
'@jakubmazanec/eslint-config/prettier',
|
|
19
|
+
],
|
|
20
|
+
ignorePatterns: <%- JSON.stringify(LINT_IGNORE_PATTERNS, null, 2) %>,
|
|
21
|
+
};
|
|
@@ -3,31 +3,45 @@ to: 'package.json'
|
|
|
3
3
|
strategy: merge
|
|
4
4
|
---
|
|
5
5
|
<%
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
let developmentDependencies = getDependencies(
|
|
7
|
+
[
|
|
8
|
+
'@types/node',
|
|
9
|
+
'del-cli',
|
|
10
|
+
'esbuild',
|
|
11
|
+
'eslint',
|
|
12
|
+
'prettier',
|
|
13
|
+
'prettier-plugin-packagejson',
|
|
14
|
+
'typescript',
|
|
15
|
+
],
|
|
16
|
+
workspace,
|
|
17
|
+
);
|
|
18
|
+
let packageJson = lodash.merge(
|
|
19
|
+
{
|
|
20
|
+
repository: {
|
|
21
|
+
type: 'git',
|
|
22
|
+
directory: project.relativePath,
|
|
23
|
+
},
|
|
24
|
+
type: 'commonjs',
|
|
25
|
+
exports: {
|
|
26
|
+
'.': `./${BUILD_DIRECTORY}/main.js`,
|
|
27
|
+
'./nodejs': `./${BUILD_DIRECTORY}/presets/nodejs.js`,
|
|
28
|
+
'./prettier': `./${BUILD_DIRECTORY}/presets/prettier.js`,
|
|
29
|
+
},
|
|
30
|
+
files: [BUILD_DIRECTORY, SOURCE_DIRECTORY],
|
|
31
|
+
scripts: {
|
|
32
|
+
build: `del-cli ${BUILD_DIRECTORY} tsconfig.tsbuildinfo && ${BUILD_TO_CJS_COMMAND} && tsc`,
|
|
33
|
+
clean: `del-cli coverage ${BUILD_DIRECTORY} *.tsbuildinfo`,
|
|
34
|
+
format: FORMAT_COMMAND,
|
|
35
|
+
lint: 'eslint .',
|
|
36
|
+
typecheck: 'tsc --project tsconfig.typecheck.json',
|
|
37
|
+
},
|
|
38
|
+
devDependencies: developmentDependencies,
|
|
39
|
+
packageManager: 'npm@10.1.0',
|
|
40
|
+
engines: {
|
|
41
|
+
node: '^20.8.0',
|
|
42
|
+
},
|
|
10
43
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'.': './dist/main.js',
|
|
14
|
-
'./nextjs': './dist/presets/nextjs.js',
|
|
15
|
-
'./nodejs': './dist/presets/nodejs.js',
|
|
16
|
-
'./prettier': './dist/presets/prettier.js',
|
|
17
|
-
},
|
|
18
|
-
files: ['dist', 'src'],
|
|
19
|
-
scripts: {
|
|
20
|
-
build: 'swc src -d dist && tsc',
|
|
21
|
-
clean: 'del-cli coverage dist *.tsbuildinfo',
|
|
22
|
-
format: 'prettier . --write --ignore-unknown --ignore-path ../../.prettierignore',
|
|
23
|
-
lint: 'eslint .',
|
|
24
|
-
test: 'jest --passWithNoTests',
|
|
25
|
-
typecheck: 'tsc --project tsconfig.typecheck.json',
|
|
26
|
-
},
|
|
27
|
-
packageManager: 'npm@8.19.4',
|
|
28
|
-
engines: {
|
|
29
|
-
node: '>=16.20.0',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
44
|
+
project.config.overrides?.packageJson ?? {},
|
|
45
|
+
);
|
|
32
46
|
-%>
|
|
33
47
|
<%- JSON.stringify(packageJson) %>
|
|
@@ -2,13 +2,27 @@
|
|
|
2
2
|
to: 'tsconfig.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = lodash.merge(
|
|
7
|
+
{
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
...TSCONFIG_COMPILER_OPTIONS,
|
|
10
|
+
emitDeclarationOnly: true,
|
|
11
|
+
outDir: `./${BUILD_DIRECTORY}`,
|
|
12
|
+
rootDir: `./${SOURCE_DIRECTORY}`,
|
|
13
|
+
},
|
|
14
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`],
|
|
15
|
+
references: getReferences(workspace, project),
|
|
11
16
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
project.config.overrides?.tsconfig ?? {},
|
|
18
|
+
);
|
|
19
|
+
-%>
|
|
20
|
+
//
|
|
21
|
+
// DO NOT EDIT!
|
|
22
|
+
// This file was autogenerated by Carson.
|
|
23
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
24
|
+
//
|
|
25
|
+
// Run `npx carson update workspace` to regenerate.
|
|
26
|
+
//
|
|
27
|
+
|
|
28
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,13 +2,24 @@
|
|
|
2
2
|
to: 'tsconfig.typecheck.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = {
|
|
7
|
+
extends: './tsconfig.json',
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
composite: false,
|
|
10
|
+
emitDeclarationOnly: false,
|
|
11
|
+
noEmit: true,
|
|
12
|
+
rootDir: '.',
|
|
12
13
|
},
|
|
13
|
-
|
|
14
|
-
}
|
|
14
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`, './tests/**/*', './tools/**/*', './*'],
|
|
15
|
+
};
|
|
16
|
+
-%>
|
|
17
|
+
//
|
|
18
|
+
// DO NOT EDIT!
|
|
19
|
+
// This file was autogenerated by Carson.
|
|
20
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
21
|
+
//
|
|
22
|
+
// Run `npx carson update workspace` to regenerate.
|
|
23
|
+
//
|
|
24
|
+
|
|
25
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: '.eslintrc.cjs'
|
|
3
|
+
strategy: overwrite
|
|
4
|
+
---
|
|
5
|
+
/**
|
|
6
|
+
* DO NOT EDIT!
|
|
7
|
+
* This file was autogenerated by Carson.
|
|
8
|
+
* Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
9
|
+
*
|
|
10
|
+
* Run `npx carson update workspace` to regenerate.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
root: true,
|
|
15
|
+
extends: [
|
|
16
|
+
'@jakubmazanec/eslint-config',
|
|
17
|
+
'@jakubmazanec/eslint-config/nodejs',
|
|
18
|
+
'@jakubmazanec/eslint-config/prettier',
|
|
19
|
+
],
|
|
20
|
+
ignorePatterns: <%- JSON.stringify(LINT_IGNORE_PATTERNS, null, 2) %>,
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: 'CONTRIBUTING.md'
|
|
3
|
+
strategy: overwrite
|
|
4
|
+
---
|
|
5
|
+
# Contributing
|
|
6
|
+
|
|
7
|
+
Thank you for your interest in contributing to this project! Your help is greatly appreciated.
|
|
8
|
+
|
|
9
|
+
## Reporting Bugs
|
|
10
|
+
|
|
11
|
+
If you encounter a bug, please let me know by opening an issue with a detailed description. You can
|
|
12
|
+
also create a repository with a minimal reproducible example to help me fix it more quickly.
|
|
13
|
+
|
|
14
|
+
## Pull Requests
|
|
15
|
+
|
|
16
|
+
At this time, I am not accepting pull requests from external contributors. However, if you have a
|
|
17
|
+
feature request, please feel free to open an issue to discuss it.
|
|
18
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: 'README.md'
|
|
3
|
+
strategy: create
|
|
4
|
+
---
|
|
5
|
+
<!-- header --><!-- header -->
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install <%- project.name %>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
⚠️ This is an [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) package!
|
|
14
|
+
It cannot be required from a CommonJS module.
|
|
15
|
+
|
|
16
|
+
#### Prerequisites
|
|
17
|
+
|
|
18
|
+
- Node.js 20 or later
|
|
19
|
+
- TypeScript 5 or later
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
🚧 This section is under development. Please check back later for updates.
|
|
24
|
+
|
|
25
|
+
## Documentation
|
|
26
|
+
|
|
27
|
+
See [API reference](./docs) for auto-generated documentation.
|
|
28
|
+
|
|
29
|
+
## Contributing
|
|
30
|
+
|
|
31
|
+
If you want to contribute, see [CONTRIBUTING](./CONTRIBUTING.md) for details.
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
This package is licensed under the GNU Lesser General Public License v3. See [LICENSE](./LICENSE.md)
|
|
36
|
+
for details.
|
|
@@ -3,9 +3,31 @@ to: 'package.json'
|
|
|
3
3
|
strategy: merge
|
|
4
4
|
---
|
|
5
5
|
<%
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
let files = [BUILD_DIRECTORY, SOURCE_DIRECTORY];
|
|
7
|
+
|
|
8
|
+
if (project.packageJson.bin) {
|
|
9
|
+
files.push('bin');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
files.sort();
|
|
13
|
+
|
|
14
|
+
let developmentDependencies = getDependencies(
|
|
15
|
+
[
|
|
16
|
+
'@types/node',
|
|
17
|
+
'@vitest/coverage-v8',
|
|
18
|
+
'concurrently',
|
|
19
|
+
'del-cli',
|
|
20
|
+
'esbuild',
|
|
21
|
+
'eslint',
|
|
22
|
+
'prettier',
|
|
23
|
+
'prettier-plugin-packagejson',
|
|
24
|
+
'typedoc',
|
|
25
|
+
'typedoc-plugin-markdown',
|
|
26
|
+
'typescript',
|
|
27
|
+
'vitest',
|
|
28
|
+
],
|
|
29
|
+
workspace,
|
|
30
|
+
);
|
|
9
31
|
let packageJson = lodash.merge(
|
|
10
32
|
{
|
|
11
33
|
repository: {
|
|
@@ -13,22 +35,22 @@ let packageJson = lodash.merge(
|
|
|
13
35
|
directory: project.relativePath,
|
|
14
36
|
},
|
|
15
37
|
type: 'module',
|
|
16
|
-
exports:
|
|
17
|
-
files
|
|
38
|
+
exports: `./${BUILD_DIRECTORY}/main.js`,
|
|
39
|
+
files,
|
|
18
40
|
scripts: {
|
|
19
|
-
build:
|
|
20
|
-
clean:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
41
|
+
build: `del-cli ${BUILD_DIRECTORY} tsconfig.tsbuildinfo && ${BUILD_TO_ESM_COMMAND} && tsc`,
|
|
42
|
+
clean: `del-cli coverage ${BUILD_DIRECTORY} *.tsbuildinfo`,
|
|
43
|
+
develop: `concurrently "${BUILD_TO_ESM_COMMAND} --watch" "tsc --watch"`,
|
|
44
|
+
document: 'del-cli docs && typedoc --options typedoc.config.cjs',
|
|
45
|
+
format: FORMAT_COMMAND,
|
|
24
46
|
lint: 'eslint .',
|
|
25
|
-
test:
|
|
47
|
+
test: `del-cli coverage && ${TEST_COMMAND}`,
|
|
26
48
|
typecheck: 'tsc --project tsconfig.typecheck.json',
|
|
27
49
|
},
|
|
28
50
|
devDependencies: developmentDependencies,
|
|
29
|
-
packageManager: 'npm@
|
|
51
|
+
packageManager: 'npm@10.1.0',
|
|
30
52
|
engines: {
|
|
31
|
-
node: '
|
|
53
|
+
node: '^20.8.0',
|
|
32
54
|
},
|
|
33
55
|
},
|
|
34
56
|
project.config.overrides?.packageJson ?? {},
|
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
to: 'tests/tsconfig.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = {
|
|
7
|
+
compilerOptions: {
|
|
8
|
+
...TSCONFIG_COMPILER_OPTIONS,
|
|
9
|
+
composite: false,
|
|
10
|
+
noEmit: true,
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
include: ['./**/*'],
|
|
13
|
+
references: [{path: '..'}],
|
|
14
|
+
};
|
|
15
|
+
-%>
|
|
16
|
+
//
|
|
17
|
+
// DO NOT EDIT!
|
|
18
|
+
// This file was autogenerated by Carson.
|
|
19
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
20
|
+
//
|
|
21
|
+
// Run `npx carson update workspace` to regenerate.
|
|
22
|
+
//
|
|
23
|
+
|
|
24
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,13 +2,27 @@
|
|
|
2
2
|
to: 'tsconfig.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = lodash.merge(
|
|
7
|
+
{
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
...TSCONFIG_COMPILER_OPTIONS,
|
|
10
|
+
emitDeclarationOnly: true,
|
|
11
|
+
outDir: `./${BUILD_DIRECTORY}`,
|
|
12
|
+
rootDir: `./${SOURCE_DIRECTORY}`,
|
|
13
|
+
},
|
|
14
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`],
|
|
15
|
+
references: getReferences(workspace, project),
|
|
11
16
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
project.config.overrides?.tsconfig ?? {},
|
|
18
|
+
);
|
|
19
|
+
-%>
|
|
20
|
+
//
|
|
21
|
+
// DO NOT EDIT!
|
|
22
|
+
// This file was autogenerated by Carson.
|
|
23
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
24
|
+
//
|
|
25
|
+
// Run `npx carson update workspace` to regenerate.
|
|
26
|
+
//
|
|
27
|
+
|
|
28
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,13 +2,24 @@
|
|
|
2
2
|
to: 'tsconfig.typecheck.json'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
<%
|
|
6
|
+
let tsconfig = {
|
|
7
|
+
extends: './tsconfig.json',
|
|
8
|
+
compilerOptions: {
|
|
9
|
+
composite: false,
|
|
10
|
+
emitDeclarationOnly: false,
|
|
11
|
+
noEmit: true,
|
|
12
|
+
rootDir: '.',
|
|
12
13
|
},
|
|
13
|
-
|
|
14
|
-
}
|
|
14
|
+
include: [`./${SOURCE_DIRECTORY}/**/*`, './tests/**/*', './*'],
|
|
15
|
+
};
|
|
16
|
+
-%>
|
|
17
|
+
//
|
|
18
|
+
// DO NOT EDIT!
|
|
19
|
+
// This file was autogenerated by Carson.
|
|
20
|
+
// Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
21
|
+
//
|
|
22
|
+
// Run `npx carson update workspace` to regenerate.
|
|
23
|
+
//
|
|
24
|
+
|
|
25
|
+
<%- JSON.stringify(tsconfig, null, 2) %>
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
to: 'typedoc.config.cjs'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
out: 'docs',
|
|
9
|
-
readme: 'none',
|
|
10
|
-
githubPages: false,
|
|
11
|
-
hideBreadcrumbs: true,
|
|
5
|
+
<%
|
|
6
|
+
let typedocConfig = {
|
|
7
|
+
...TYPEDOC_CONFIG
|
|
12
8
|
};
|
|
9
|
+
-%>
|
|
10
|
+
/**
|
|
11
|
+
* DO NOT EDIT!
|
|
12
|
+
* This file was autogenerated by Carson.
|
|
13
|
+
* Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
14
|
+
*
|
|
15
|
+
* Run `npx carson update workspace` to regenerate.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
module.exports = <%- JSON.stringify(typedocConfig, null, 2) %>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: '.eslintrc.cjs'
|
|
3
|
+
strategy: overwrite
|
|
4
|
+
---
|
|
5
|
+
/**
|
|
6
|
+
* DO NOT EDIT!
|
|
7
|
+
* This file was autogenerated by Carson.
|
|
8
|
+
* Changes may cause incorrect behavior and will be lost when the file is regenerated.
|
|
9
|
+
*
|
|
10
|
+
* Run `npx carson update workspace` to regenerate.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
root: true,
|
|
15
|
+
extends: [
|
|
16
|
+
'@jakubmazanec/eslint-config',
|
|
17
|
+
'@jakubmazanec/eslint-config/nodejs',
|
|
18
|
+
'@jakubmazanec/eslint-config/prettier',
|
|
19
|
+
],
|
|
20
|
+
ignorePatterns: <%- JSON.stringify(LINT_IGNORE_PATTERNS, null, 2) %>,
|
|
21
|
+
};
|