@dword-design/base 11.3.13 → 11.3.14
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/commands/lint/index.js +2 -8
- package/dist/commands/prepare/__snapshots__/index.spec.js.snap +1 -0
- package/dist/get-generated-files/__snapshots__/index.spec.js.snap +1 -0
- package/dist/get-generated-files/get-gitignore/__snapshots__/index.spec.js.snap +1 -0
- package/dist/get-generated-files/get-gitignore/index.js +1 -1
- package/dist/get-generated-files/index.js +5 -4
- package/package.json +1 -1
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
2
|
import parsePackagejsonName from 'parse-packagejson-name';
|
|
4
|
-
|
|
5
|
-
export default async function (options) {
|
|
3
|
+
export default async function () {
|
|
6
4
|
const packageName = parsePackagejsonName(this.packageConfig.name).fullName;
|
|
7
5
|
if (this.config.git !== undefined && packageName !== this.config.git.project) {
|
|
8
6
|
throw new Error(`Package name '${packageName}' has to be equal to repository name '${this.config.git.project}'`);
|
|
9
7
|
}
|
|
10
|
-
options = {
|
|
11
|
-
resolvePluginsRelativeTo: _require.resolve('@dword-design/eslint-config'),
|
|
12
|
-
...options
|
|
13
|
-
};
|
|
14
8
|
try {
|
|
15
|
-
await execa('eslint', ['--fix', '--ext', '.js,.json,.vue', '
|
|
9
|
+
await execa('eslint', ['--fix', '--ext', '.js,.json,.vue', '.'], {
|
|
16
10
|
all: true
|
|
17
11
|
});
|
|
18
12
|
} catch (error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { identity, sortBy } from '@dword-design/functions';
|
|
2
2
|
export default function () {
|
|
3
3
|
var _ref;
|
|
4
|
-
return _ref = ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules', ...(this.config.testRunner === 'playwright' ? ['/test-results'] : []), ...this.config.gitignore], sortBy(identity)(_ref);
|
|
4
|
+
return _ref = ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules', '/.eslintignore', ...(this.config.testRunner === 'playwright' ? ['/test-results'] : []), ...this.config.gitignore], sortBy(identity)(_ref);
|
|
5
5
|
}
|
|
@@ -14,7 +14,7 @@ import githubLabelsConfig from "./github-labels.js";
|
|
|
14
14
|
import githubSyncLabelsConfig from "./github-sync-labels.js";
|
|
15
15
|
import npmrc from "./npmrc.js";
|
|
16
16
|
export default function () {
|
|
17
|
-
var _commitlintConfig, _commitizenConfig, _this$githubCodespace, _this$getEslintConfig, _githubFunding, _sortKeys, _sortKeys2, _sortKeys3, _sortKeys4, _sortKeys5,
|
|
17
|
+
var _commitlintConfig, _commitizenConfig, _this$githubCodespace, _ref, _this$getGitignoreCon, _this$getEslintConfig, _githubFunding, _sortKeys, _sortKeys2, _sortKeys3, _sortKeys4, _sortKeys5, _ref2, _this$getGitignoreCon2, _this$getGitpodConfig, _this$getReleaseConfi, _sortKeys6, _this$getVscodeConfig, _babelConfig, _ref3, _packageConfig;
|
|
18
18
|
const packageConfig = this.getPackageConfig();
|
|
19
19
|
return {
|
|
20
20
|
'.commitlintrc.json': `${_commitlintConfig = commitlintConfig, jsonToString({
|
|
@@ -27,6 +27,7 @@ export default function () {
|
|
|
27
27
|
indent: 2
|
|
28
28
|
})(_this$githubCodespace)}\n`,
|
|
29
29
|
'.editorconfig': editorconfigConfig,
|
|
30
|
+
'.eslintignore': (_ref = (_this$getGitignoreCon = this.getGitignoreConfig(), map(entry => `${entry}\n`)(_this$getGitignoreCon)), join('')(_ref)),
|
|
30
31
|
'.eslintrc.json': `${_this$getEslintConfig = this.getEslintConfig(), jsonToString({
|
|
31
32
|
indent: 2
|
|
32
33
|
})(_this$getEslintConfig)}\n`,
|
|
@@ -48,7 +49,7 @@ export default function () {
|
|
|
48
49
|
'.github/workflows/sync-metadata.yml': (_sortKeys5 = sortKeys(this.getGithubSyncMetadataConfig(), {
|
|
49
50
|
deep: true
|
|
50
51
|
}), yaml.stringify(_sortKeys5)),
|
|
51
|
-
'.gitignore': (
|
|
52
|
+
'.gitignore': (_ref2 = (_this$getGitignoreCon2 = this.getGitignoreConfig(), map(entry => `${entry}\n`)(_this$getGitignoreCon2)), join('')(_ref2)),
|
|
52
53
|
'.gitpod.Dockerfile': this.getGitpodDockerfile(),
|
|
53
54
|
'.gitpod.yml': (_this$getGitpodConfig = this.getGitpodConfig(), yaml.stringify(_this$getGitpodConfig)),
|
|
54
55
|
'.npmrc': `${npmrc}\n`,
|
|
@@ -68,8 +69,8 @@ export default function () {
|
|
|
68
69
|
'babel.config.json': `${_babelConfig = babelConfig, jsonToString({
|
|
69
70
|
indent: 2
|
|
70
71
|
})(_babelConfig)}\n`,
|
|
71
|
-
'package.json': `${
|
|
72
|
+
'package.json': `${_ref3 = (_packageConfig = packageConfig, sortPackageJson(_packageConfig)), jsonToString({
|
|
72
73
|
indent: 2
|
|
73
|
-
})(
|
|
74
|
+
})(_ref3)}\n`
|
|
74
75
|
};
|
|
75
76
|
}
|