pob 9.2.1 → 9.3.0
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/CHANGELOG.md +17 -0
- package/lib/generators/app/PobAppGenerator.js +1 -0
- package/lib/generators/common/testing/CommonTestingGenerator.js +1 -0
- package/lib/generators/common/typescript/CommonTypescriptGenerator.js +8 -1
- package/lib/generators/common/typescript/templates/tsconfig.json.ejs +1 -1
- package/lib/generators/core/ci/CoreCIGenerator.js +7 -0
- package/lib/generators/core/ci/templates/github-action-node-workflow.yml.ejs +6 -0
- package/lib/generators/lib/PobLibGenerator.js +3 -0
- package/lib/generators/monorepo/PobMonorepoGenerator.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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
|
+
# [9.3.0](https://github.com/christophehurpeau/pob/compare/pob@9.2.1...pob@9.3.0) (2021-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **pob:** newline in ci workflow ([78652a1](https://github.com/christophehurpeau/pob/commit/78652a1a412e04ab63fdb5ca7139e86f6e6a3dad))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **pob:** ci build ([1d1e76b](https://github.com/christophehurpeau/pob/commit/1d1e76b64e81fb08f3c1ea4de26363d162c9a15f))
|
|
17
|
+
* **pob:** typescript dom condition ([eecb027](https://github.com/christophehurpeau/pob/commit/eecb027d4415a20dfcc5612082d9b6ee3ad6a205))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [9.2.1](https://github.com/christophehurpeau/pob/compare/pob@9.2.0...pob@9.2.1) (2021-12-11)
|
|
7
24
|
|
|
8
25
|
|
|
@@ -48,6 +48,7 @@ export default class CommonTestingGenerator extends Generator {
|
|
|
48
48
|
this.composeWith('pob:core:ci', {
|
|
49
49
|
enable: this.options.ci,
|
|
50
50
|
testing: this.options.testing,
|
|
51
|
+
build: this.options.typescript,
|
|
51
52
|
typescript: this.options.typescript,
|
|
52
53
|
documentation: this.options.documentation,
|
|
53
54
|
codecov: this.options.codecov,
|
|
@@ -20,6 +20,12 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
20
20
|
desc: 'enable jsx with typescript',
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
this.option('dom', {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
defaults: true,
|
|
26
|
+
desc: 'enable dom with typescript',
|
|
27
|
+
});
|
|
28
|
+
|
|
23
29
|
this.option('baseUrl', {
|
|
24
30
|
type: String,
|
|
25
31
|
defaults: '',
|
|
@@ -57,7 +63,7 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
57
63
|
const tsconfigPath = this.destinationPath('tsconfig.json');
|
|
58
64
|
const tsconfigBuildPath = this.destinationPath('tsconfig.build.json');
|
|
59
65
|
if (this.options.enable) {
|
|
60
|
-
const { jsx } = this.options;
|
|
66
|
+
const { jsx, dom } = this.options;
|
|
61
67
|
let composite;
|
|
62
68
|
let monorepoPackageNames;
|
|
63
69
|
let monorepoPackageSrcPaths;
|
|
@@ -108,6 +114,7 @@ export default class CommonTypescriptGenerator extends Generator {
|
|
|
108
114
|
monorepoPackageNames,
|
|
109
115
|
monorepoPackageSrcPaths,
|
|
110
116
|
jsx,
|
|
117
|
+
dom,
|
|
111
118
|
baseUrl: this.options.baseUrl,
|
|
112
119
|
},
|
|
113
120
|
);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
15
15
|
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
16
|
-
"lib": ["dom", "esnext"], /* Polyfills are imported either by babel or with polyfill.io */
|
|
16
|
+
"lib": [<%- dom ? '"dom", ' : '' %>"esnext"], /* Polyfills are imported either by babel or with polyfill.io */
|
|
17
17
|
<%= jsx ? '' : '// ' %>"jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
18
18
|
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
19
19
|
|
|
@@ -13,6 +13,12 @@ export default class CoreCIGenerator extends Generator {
|
|
|
13
13
|
desc: 'enable ci',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
+
this.option('build', {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
defaults: true,
|
|
19
|
+
desc: 'enable build',
|
|
20
|
+
});
|
|
21
|
+
|
|
16
22
|
this.option('typescript', {
|
|
17
23
|
type: Boolean,
|
|
18
24
|
defaults: true,
|
|
@@ -66,6 +72,7 @@ export default class CoreCIGenerator extends Generator {
|
|
|
66
72
|
testing: this.options.testing && !!pkg.scripts.test,
|
|
67
73
|
checks: !!pkg.scripts && !!pkg.scripts.checks,
|
|
68
74
|
documentation: this.options.documentation,
|
|
75
|
+
build: this.options.build,
|
|
69
76
|
typescript: this.options.typescript,
|
|
70
77
|
codecov: this.options.codecov,
|
|
71
78
|
},
|
|
@@ -54,6 +54,12 @@ jobs:
|
|
|
54
54
|
- name: Checks
|
|
55
55
|
run: <%= packageManager %> run checks
|
|
56
56
|
|
|
57
|
+
<% } -%>
|
|
58
|
+
<% if (build) { -%>
|
|
59
|
+
- name: Build
|
|
60
|
+
run: yarn run build
|
|
61
|
+
if: startsWith(matrix.node-version, '16.')
|
|
62
|
+
|
|
57
63
|
<% } -%>
|
|
58
64
|
- name: Prettier
|
|
59
65
|
run: <%= packageManager %> run lint:prettier
|
|
@@ -221,9 +221,12 @@ export default class PobLibGenerator extends Generator {
|
|
|
221
221
|
|
|
222
222
|
const withBabel = babelEnvs.length > 0;
|
|
223
223
|
const jsx = withBabel && pkg.pob.jsx === true;
|
|
224
|
+
const browser =
|
|
225
|
+
withBabel && babelEnvs.some((env) => env.target === 'browser');
|
|
224
226
|
|
|
225
227
|
this.composeWith('pob:common:typescript', {
|
|
226
228
|
enable: withBabel,
|
|
229
|
+
dom: browser,
|
|
227
230
|
jsx,
|
|
228
231
|
updateOnly: this.options.updateOnly,
|
|
229
232
|
baseUrl: './src',
|
|
@@ -196,6 +196,7 @@ export default class PobMonorepoGenerator extends Generator {
|
|
|
196
196
|
|
|
197
197
|
this.composeWith('pob:core:ci', {
|
|
198
198
|
enable: this.pobLernaConfig.ci,
|
|
199
|
+
build: this.pobLernaConfig.typescript,
|
|
199
200
|
typescript: this.pobLernaConfig.typescript,
|
|
200
201
|
testing: this.pobLernaConfig.testing,
|
|
201
202
|
codecov: this.pobLernaConfig.codecov,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"mem-fs-editor": "8.1.2",
|
|
64
64
|
"minimist-argv": "^1.1.0",
|
|
65
65
|
"parse-author": "^2.0.0",
|
|
66
|
-
"pob-dependencies": "^6.0.
|
|
66
|
+
"pob-dependencies": "^6.0.4",
|
|
67
67
|
"prettier": "2.5.1",
|
|
68
68
|
"semver": "^7.3.4",
|
|
69
69
|
"update-notifier": "^5.0.1",
|
|
70
70
|
"yeoman-environment": "^3.5.1",
|
|
71
71
|
"yeoman-generator": "^5.4.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "937094f6b4c7776dabb6414630f2c3e5740b8489"
|
|
74
74
|
}
|