Skip to content

Commit e5c6645

Browse files
authored
docs: prepare API docs for publishing (#77)
1 parent b2e0cbd commit e5c6645

File tree

186 files changed

+650
-1963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+650
-1963
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules
22
coverage
3-
packages/**/analysis.json
4-
packages/**/dist
3+
dist
4+
analysis.json

index.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Vaadin web components</title>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
</head>
8+
<body>
9+
<style>
10+
iron-component-page {
11+
--app-drawer-width: 320px;
12+
}
13+
</style>
14+
15+
<iron-component-page></iron-component-page>
16+
17+
<script type="module">
18+
import '@polymer/iron-component-page/iron-component-page.js';
19+
20+
requestAnimationFrame(() => {
21+
setTimeout(() => {
22+
const page = document.querySelector('iron-component-page');
23+
const nav = page.shadowRoot.querySelector('iron-doc-nav');
24+
const repeat = nav.shadowRoot.querySelector('dom-repeat');
25+
// hide mixins section from the navigation
26+
repeat.addEventListener('dom-change', () => {
27+
const sections = nav.shadowRoot.querySelectorAll('section');
28+
sections[sections.length - 2].setAttribute('hidden', '');
29+
});
30+
});
31+
});
32+
</script>
33+
</body>
34+
</html>

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@
1717
]
1818
},
1919
"scripts": {
20+
"analyze": "polymer analyze packages/**/vaadin-*.js > analysis.json && node scripts/prepareDocs.js",
2021
"debug": "web-test-runner --watch",
21-
"dist": "lerna run dist --stream",
22+
"dist": "rimraf dist && yarn analyze && rollup -c rollup.config.js && cp analysis.json dist",
23+
"docs": "yarn analyze && web-dev-server --node-resolve --open",
2224
"lint": "npm-run-all --parallel lint:*",
2325
"lint:css": "stylelint packages/**/src/*.js packages/**/theme/**/*-styles.js",
2426
"lint:js": "eslint *.js scripts packages",
2527
"lint:types": "tsc",
2628
"preversion": "node scripts/updateVersion.js",
29+
"serve:dist": "web-dev-server --app-index dist/index.html --open",
2730
"test": "web-test-runner --coverage",
2831
"test:firefox": "web-test-runner --config web-test-runner-firefox.config.js",
2932
"test:lumo": "web-test-runner --config web-test-runner-lumo.config.js",
@@ -33,7 +36,10 @@
3336
"update:material": "TEST_ENV=update web-test-runner --config web-test-runner-material.config.js"
3437
},
3538
"devDependencies": {
39+
"@open-wc/rollup-plugin-html": "^1.2.5",
40+
"@polymer/iron-component-page": "^4.0.0",
3641
"@vaadin/testing-helpers": "^0.1.3",
42+
"@web/dev-server": "^0.1.8",
3743
"@web/test-runner": "^0.12.17",
3844
"@web/test-runner-playwright": "^0.8.4",
3945
"@web/test-runner-saucelabs": "^0.5.0",
@@ -47,6 +53,9 @@
4753
"npm-run-all": "^4.1.5",
4854
"prettier": "^2.2.1",
4955
"replace-in-file": "^6.2.0",
56+
"rimraf": "^3.0.2",
57+
"rollup": "^2.34.1",
58+
"rollup-plugin-terser": "^7.0.2",
5059
"stylelint": "^13.11.0",
5160
"stylelint-config-prettier": "^8.0.2",
5261
"stylelint-config-vaadin": "^0.2.10",

packages/vaadin-accordion/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/vaadin-accordion/package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
"src",
2525
"theme"
2626
],
27-
"scripts": {
28-
"dist": "rimraf dist && polymer analyze vaadin-* > analysis.json && rollup -c rollup.config.js && cp analysis.json dist"
29-
},
3027
"dependencies": {
3128
"@polymer/polymer": "^3.0.0",
3229
"@vaadin/vaadin-details": "^20.0.0-alpha1",
@@ -37,13 +34,8 @@
3734
},
3835
"devDependencies": {
3936
"@esm-bundle/chai": "^4.1.5",
40-
"@open-wc/rollup-plugin-html": "^1.2.5",
4137
"@open-wc/testing-helpers": "^1.8.12",
42-
"@polymer/iron-component-page": "^4.0.0",
4338
"@polymer/iron-test-helpers": "^3.0.0",
44-
"rimraf": "^3.0.2",
45-
"rollup": "^2.34.1",
46-
"rollup-plugin-terser": "^7.0.2",
4739
"sinon": "^9.2.1"
4840
},
4941
"publishConfig": {

packages/vaadin-app-layout/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/vaadin-app-layout/package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
"src",
2525
"theme"
2626
],
27-
"scripts": {
28-
"dist": "rimraf dist && polymer analyze vaadin-* > analysis.json && rollup -c rollup.config.js && cp analysis.json dist"
29-
},
3027
"dependencies": {
3128
"@polymer/polymer": "^3.0.0",
3229
"@vaadin/vaadin-button": "^20.0.0-alpha1",
@@ -37,15 +34,10 @@
3734
},
3835
"devDependencies": {
3936
"@esm-bundle/chai": "^4.1.5",
40-
"@open-wc/rollup-plugin-html": "^1.2.5",
4137
"@open-wc/testing-helpers": "^1.8.12",
42-
"@polymer/iron-component-page": "^4.0.0",
4338
"@polymer/iron-test-helpers": "^3.0.1",
4439
"@vaadin/vaadin-icons": "^20.0.0-alpha1",
4540
"@vaadin/vaadin-tabs": "^20.0.0-alpha1",
46-
"rimraf": "^3.0.2",
47-
"rollup": "^2.34.1",
48-
"rollup-plugin-terser": "^7.0.2",
4941
"sinon": "^9.2.1"
5042
},
5143
"publishConfig": {

packages/vaadin-app-layout/rollup.config.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/vaadin-avatar/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/vaadin-avatar/package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
"src",
2525
"theme"
2626
],
27-
"scripts": {
28-
"dist": "rimraf dist && polymer analyze vaadin-* > analysis.json && rollup -c rollup.config.js && cp analysis.json dist"
29-
},
3027
"dependencies": {
3128
"@polymer/iron-a11y-announcer": "^3.0.0",
3229
"@polymer/iron-resizable-behavior": "^3.0.0",
@@ -41,13 +38,8 @@
4138
},
4239
"devDependencies": {
4340
"@esm-bundle/chai": "^4.1.5",
44-
"@open-wc/rollup-plugin-html": "^1.2.5",
4541
"@open-wc/testing-helpers": "^1.8.12",
46-
"@polymer/iron-component-page": "^4.0.0",
4742
"@polymer/iron-test-helpers": "^3.0.0",
48-
"rimraf": "^3.0.2",
49-
"rollup": "^2.34.1",
50-
"rollup-plugin-terser": "^7.0.2",
5143
"sinon": "^9.2.1"
5244
},
5345
"publishConfig": {

0 commit comments

Comments
 (0)