@blockquote/create-wc 1.4.4 → 1.6.2
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/package.json +1 -1
- package/src/common-linting/templates/package.json +32 -6
- package/src/common-repo/templates/gitignore +8 -4
- package/src/common-repo/templates/package.json +3 -0
- package/src/common-repo/templates/styles/MyEl.scss +6 -3
- package/src/common-testing-wtr/templates/static/web-test-runner.config.mjs +14 -18
- package/src/testing/templates/package.json +3 -2
- package/src/wc-lit-element/templates/MyEl.js +3 -1
- package/src/wc-lit-element/templates/static/demo/index.html +5 -1
- package/src/wc-lit-element/templates/styles/MyEl-styles.js +14 -15
- package/src/wc-lit-element-ts/templates/styles/MyEl-styles.ts +14 -15
package/package.json
CHANGED
|
@@ -5,8 +5,17 @@
|
|
|
5
5
|
}
|
|
6
6
|
},
|
|
7
7
|
"lint-staged": {
|
|
8
|
-
"
|
|
9
|
-
"npm run format"
|
|
8
|
+
"index.*": [
|
|
9
|
+
"npm run format:eslint"
|
|
10
|
+
],
|
|
11
|
+
"{src,define,test}/**/*.{js,ts,json,html}": [
|
|
12
|
+
"npm run format:eslint"
|
|
13
|
+
],
|
|
14
|
+
"**/*.{js,ts,json,html,md}": [
|
|
15
|
+
"npm run format:prettier"
|
|
16
|
+
],
|
|
17
|
+
"**/*.{scss,css}": [
|
|
18
|
+
"npm run format:stylelint"
|
|
10
19
|
]
|
|
11
20
|
},
|
|
12
21
|
"eslintConfig": {
|
|
@@ -18,7 +27,13 @@
|
|
|
18
27
|
"import/no-unresolved": "off",
|
|
19
28
|
"class-methods-use-this": "off",
|
|
20
29
|
"object-curly-newline": "off",
|
|
21
|
-
"import/extensions": [
|
|
30
|
+
"import/extensions": [
|
|
31
|
+
"error",
|
|
32
|
+
"always",
|
|
33
|
+
{
|
|
34
|
+
"ignorePackages": true
|
|
35
|
+
}
|
|
36
|
+
]
|
|
22
37
|
}
|
|
23
38
|
},
|
|
24
39
|
"prettier": {
|
|
@@ -26,9 +41,18 @@
|
|
|
26
41
|
"singleQuote": true,
|
|
27
42
|
"trailingComma": "all"
|
|
28
43
|
},
|
|
44
|
+
"stylelint": {
|
|
45
|
+
"extends": "stylelint-config-standard-scss"
|
|
46
|
+
},
|
|
29
47
|
"scripts": {
|
|
30
|
-
"format": "
|
|
31
|
-
"
|
|
48
|
+
"format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
|
|
49
|
+
"format:eslint": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" --fix --ignore-path .gitignore",
|
|
50
|
+
"format:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --write --ignore-path .gitignore",
|
|
51
|
+
"format:stylelint": "stylelint --fix --allow-empty-input --ignore-path .gitignore \"**/*.{scss,css}\"",
|
|
52
|
+
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
53
|
+
"lint:eslint": "eslint \"{src,define,test}/**/*.{js,ts,json,html}\" \"index.*\" --ignore-path .gitignore",
|
|
54
|
+
"lint:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --check --ignore-path .gitignore",
|
|
55
|
+
"lint:stylelint": "stylelint --allow-empty-input --ignore-path .gitignore \"**/*.{scss,css}\""
|
|
32
56
|
},
|
|
33
57
|
"devDependencies": {
|
|
34
58
|
"eslint": "^8.0.0",
|
|
@@ -36,6 +60,8 @@
|
|
|
36
60
|
"husky": "^4.3.8",
|
|
37
61
|
"lint-staged": "^12.0.0",
|
|
38
62
|
"prettier": "^2.4.1",
|
|
39
|
-
"eslint-config-prettier": "^8.3.0"
|
|
63
|
+
"eslint-config-prettier": "^8.3.0",
|
|
64
|
+
"stylelint": "^14.0.0",
|
|
65
|
+
"stylelint-config-standard-scss": "^3.0.0"
|
|
40
66
|
}
|
|
41
67
|
}
|
|
@@ -26,12 +26,16 @@ __snapshots__
|
|
|
26
26
|
/dev/
|
|
27
27
|
/build/
|
|
28
28
|
/out-tsc/
|
|
29
|
-
|
|
29
|
+
*.min.js
|
|
30
|
+
*-styles.js
|
|
31
|
+
**/*/CHANGELOG.md
|
|
30
32
|
storybook-static
|
|
31
33
|
|
|
34
|
+
/packages/*/node_modules
|
|
32
35
|
/packages/*/package-lock.json
|
|
33
|
-
/packages/*/Jenkinsfile
|
|
34
36
|
/packages/*/build
|
|
35
|
-
/packages/*/
|
|
36
|
-
/packages
|
|
37
|
+
/packages/*/dev
|
|
38
|
+
/packages/*/dist
|
|
37
39
|
/packages/*/.gitignore
|
|
40
|
+
/packages/*/.editorconfig
|
|
41
|
+
/packages/*/Jenkinsfile
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
:host([hidden]),
|
|
6
|
+
:host([hidden]),
|
|
7
|
+
[hidden] {
|
|
7
8
|
display: none !important;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
*,
|
|
11
|
+
*,
|
|
12
|
+
*::before,
|
|
13
|
+
*::after {
|
|
11
14
|
box-sizing: inherit;
|
|
12
15
|
white-space: nowrap;
|
|
13
|
-
}
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
/* process.env.npm_lifecycle_event, process.env.npm_lifecycle_script, process.env.OUTDIR; */
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
5
5
|
import { defaultReporter } from '@web/test-runner';
|
|
6
6
|
import { mochaStyleReporter } from '@blockquote/test-runner-mocha-style-reporter';
|
|
7
7
|
|
|
@@ -17,11 +17,20 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
17
17
|
exportConditions: ['browser', 'development'],
|
|
18
18
|
},
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/** Browsers to run tests on */
|
|
21
|
+
browsers: [
|
|
22
|
+
playwrightLauncher({ product: 'chromium' }),
|
|
23
|
+
playwrightLauncher({ product: 'webkit' }),
|
|
23
24
|
],
|
|
24
25
|
|
|
26
|
+
/** Amount of browsers to run concurrently */
|
|
27
|
+
concurrentBrowsers: 2,
|
|
28
|
+
|
|
29
|
+
/** Amount of test files per browser to test concurrently */
|
|
30
|
+
concurrency: 1,
|
|
31
|
+
|
|
32
|
+
reporters: [defaultReporter(), mochaStyleReporter()],
|
|
33
|
+
|
|
25
34
|
coverageConfig: {
|
|
26
35
|
report: true,
|
|
27
36
|
reportDir: `${outDir}/test/coverage`,
|
|
@@ -43,7 +52,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
43
52
|
/** Filter out lit dev mode logs */
|
|
44
53
|
filterBrowserLogs(log) {
|
|
45
54
|
for (const arg of log.args) {
|
|
46
|
-
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
55
|
+
if (typeof arg === 'string' && filteredLogs.some((l) => arg.includes(l))) {
|
|
47
56
|
return false;
|
|
48
57
|
}
|
|
49
58
|
}
|
|
@@ -53,18 +62,5 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
53
62
|
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
54
63
|
// esbuildTarget: 'auto',
|
|
55
64
|
|
|
56
|
-
/** Amount of browsers to run concurrently */
|
|
57
|
-
// concurrentBrowsers: 2,
|
|
58
|
-
|
|
59
|
-
/** Amount of test files per browser to test concurrently */
|
|
60
|
-
// concurrency: 1,
|
|
61
|
-
|
|
62
|
-
/** Browsers to run tests on */
|
|
63
|
-
// browsers: [
|
|
64
|
-
// playwrightLauncher({ product: 'chromium' }),
|
|
65
|
-
// playwrightLauncher({ product: 'firefox' }),
|
|
66
|
-
// playwrightLauncher({ product: 'webkit' }),
|
|
67
|
-
// ],
|
|
68
|
-
|
|
69
65
|
// See documentation for all available options
|
|
70
66
|
});
|
|
@@ -43,7 +43,9 @@ export class <%= className %> extends LitElement {
|
|
|
43
43
|
|
|
44
44
|
_onClick() {
|
|
45
45
|
this.counter += 1;
|
|
46
|
-
this.dispatchEvent(
|
|
46
|
+
this.dispatchEvent(
|
|
47
|
+
new CustomEvent('counter-changed', { detail: this.counter }),
|
|
48
|
+
);
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/**
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
const heading = 'World!';
|
|
19
19
|
render(
|
|
20
|
-
html
|
|
20
|
+
html`<pe-pe
|
|
21
|
+
@counter-changed="${ev => console.log('==>', ev.detail)}"
|
|
22
|
+
.heading=${heading}
|
|
23
|
+
>some light-dom</pe-pe
|
|
24
|
+
>`,
|
|
21
25
|
document.querySelector('#demo'),
|
|
22
26
|
);
|
|
23
27
|
</script>
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
2
|
import { css } from 'lit';
|
|
3
3
|
|
|
4
|
-
export default css
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
export default css`:host {
|
|
5
|
+
display: block;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
:host([hidden]),
|
|
10
|
+
[hidden] {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`;
|
|
14
|
+
*,
|
|
15
|
+
*::before,
|
|
16
|
+
*::after {
|
|
17
|
+
box-sizing: inherit;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}`;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
2
|
import { css } from 'lit';
|
|
3
3
|
|
|
4
|
-
export default css
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
export default css`:host {
|
|
5
|
+
display: block;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
:host([hidden]),
|
|
10
|
+
[hidden] {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`;
|
|
14
|
+
*,
|
|
15
|
+
*::before,
|
|
16
|
+
*::after {
|
|
17
|
+
box-sizing: inherit;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}`;
|