@w5s/mrm-preset 1.0.0-alpha.1 → 1.0.0-alpha.12

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.
@@ -0,0 +1 @@
1
+ @w5s/mrm-preset:build: cache hit, replaying output 994c85676b160cb0
@@ -0,0 +1,43 @@
1
+ @w5s/mrm-preset:docs: cache hit, replaying output 131c211b32191d83
2
+ @w5s/mrm-preset:docs: Starting markdown-magic [ '**/*.md', '!node_modules/**' ]
3
+ @w5s/mrm-preset:docs: ℹ Notice:
4
+ @w5s/mrm-preset:docs:  Missing transforms "BASIC_RULES","JSX_RULES" in _tester/node_modules/eslint-plugin-react/README.md
5
+ @w5s/mrm-preset:docs: 
6
+ @w5s/mrm-preset:docs: ✔ README.md Updated
7
+ @w5s/mrm-preset:docs:  Transforms run
8
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
9
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
10
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
11
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
12
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
13
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
14
+ @w5s/mrm-preset:docs: 
15
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/mrm-preset/README.md Updated
16
+ @w5s/mrm-preset:docs:  Transforms run
17
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Mrm Preset _(${name})_
18
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
19
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
20
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
21
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
22
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
23
+ @w5s/mrm-preset:docs: 
24
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/eslint-config/README.md Updated
25
+ @w5s/mrm-preset:docs:  Transforms run
26
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s ESLint configuration _(${name})_
27
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
28
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
29
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
30
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
31
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
32
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
33
+ @w5s/mrm-preset:docs: 
34
+ @w5s/mrm-preset:docs: ✔ _tester/node_modules/@w5s/ts-config/README.md Updated
35
+ @w5s/mrm-preset:docs:  Transforms run
36
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=# W5s Typescript configuration _(${name})_
37
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=> ${description}&unknownTxt=
38
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=```console\nnpm install --save-dev ${name}\n```
39
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[${license}][license-url] © ${author}
40
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square
41
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}
42
+ @w5s/mrm-preset:docs:  ⁕ PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square
43
+ @w5s/mrm-preset:docs: 
@@ -0,0 +1 @@
1
+ @w5s/mrm-preset:format: cache hit, replaying output d9ab8a49347bb8ce
@@ -0,0 +1 @@
1
+ @w5s/mrm-preset:lint: cache hit, replaying output c6d20a5c67e4158c
@@ -0,0 +1 @@
1
+ @w5s/mrm-preset:spellcheck: cache hit, replaying output 5cc5aa314340b1a0
@@ -0,0 +1,21 @@
1
+ @w5s/mrm-preset:test: cache hit, replaying output c894bb585090cefd
2
+ @w5s/mrm-preset:test: mkdir: _tester: File exists
3
+ @w5s/mrm-preset:test: Running bootstrap...
4
+ @w5s/mrm-preset:test: Running alias configure...
5
+ @w5s/mrm-preset:test: Running gitignore...
6
+ @w5s/mrm-preset:test: Running project...
7
+ @w5s/mrm-preset:test: Update package.json
8
+ @w5s/mrm-preset:test: Running contributing...
9
+ @w5s/mrm-preset:test: Running release...
10
+ @w5s/mrm-preset:test: Running ci...
11
+ @w5s/mrm-preset:test: Running lang...
12
+ @w5s/mrm-preset:test: Running commitlint...
13
+ @w5s/mrm-preset:test: Running editorconfig...
14
+ @w5s/mrm-preset:test: Running eslint...
15
+ @w5s/mrm-preset:test: Update package.json
16
+ @w5s/mrm-preset:test: Running cspell...
17
+ @w5s/mrm-preset:test: Running jest...
18
+ @w5s/mrm-preset:test: Update package.json
19
+ @w5s/mrm-preset:test: Running renovate...
20
+ @w5s/mrm-preset:test: Running githooks...
21
+ @w5s/mrm-preset:test: Running postconfigure...
package/CHANGELOG.md CHANGED
@@ -3,6 +3,170 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.12](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.11...@w5s/mrm-preset@1.0.0-alpha.12) (2022-06-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add spellcheck task to turbo config ([1029c2b](https://github.com/w5s/project-config/commit/1029c2b97b12b44618ce741d045b02712f0ebf18))
12
+ * clean non useful empty script when possible ([2e7e60a](https://github.com/w5s/project-config/commit/2e7e60a400506bbca00db653813668fa47f8f065))
13
+ * correct docs task in turbo ([0fca8c9](https://github.com/w5s/project-config/commit/0fca8c9ca0389b090e6aa2a66d47ab63b1cb138e))
14
+ * remove uneeded @types/jest typing ([475f6bb](https://github.com/w5s/project-config/commit/475f6bbdc101d31460cd8ffb7f5deb3b97176d5c))
15
+ * remove uneeded cspell script ([ba8d38b](https://github.com/w5s/project-config/commit/ba8d38b8053a24a7937c24c270f5d61d3dad71c7))
16
+
17
+
18
+ ### Features
19
+
20
+ * configure spellcheck ([4be6a96](https://github.com/w5s/project-config/commit/4be6a96d6d30e1085b73c0befcab1d3fa30475ab))
21
+ * improve eslint mrm support for workspaces ([2dacc2e](https://github.com/w5s/project-config/commit/2dacc2e867ebb74c8de777af2ce9f173426ebc33))
22
+ * improve turbo support for lint and format ([76e19e0](https://github.com/w5s/project-config/commit/76e19e02918aba66a2e6e9c06a7d0bed99500ecc))
23
+
24
+
25
+
26
+
27
+
28
+ # [1.0.0-alpha.11](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.10...@w5s/mrm-preset@1.0.0-alpha.11) (2022-05-20)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * correct prepare package script ([f2d5fbf](https://github.com/w5s/project-config/commit/f2d5fbfc4e7b66dece1d1139e2ba3835bcf524a1))
34
+
35
+
36
+ ### Features
37
+
38
+ * add minimal support for yarn + github ci ([b9ae537](https://github.com/w5s/project-config/commit/b9ae53746fa9a3f92a1ca0e3600e20cdda583a45))
39
+
40
+
41
+
42
+
43
+
44
+ # [1.0.0-alpha.10](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.9...@w5s/mrm-preset@1.0.0-alpha.10) (2022-05-13)
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * remove tsc on lint-staged because buggy ([6b0f4f2](https://github.com/w5s/project-config/commit/6b0f4f2c6d5d06f959ee1edc5cc6266464747d7e))
50
+
51
+
52
+
53
+
54
+
55
+ # [1.0.0-alpha.9](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.8...@w5s/mrm-preset@1.0.0-alpha.9) (2022-04-12)
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * correct default mrm task ([1a59cb1](https://github.com/w5s/project-config/commit/1a59cb1a114c2cba091c4729b5e66e5a5354004e))
61
+
62
+
63
+
64
+
65
+
66
+ # [1.0.0-alpha.8](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.7...@w5s/mrm-preset@1.0.0-alpha.8) (2022-03-08)
67
+
68
+
69
+ ### Bug Fixes
70
+
71
+ * add missing $schema for tsconfig ([c33c7ae](https://github.com/w5s/project-config/commit/c33c7aeba405d651eba19187436724780dd90aff))
72
+ * remove unused typedoc script ([51238f0](https://github.com/w5s/project-config/commit/51238f04b8f3d95baac7f0a367ba1c07061d2ce4))
73
+
74
+
75
+
76
+
77
+
78
+ # [1.0.0-alpha.7](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.6...@w5s/mrm-preset@1.0.0-alpha.7) (2022-03-01)
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * correct bootstrap step ([da7f539](https://github.com/w5s/project-config/commit/da7f539560ba143f830c9ea824b0d79c6a50522c))
84
+ * correct is-ci script that fails in some yarn berry ([4e4707d](https://github.com/w5s/project-config/commit/4e4707d7e8c0cd2c88e1dc6bc94705317dcf9e98))
85
+ * improve yarn check ([3af241a](https://github.com/w5s/project-config/commit/3af241af004d747518733983260eb295aa75e5cb))
86
+
87
+
88
+
89
+
90
+
91
+ # [1.0.0-alpha.6](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.5...@w5s/mrm-preset@1.0.0-alpha.6) (2022-02-23)
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * correct gitignore task ([b4f0903](https://github.com/w5s/project-config/commit/b4f0903561c97500aef65488ef06ccd7eae0db80))
97
+ * remove jest on lint-staged ([2fbc851](https://github.com/w5s/project-config/commit/2fbc85132ab380429d6966bff47b176bcfb51f6d))
98
+ * shorten eslint extensions ([aecc870](https://github.com/w5s/project-config/commit/aecc870ce0b288436208757376bc05504bff3331))
99
+
100
+
101
+ ### Features
102
+
103
+ * use es-jest as default jest preset ([61535d9](https://github.com/w5s/project-config/commit/61535d9c47c25150becc564a5dd273d7cc14b579))
104
+
105
+
106
+
107
+
108
+
109
+ # [1.0.0-alpha.5](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.4...@w5s/mrm-preset@1.0.0-alpha.5) (2022-02-18)
110
+
111
+
112
+ ### Bug Fixes
113
+
114
+ * change bootstrap behavior ([497c83a](https://github.com/w5s/project-config/commit/497c83a4082f7fd4e3b8b6913802ebcb21caa65a))
115
+ * remove lint-staged + cspell integration ([6747c83](https://github.com/w5s/project-config/commit/6747c83ec997034d25d136bc5aa008ed108ceb96))
116
+ * use UNLICENSED for default license ([608ee8f](https://github.com/w5s/project-config/commit/608ee8f0bf57fec94636587b116d5bda0fb4ee3f))
117
+
118
+
119
+ ### Features
120
+
121
+ * add gitignore for yarn v2 ([06c547a](https://github.com/w5s/project-config/commit/06c547a6b7813f935678c29b410aee62da5b3866))
122
+ * add support for yarn berry ([2b77669](https://github.com/w5s/project-config/commit/2b77669a29316825a38470c80a48aff8ab068f7f))
123
+
124
+
125
+
126
+
127
+
128
+ # [1.0.0-alpha.4](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.3...@w5s/mrm-preset@1.0.0-alpha.4) (2022-02-16)
129
+
130
+
131
+ ### Bug Fixes
132
+
133
+ * correct eslint vscode settings ([a32e0fb](https://github.com/w5s/project-config/commit/a32e0fb739cbe349565b26ea412cdf37e3d56bdb))
134
+ * correct mrm preset url ([ad6f030](https://github.com/w5s/project-config/commit/ad6f03091e0a294c043974b564e24c79023e659b))
135
+ * correct typo ([2218859](https://github.com/w5s/project-config/commit/221885997fec37149f7e349b00a58fbcb3bfb8db))
136
+ * rollback to eslint.validate vscode setting ([769a2e1](https://github.com/w5s/project-config/commit/769a2e100083aca4f5e9037fa539fcf1f6002d65))
137
+
138
+
139
+ ### Features
140
+
141
+ * improve typescript eslint configuration ([efc6f1c](https://github.com/w5s/project-config/commit/efc6f1cef876e8fc5d4d1d1b94ca90a6805fbbbf))
142
+
143
+
144
+
145
+
146
+
147
+ # [1.0.0-alpha.3](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.2...@w5s/mrm-preset@1.0.0-alpha.3) (2022-02-15)
148
+
149
+
150
+ ### Features
151
+
152
+ * use airbnb-base as default presets ([e499fc1](https://github.com/w5s/project-config/commit/e499fc115023571e749072db33d774b443b68bb7))
153
+
154
+
155
+
156
+
157
+
158
+ # [1.0.0-alpha.2](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.0.0-alpha.1...@w5s/mrm-preset@1.0.0-alpha.2) (2022-02-15)
159
+
160
+
161
+ ### Features
162
+
163
+ * enable source.fixAll for vscode ([d484156](https://github.com/w5s/project-config/commit/d484156c063f2bf9f5cb3212878aa07bb4f8fd6f))
164
+ * improve arrow-body-style configuration ([a4ee8a9](https://github.com/w5s/project-config/commit/a4ee8a9f3912285b45287afc4ccae2fa57431c6a))
165
+
166
+
167
+
168
+
169
+
6
170
  # 1.0.0-alpha.1 (2022-02-12)
7
171
 
8
172
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Julien Polo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -19,7 +19,7 @@ Initialize your project using this command :
19
19
 
20
20
  ```bash
21
21
  # from the root of your project
22
- npm exec -p mrm -p @w5s/mrm-preset -- mrm bootstrap --preset @w5s/mrm-preset
22
+ npm exec --package=@w5s/mrm-preset -- mrm bootstrap --preset @w5s/mrm-preset
23
23
  ```
24
24
 
25
25
  This will install in `package.json` the npm scripts
@@ -3,13 +3,14 @@ const path = require('path');
3
3
  const { packageJson, file } = require('mrm-core');
4
4
  const npm = require('../core/npm');
5
5
  const pkg = require('../core/pkg');
6
+ const { gitIgnoreTemplate } = require('../core/git');
6
7
 
7
8
  /**
8
9
  * @param {{
9
10
  * mrmPreset: string,
10
11
  * mrmTask: string,
11
12
  * packageArchetype: 'application'|'library'|'workspace',
12
- * packageManager: 'npm'|'yarn'
13
+ * packageManager: 'npm'|'yarn@classic'|'yarn@berry'
13
14
  * }} config
14
15
  * @returns {void}
15
16
  */
@@ -18,53 +19,53 @@ function task({ mrmPreset, mrmTask, packageArchetype, packageManager }) {
18
19
  * setup package.json from following object
19
20
  */
20
21
 
21
- const packageFile = packageJson({
22
+ packageJson({
22
23
  name: path.basename(process.cwd()),
23
24
  version: '1.0.0-alpha.0',
24
25
  private: true,
25
- license: 'PRIVATE',
26
+ license: 'UNLICENSED',
26
27
  description: '',
27
- });
28
-
29
- packageFile.merge({
30
- scripts: {
31
- configure: `npm run mrm -- ${mrmTask}`,
32
- mrm: `mrm --preset ${mrmPreset}`,
33
- },
34
- });
35
- pkg.value(packageFile, {
36
- path: 'packageManager',
37
- state: 'present',
38
- update: packageManager,
39
- default: () => {
40
- if (file('yarn.lock').exists()) {
41
- return 'yarn';
42
- }
43
-
44
- // return 'npm';
45
- return undefined;
46
- },
47
- });
48
- pkg.value(packageFile, {
49
- path: 'mrmConfig.packageArchetype',
50
- state: 'present',
51
- update: packageArchetype,
52
- default: () => {
53
- if (file('lerna.json').exists() || Boolean(packageFile.get('workspaces'))) {
54
- return 'workspace';
55
- }
28
+ }).save();
29
+ gitIgnoreTemplate(['macOS', 'NodeJS', 'VisualStudioCode']);
56
30
 
57
- return 'library';
58
- },
59
- });
60
- packageFile.save();
31
+ npm.bootstrap(packageManager);
61
32
 
62
33
  npm.dependency({
63
34
  dev: true,
64
35
  name: ['mrm', mrmPreset],
65
- yarn: packageManager === 'yarn',
66
36
  state: 'present',
67
37
  });
38
+
39
+ pkg.withPackageJson((packageFile) => {
40
+ const currentPackageManager = pkg.manager(packageFile);
41
+
42
+ // Add MRM default scripts
43
+ pkg.script(packageFile, {
44
+ name: 'configure',
45
+ state: 'default',
46
+ script: currentPackageManager === 'npm' ? `npm run mrm -- ${mrmTask}` : `yarn mrm ${mrmTask}`,
47
+ });
48
+ pkg.script(packageFile, {
49
+ name: 'mrm',
50
+ state: 'default',
51
+ script: `mrm --preset ${mrmPreset}`,
52
+ });
53
+ });
54
+
55
+ pkg.withPackageJson((packageFile) => {
56
+ pkg.value(packageFile, {
57
+ path: 'mrmConfig.packageArchetype',
58
+ state: 'present',
59
+ update: packageArchetype,
60
+ default: () => {
61
+ if (file('lerna.json').exists() || Boolean(packageFile.get('workspaces'))) {
62
+ return 'workspace';
63
+ }
64
+
65
+ return 'library';
66
+ },
67
+ });
68
+ });
68
69
  }
69
70
 
70
71
  task.description = 'Bootstrap a new project.';
@@ -87,8 +88,8 @@ task.parameters = {
87
88
  type: 'input',
88
89
  },
89
90
  packageManager: {
90
- default: 'yarn',
91
- choices: ['yarn', 'npm'],
91
+ default: 'yarn@berry',
92
+ choices: ['yarn@berry', 'yarn@classic', 'npm'],
92
93
  message: 'Which default package manager ?',
93
94
  name: 'packageManager',
94
95
  type: 'input',
package/ci/github.js ADDED
@@ -0,0 +1,47 @@
1
+ /* eslint-disable global-require, sort-keys-fix/sort-keys-fix */
2
+ const { packageJson } = require('mrm-core');
3
+ const githubCI = require('../core/githubCI');
4
+ const pkg = require('../core/pkg');
5
+
6
+ function task() {
7
+ const state = 'present';
8
+ const packageManager = pkg.manager(packageJson());
9
+ githubCI.workflow({
10
+ name: 'node.js.yml',
11
+ state,
12
+ update: (config) => ({
13
+ name: 'Node.js CI',
14
+ ...config,
15
+ on: {
16
+ push: {
17
+ branches: ['main'],
18
+ },
19
+ pull_request: {
20
+ branches: ['main'],
21
+ },
22
+ },
23
+ jobs: {
24
+ ...config.jobs,
25
+ build: {
26
+ 'runs-on': 'ubuntu-latest',
27
+ steps: [
28
+ { uses: 'actions/checkout@v3' },
29
+ {
30
+ name: 'Use Node.js',
31
+ uses: 'actions/setup-node@v3',
32
+ with: {
33
+ 'node-version': 'lts/*',
34
+ cache: packageManager,
35
+ },
36
+ },
37
+ { run: `${packageManager} install` },
38
+ { run: `${packageManager} run build` },
39
+ { run: `${packageManager} validate` },
40
+ ],
41
+ },
42
+ },
43
+ }),
44
+ });
45
+ }
46
+
47
+ module.exports = task;
package/ci/gitlab.js CHANGED
@@ -21,9 +21,7 @@ function task() {
21
21
  /**
22
22
  * @param {string|{local: string}} include
23
23
  */
24
- (include) => {
25
- return (typeof include === 'string' ? include : include.local) === includePath;
26
- }
24
+ (include) => (typeof include === 'string' ? include : include.local) === includePath
27
25
  );
28
26
  const addInclude = (/** @type {string} */ includePath) =>
29
27
  gitlabCIConfig.set('include', gitlabCIConfig.get('include', []).concat([{ local: includePath }]));
package/ci/index.js CHANGED
@@ -1,11 +1,16 @@
1
1
  const gitlabCI = require('../core/gitlabCI');
2
+ const githubCI = require('../core/githubCI');
2
3
  const gitlab = require('./gitlab');
4
+ const github = require('./github');
3
5
 
4
6
  function task() {
5
7
  // check gitlab support
6
8
  if (gitlabCI.isSupported()) {
7
9
  gitlab();
8
10
  }
11
+ if (githubCI.isSupported()) {
12
+ github();
13
+ }
9
14
  }
10
15
 
11
16
  task.description = 'Setup Continuous Integration';
@@ -6,7 +6,7 @@
6
6
  We as members, contributors, and leaders pledge to make participation in our
7
7
  community a harassment-free experience for everyone, regardless of age, body
8
8
  size, visible or invisible disability, ethnicity, sex characteristics, gender
9
- identity and expression, level of experience, education, socio-economic status,
9
+ identity and expression, level of experience, education, socioeconomic status,
10
10
  nationality, personal appearance, race, caste, color, religion, or sexual identity
11
11
  and orientation.
12
12
 
@@ -119,11 +119,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
119
  version 2.0, available at
120
120
  [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
121
 
122
- Community Impact Guidelines were inspired by
122
+ Community Impact Guidelines were inspired by
123
123
  [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
124
 
125
125
  For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
127
  at [https://www.contributor-covenant.org/translations][translations].
128
128
 
129
129
  [homepage]: https://www.contributor-covenant.org
@@ -131,4 +131,3 @@ at [https://www.contributor-covenant.org/translations][translations].
131
131
  [Mozilla CoC]: https://github.com/mozilla/diversity
132
132
  [FAQ]: https://www.contributor-covenant.org/faq
133
133
  [translations]: https://www.contributor-covenant.org/translations
134
-
package/core/block.js CHANGED
@@ -20,13 +20,10 @@ const { file } = require('mrm-core');
20
20
  function block({
21
21
  markerBegin = 'BEGIN',
22
22
  markerEnd = 'END',
23
- marker = (mark) => {
24
- return `# ${mark} generated by mrm`;
25
- },
23
+ marker = (mark) => `# ${mark} generated by mrm`,
26
24
  path,
27
25
  block: blockName,
28
- // @ts-ignore
29
- insertBefore = 'begin',
26
+ // insertBefore = 'begin',
30
27
  insertAfter,
31
28
  }) {
32
29
  const EOL = '\n';
@@ -56,7 +53,7 @@ function block({
56
53
  const replaceBlock = beginBlock + EOL + blockContent + EOL + endBlock;
57
54
 
58
55
  if (found.exists) {
59
- return fullContent.substr(0, found.startIndex) + replaceBlock + fullContent.substr(found.endIndex);
56
+ return fullContent.slice(0, Math.max(0, found.startIndex)) + replaceBlock + fullContent.slice(found.endIndex);
60
57
  }
61
58
 
62
59
  // insert
package/core/cspell.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const { json } = require('mrm-core');
2
- const pkg = require('./pkg');
3
2
  const npm = require('./npm');
4
3
  /**
5
4
  * @typedef {{
@@ -22,14 +21,6 @@ const npm = require('./npm');
22
21
  function cspell({ state, update }) {
23
22
  const hasCSpell = state === 'present';
24
23
 
25
- pkg.withPackageJson((packageFile) => {
26
- pkg.script(packageFile, {
27
- name: 'cspell',
28
- script: 'cspell',
29
- state,
30
- });
31
- });
32
-
33
24
  const cSpellFile = json('cSpell.json', {
34
25
  version: '0.2',
35
26
  language: 'en',
@@ -11,6 +11,7 @@ module.exports = {
11
11
  yarn-debug.log*
12
12
  yarn-error.log*
13
13
  lerna-debug.log*
14
+ .pnpm-debug.log*
14
15
 
15
16
  # Diagnostic reports (https://nodejs.org/api/report.html)
16
17
  report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -47,8 +48,8 @@ module.exports = {
47
48
  node_modules/
48
49
  jspm_packages/
49
50
 
50
- # TypeScript v1 declaration files
51
- typings/
51
+ # Snowpack dependency directory (https://snowpack.dev/)
52
+ web_modules/
52
53
 
53
54
  # TypeScript cache
54
55
  *.tsbuildinfo
@@ -59,6 +60,9 @@ module.exports = {
59
60
  # Optional eslint cache
60
61
  .eslintcache
61
62
 
63
+ # Optional stylelint cache
64
+ .stylelintcache
65
+
62
66
  # Microbundle cache
63
67
  .rpt2_cache/
64
68
  .rts2_cache_cjs/
@@ -74,15 +78,20 @@ module.exports = {
74
78
  # Yarn Integrity file
75
79
  .yarn-integrity
76
80
 
77
- # dotenv environment variables file
81
+ # dotenv environment variable files
78
82
  .env
79
- .env.test
83
+ .env.development.local
84
+ .env.test.local
85
+ .env.production.local
86
+ .env.local
80
87
 
81
88
  # parcel-bundler cache (https://parceljs.org/)
82
89
  .cache
90
+ .parcel-cache
83
91
 
84
92
  # Next.js build output
85
93
  .next
94
+ out
86
95
 
87
96
  # Nuxt.js build / generate output
88
97
  .nuxt
@@ -92,11 +101,18 @@ module.exports = {
92
101
  .cache/
93
102
  # Comment in the public line in if your project uses Gatsby and not Next.js
94
103
  # https://nextjs.org/blog/next-9-1#public-directory-support
95
- public/
104
+ # public
96
105
 
97
106
  # vuepress build output
98
107
  .vuepress/dist
99
108
 
109
+ # vuepress v2.x temp and cache directory
110
+ .temp
111
+ .cache
112
+
113
+ # Docusaurus cache and generated files
114
+ .docusaurus
115
+
100
116
  # Serverless directories
101
117
  .serverless/
102
118
 
@@ -107,7 +123,17 @@ module.exports = {
107
123
  .dynamodb/
108
124
 
109
125
  # TernJS port file
110
- .tern-port`,
126
+ .tern-port
127
+
128
+ # Stores VSCode versions used for testing VSCode extensions
129
+ .vscode-test
130
+
131
+ # yarn v2
132
+ .yarn/cache
133
+ .yarn/unplugged
134
+ .yarn/build-state.yml
135
+ .yarn/install-state.gz
136
+ .pnp.*`,
111
137
  VisualStudioCode: `
112
138
  .vscode/*
113
139
  !.vscode/settings.json