@blockquote/create-wc 1.6.4 → 1.6.8
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 +42 -18
- package/src/common-repo/templates/eslintignore +17 -21
- package/src/common-repo/templates/gitignore +16 -20
- package/src/common-repo/templates/package.json +1 -1
- package/src/common-repo/templates/static/vite.config.js +19 -20
- package/src/common-repo/templates/styles/MyEl.scss +0 -1
- package/src/linting-eslint-ts/templates/package.json +17 -6
- package/src/testing-ts/templates/package.json +3 -2
- package/src/wc-lit-element/templates/MyEl.js +1 -3
- package/src/wc-lit-element/templates/package.json +3 -3
- package/src/wc-lit-element/templates/static/demo/index.html +4 -2
- package/src/wc-lit-element-ts/templates/MyEl.ts +1 -1
- package/src/wc-lit-element-ts/templates/package.json +10 -10
- package/src/wc-lit-element-ts/templates/static/demo/index.html +7 -1
- package/src/wc-lit-element-ts/templates/tsconfig.json +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
|
|
4
|
+
"format:eslint": "eslint \"**/*.{js,ts,html}\" --fix --ignore-path .eslintignore",
|
|
5
|
+
"format:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --write --ignore-path .eslintignore",
|
|
6
|
+
"format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .eslintignore",
|
|
7
|
+
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
8
|
+
"lint:eslint": "eslint \"**/*.{js,ts,html}\" --ignore-path .eslintignore",
|
|
9
|
+
"lint:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --check --ignore-path .eslintignore",
|
|
10
|
+
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .eslintignore"
|
|
11
|
+
},
|
|
2
12
|
"husky": {
|
|
3
13
|
"hooks": {
|
|
4
14
|
"pre-commit": "lint-staged"
|
|
@@ -15,6 +25,20 @@
|
|
|
15
25
|
"npm run format:stylelint"
|
|
16
26
|
]
|
|
17
27
|
},
|
|
28
|
+
"prettier": {
|
|
29
|
+
"arrowParens": "avoid",
|
|
30
|
+
"printWidth": 100,
|
|
31
|
+
"singleQuote": true,
|
|
32
|
+
"trailingComma": "all",
|
|
33
|
+
"overrides": [
|
|
34
|
+
{
|
|
35
|
+
"files": "*.{scss,css}",
|
|
36
|
+
"options": {
|
|
37
|
+
"singleQuote": false
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
18
42
|
"eslintConfig": {
|
|
19
43
|
"plugins": [
|
|
20
44
|
"log-filenames"
|
|
@@ -24,7 +48,6 @@
|
|
|
24
48
|
"@open-wc"
|
|
25
49
|
],
|
|
26
50
|
"rules": {
|
|
27
|
-
"import/no-unresolved": "off",
|
|
28
51
|
"class-methods-use-this": "off",
|
|
29
52
|
"object-curly-newline": "off",
|
|
30
53
|
"import/extensions": [
|
|
@@ -33,26 +56,27 @@
|
|
|
33
56
|
{
|
|
34
57
|
"ignorePackages": true
|
|
35
58
|
}
|
|
36
|
-
]
|
|
59
|
+
],
|
|
60
|
+
"import/no-extraneous-dependencies": [
|
|
61
|
+
"error",
|
|
62
|
+
{
|
|
63
|
+
"devDependencies": [
|
|
64
|
+
"**/test/**/*.{js,ts}",
|
|
65
|
+
"**/*.config.{js,mjs,cjs}",
|
|
66
|
+
"**/*.conf.{js,mjs,cjs}"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"import/no-unresolved": "off",
|
|
71
|
+
"import/prefer-default-export": "off"
|
|
37
72
|
}
|
|
38
73
|
},
|
|
39
|
-
"prettier": {
|
|
40
|
-
"arrowParens": "avoid",
|
|
41
|
-
"singleQuote": true,
|
|
42
|
-
"trailingComma": "all"
|
|
43
|
-
},
|
|
44
74
|
"stylelint": {
|
|
45
|
-
"extends": "stylelint-config-standard-scss"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"format:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --write --ignore-path .eslintignore",
|
|
51
|
-
"format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .eslintignore",
|
|
52
|
-
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
53
|
-
"lint:eslint": "eslint \"**/*.{js,ts,html}\" --ignore-path .eslintignore",
|
|
54
|
-
"lint:prettier": "prettier \"**/*.{js,ts,json,html,md}\" --check --ignore-path .eslintignore",
|
|
55
|
-
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .eslintignore"
|
|
75
|
+
"extends": "stylelint-config-standard-scss",
|
|
76
|
+
"rules": {
|
|
77
|
+
"custom-property-pattern": null,
|
|
78
|
+
"max-line-length": null
|
|
79
|
+
}
|
|
56
80
|
},
|
|
57
81
|
"devDependencies": {
|
|
58
82
|
"@open-wc/eslint-config": "^7.0.0",
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
## editors
|
|
2
2
|
/.idea
|
|
3
3
|
/.vscode
|
|
4
|
+
/*.code-workspace
|
|
4
5
|
|
|
5
6
|
## system files
|
|
6
7
|
.DS_Store
|
|
7
8
|
|
|
8
|
-
## npm
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
## npm/yarn
|
|
10
|
+
node_modules
|
|
11
|
+
npm-debug.log
|
|
11
12
|
*-debug.log
|
|
13
|
+
yarn-error.log
|
|
12
14
|
|
|
13
15
|
## testing
|
|
14
|
-
|
|
16
|
+
coverage
|
|
15
17
|
**/coverage/
|
|
16
|
-
|
|
18
|
+
reports
|
|
17
19
|
__snapshots__
|
|
20
|
+
screenshots/.current
|
|
21
|
+
screenshots/.diff
|
|
18
22
|
|
|
19
|
-
## temp folders
|
|
20
|
-
/.tmp/
|
|
21
23
|
|
|
22
24
|
## build
|
|
23
25
|
*.config.js
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
_site
|
|
27
|
+
dist
|
|
28
|
+
dev
|
|
29
|
+
build
|
|
30
|
+
.tmp
|
|
31
|
+
*.tgz
|
|
32
|
+
*.tsbuildinfo
|
|
29
33
|
storybook-static
|
|
30
|
-
|
|
31
|
-
/packages/*/node_modules
|
|
32
|
-
/packages/*/package-lock.json
|
|
33
|
-
/packages/*/_site
|
|
34
|
-
/packages/*/dist
|
|
35
|
-
/packages/*/dev
|
|
36
|
-
/packages/*/build
|
|
37
|
-
/packages/*/Jenkinsfile
|
|
38
34
|
## end gitignore
|
|
39
35
|
|
|
40
36
|
## specific eslintignore
|
|
41
37
|
package-lock.json
|
|
42
38
|
*.min.js
|
|
43
|
-
*-styles
|
|
39
|
+
*-styles.*
|
|
44
40
|
CHANGELOG.md
|
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
## editors
|
|
2
2
|
/.idea
|
|
3
3
|
/.vscode
|
|
4
|
+
/*.code-workspace
|
|
4
5
|
|
|
5
6
|
## system files
|
|
6
7
|
.DS_Store
|
|
7
8
|
|
|
8
|
-
## npm
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
## npm/yarn
|
|
10
|
+
node_modules
|
|
11
|
+
npm-debug.log
|
|
11
12
|
*-debug.log
|
|
13
|
+
yarn-error.log
|
|
12
14
|
|
|
13
15
|
## testing
|
|
14
|
-
|
|
16
|
+
coverage
|
|
15
17
|
**/coverage/
|
|
16
|
-
|
|
18
|
+
reports
|
|
17
19
|
__snapshots__
|
|
20
|
+
screenshots/.current
|
|
21
|
+
screenshots/.diff
|
|
18
22
|
|
|
19
|
-
## temp folders
|
|
20
|
-
/.tmp/
|
|
21
23
|
|
|
22
24
|
## build
|
|
23
25
|
*.config.js
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
_site
|
|
27
|
+
dist
|
|
28
|
+
dev
|
|
29
|
+
build
|
|
30
|
+
.tmp
|
|
31
|
+
*.tgz
|
|
32
|
+
*.tsbuildinfo
|
|
29
33
|
storybook-static
|
|
30
|
-
|
|
31
|
-
/packages/*/node_modules
|
|
32
|
-
/packages/*/package-lock.json
|
|
33
|
-
/packages/*/_site
|
|
34
|
-
/packages/*/dist
|
|
35
|
-
/packages/*/dev
|
|
36
|
-
/packages/*/build
|
|
37
|
-
/packages/*/Jenkinsfile
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@web/rollup-plugin-html": "^1.10.1",
|
|
34
34
|
"@webcomponents/shadycss": "^1.11.0",
|
|
35
35
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
36
|
-
"concurrently": "^
|
|
36
|
+
"concurrently": "^7.0.0",
|
|
37
37
|
"rollup-plugin-copy": "^3.4.0",
|
|
38
38
|
"rollup-plugin-summary": "^1.3.0",
|
|
39
39
|
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
@@ -57,26 +57,6 @@ const copyConfig = {
|
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
export default defineConfig({
|
|
60
|
-
plugins: [
|
|
61
|
-
pluginHtml({
|
|
62
|
-
transformHtml: [
|
|
63
|
-
html =>
|
|
64
|
-
html.replace(
|
|
65
|
-
'<meta charset="utf-8">',
|
|
66
|
-
`<meta charset="utf-8">
|
|
67
|
-
<script src="./web_modules/@ungap/global-this/index.js"></script>
|
|
68
|
-
<script src="./web_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js"></script>
|
|
69
|
-
<script src="./web_modules/lit/polyfill-support.js"></script>
|
|
70
|
-
<script src="./web_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
71
|
-
<script src="./web_modules/@webcomponents/shadycss/custom-style-interface.min.js"></script>`,
|
|
72
|
-
),
|
|
73
|
-
],
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
minifyHTML(minifyHTMLLiteralsConfig),
|
|
77
|
-
copy(copyConfig),
|
|
78
|
-
summary(),
|
|
79
|
-
],
|
|
80
60
|
build: {
|
|
81
61
|
target: ['edge18'],
|
|
82
62
|
outDir: 'dev',
|
|
@@ -86,6 +66,25 @@ export default defineConfig({
|
|
|
86
66
|
dir: 'dev/',
|
|
87
67
|
format: 'es',
|
|
88
68
|
},
|
|
69
|
+
plugins: [
|
|
70
|
+
pluginHtml({
|
|
71
|
+
transformHtml: [
|
|
72
|
+
html =>
|
|
73
|
+
html.replace(
|
|
74
|
+
'<meta charset="utf-8">',
|
|
75
|
+
`<meta charset="utf-8">
|
|
76
|
+
<script src="./web_modules/@ungap/global-this/index.js"></script>
|
|
77
|
+
<script src="./web_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js"></script>
|
|
78
|
+
<script src="./web_modules/lit/polyfill-support.js"></script>
|
|
79
|
+
<script src="./web_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
80
|
+
<script src="./web_modules/@webcomponents/shadycss/custom-style-interface.min.js"></script>`,
|
|
81
|
+
),
|
|
82
|
+
],
|
|
83
|
+
}),
|
|
84
|
+
minifyHTML(minifyHTMLLiteralsConfig),
|
|
85
|
+
copy(copyConfig),
|
|
86
|
+
summary(),
|
|
87
|
+
],
|
|
89
88
|
},
|
|
90
89
|
},
|
|
91
90
|
});
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"devDependencies": {
|
|
3
|
-
"@typescript-eslint/parser": "^5.0.0",
|
|
4
|
-
"@typescript-eslint/eslint-plugin": "^5.0.0"
|
|
5
|
-
},
|
|
6
2
|
"eslintConfig": {
|
|
7
3
|
"parser": "@typescript-eslint/parser",
|
|
8
4
|
"plugins": [
|
|
9
5
|
"@typescript-eslint"
|
|
10
6
|
],
|
|
11
7
|
"rules": {
|
|
12
|
-
"indent": [
|
|
8
|
+
"indent": [
|
|
9
|
+
"error",
|
|
10
|
+
2,
|
|
11
|
+
{
|
|
12
|
+
"SwitchCase": 1,
|
|
13
|
+
"ignoredNodes": [
|
|
14
|
+
"PropertyDefinition"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
13
18
|
"no-unused-vars": "off",
|
|
14
|
-
"@typescript-eslint/no-unused-vars": [
|
|
19
|
+
"@typescript-eslint/no-unused-vars": [
|
|
20
|
+
"error"
|
|
21
|
+
]
|
|
15
22
|
}
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
26
|
+
"@typescript-eslint/parser": "^5.0.0"
|
|
16
27
|
}
|
|
17
28
|
}
|
|
@@ -43,9 +43,7 @@ export class <%= className %> extends LitElement {
|
|
|
43
43
|
|
|
44
44
|
_onClick() {
|
|
45
45
|
this.counter += 1;
|
|
46
|
-
this.dispatchEvent(
|
|
47
|
-
new CustomEvent('counter-changed', { detail: this.counter }),
|
|
48
|
-
);
|
|
46
|
+
this.dispatchEvent(new CustomEvent('counter-changed', { detail: this.counter }));
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
/**
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"!/**/*.scss"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"wds": "web-dev-server",
|
|
11
|
+
"build": "echo \"This is not a TypeScript project, so no need to build.\"",
|
|
13
12
|
"sass:watch": "sass-style-template",
|
|
14
|
-
"
|
|
13
|
+
"start:wds": "concurrently -k -r \"npm:sass:watch\" \"npm:wds\"",
|
|
14
|
+
"wds": "web-dev-server"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<title>Demo <%= tagName %></title>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
4
6
|
<meta charset="utf-8" />
|
|
5
7
|
<style>
|
|
6
8
|
body {
|
|
@@ -17,10 +19,10 @@
|
|
|
17
19
|
|
|
18
20
|
const heading = 'World!';
|
|
19
21
|
render(
|
|
20
|
-
html
|
|
22
|
+
html`<<%= tagName %>
|
|
21
23
|
@counter-changed="${ev => console.log('==>', ev.detail)}"
|
|
22
24
|
.heading=${heading}
|
|
23
|
-
>some light-dom
|
|
25
|
+
>some light-dom</<%= tagName %>
|
|
24
26
|
>`,
|
|
25
27
|
document.querySelector('#demo'),
|
|
26
28
|
);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"exports": {
|
|
3
|
+
".": "./dist/index.js",
|
|
4
|
+
"./<%= tagName %>.js": "./dist/define/<%= tagName %>.js"
|
|
5
|
+
},
|
|
2
6
|
"main": "dist/index.js",
|
|
3
7
|
"module": "dist/index.js",
|
|
4
8
|
"files": [
|
|
@@ -6,19 +10,15 @@
|
|
|
6
10
|
"/dist/index.*",
|
|
7
11
|
"!/dist/test/"
|
|
8
12
|
],
|
|
9
|
-
"exports": {
|
|
10
|
-
".": "./dist/index.js",
|
|
11
|
-
"./<%= tagName %>.js": "./dist/define/<%= tagName %>.js"
|
|
12
|
-
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"start:wds": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"npm:sass:watch\" \"npm:wds\"",
|
|
15
|
-
"wds": "web-dev-server",
|
|
16
|
-
"sass:watch": "sass-style-template -j ts",
|
|
17
14
|
"build": "npm run build:tsc && npm run dev:vite",
|
|
18
|
-
"build:tsc": "tsc"
|
|
15
|
+
"build:tsc": "tsc",
|
|
16
|
+
"sass:watch": "sass-style-template -j ts",
|
|
17
|
+
"start:wds": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"npm:sass:watch\" \"npm:wds\"",
|
|
18
|
+
"wds": "web-dev-server"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"tslib": "^2.3.1",
|
|
22
|
+
"typescript": "^4.4.4"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<title>Demo <%= tagName %></title>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
4
6
|
<meta charset="utf-8" />
|
|
5
7
|
<style>
|
|
6
8
|
body {
|
|
@@ -17,7 +19,11 @@
|
|
|
17
19
|
|
|
18
20
|
const heading = 'World!';
|
|
19
21
|
render(
|
|
20
|
-
html`<<%= tagName %>
|
|
22
|
+
html`<<%= tagName %>
|
|
23
|
+
@counter-changed="${ev => console.log('==>', ev.detail)}"
|
|
24
|
+
.heading=${heading}
|
|
25
|
+
>some light-dom</<%= tagName %>
|
|
26
|
+
>`,
|
|
21
27
|
document.querySelector('#demo'),
|
|
22
28
|
);
|
|
23
29
|
</script>
|