Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9d8d7d3
ci: run CI against node 18, 20, and 22
Westbrook May 25, 2024
f17e1d7
fix: ensure all index.html files leverage the "viewport" meta tag
Westbrook May 25, 2024
71ee024
refactor: only use .js extensions now that the projects are "type=mod…
Westbrook May 25, 2024
2baef09
feat: move to Storybook Builder from Storybook Pre-built
Westbrook May 25, 2024
15daca1
feat: update husky to 9.x
Westbrook May 25, 2024
fbea666
fix: remove wallaby templates
Westbrook May 25, 2024
cccadaf
deps: use latest OpenWC versions
Westbrook May 25, 2024
f297416
deps: use latest @web versions
Westbrook May 25, 2024
b9c80c8
deps: update @babel dependencies
Westbrook May 26, 2024
5deee97
deps: use latest Rollup depednencies
Westbrook May 26, 2024
429928f
deps: use latest TS
Westbrook May 26, 2024
efce76e
deps: use latest CEM analyzer
Westbrook May 26, 2024
a9a4961
deps: use latest lint-staged
Westbrook May 26, 2024
05b6d7a
deps: use latest prettier depdendencies
Westbrook May 26, 2024
17989cb
deps: update concurrently
Westbrook May 26, 2024
e02fcbf
deps: use latest rimraf (#110)
Westbrook May 27, 2024
ba21bd7
deps: latest lint plugins (#111)
Westbrook May 27, 2024
35cf358
deps: use lit@^3.0 (#113)
Westbrook May 27, 2024
4514a9d
chore: normalize on using "web-dev-server" over "wds" (#114)
Westbrook May 27, 2024
100bd54
chore: update tsconfig for more modern values (#116)
Westbrook May 27, 2024
8aa9ced
deps: use latest deepmerge (#117)
Westbrook May 27, 2024
0d34373
fix: remove "require" in ESM contexts (#118)
Westbrook May 27, 2024
8c6f697
chore: remove unused dependency (#120)
Westbrook May 27, 2024
39f3a19
fix: ensure stories work in TS projects (#119)
Westbrook May 27, 2024
45c6ce3
fix: correct more info URL in output (#121)
Westbrook May 27, 2024
acde304
remove: take "@babel/preset-env" out of the generators (#122)
Westbrook May 28, 2024
ecdf931
docs: outline node version usage (#126)
Westbrook May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 14.x
uses: actions/setup-node@master
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 22.x
registry-url: 'https://registry.npmjs.org'

- name: Get yarn cache directory path
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/verify-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand All @@ -31,7 +31,5 @@ jobs:
- name: Lint
run: yarn lint

- run: npm config set scripts-prepend-node-path true

- name: Test
run: yarn test
10 changes: 4 additions & 6 deletions .github/workflows/verify-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node 14.x
uses: actions/setup-node@v2
- name: Setup Node 22.x
uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 22.x
cache: 'yarn'

- name: Install dependencies
Expand All @@ -30,7 +30,5 @@ jobs:
- name: Build
run: yarn build

- run: npm config set scripts-prepend-node-path true

- name: Test
run: yarn test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Web component project scaffolding.
npm init @open-wc
```

<div class="custom-block warning"><p class="custom-block-title">WARNING</p> <p><code>npm init</code> requires node 14 &amp; npm 6 or higher</p></div>
<div class="custom-block warning"><p class="custom-block-title">WARNING</p> <p><code>npm init</code> requires node 18 &amp; npm 6 or higher</p></div>

This will kickstart a menu guiding you through all available actions.

Expand All @@ -30,7 +30,7 @@ This will kickstart a menu guiding you through all available actions.
.d' Web Components `b. Start or upgrade your web component project with
.d' `b. ease. All our recommendations at your fingertips.
:: ................. ::
`p. .q' See more details at https://open-wc.org/init/
`p. .q' See more details at https://open-wc.org/docs/development/generator/
`p. open-wc.org .q'
`b. @openWc .d'
`q.. ..,' Note: you can exit any time with Ctrl+C or Esc
Expand Down
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"access": "public"
},
"description": "Easily setup all the tools of Open Web Components.",
"engines": {
"node": ">=18.0.0"
},
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -54,30 +57,30 @@
"devDependencies": {
"@babel/cli": "^7.24.6",
"@babel/core": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"@babel/register": "^7.24.6",
"@custom-elements-manifest/analyzer": "^0.4.17",
"@open-wc/building-rollup": "^2.2.3",
"@open-wc/eslint-config": "^9.2.2",
"@open-wc/testing": "^2.5.33",
"@rollup/plugin-babel": "^5.3.1",
"@web/rollup-plugin-html": "^1.11.1",
"@web/rollup-plugin-import-meta-assets": "^1.0.8",
"@custom-elements-manifest/analyzer": "^0.10.2",
"@open-wc/eslint-config": "^12.0.3",
"@open-wc/testing": "^4.0.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"@web/rollup-plugin-html": "^2.3.0",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"babel-plugin-transform-dynamic-import": "^2.1.0",
"chai": "^4.4.1",
"chai-fs": "^2.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-lit": "^1.13.0",
"eslint-plugin-lit-a11y": "^1.1.0",
"eslint-plugin-lit-a11y": "^4.1.2",
"eslint-plugin-wc": "^1.5.0",
"lit": "^2.0.2",
"lit-element": "^2.5.1",
"lit": "^3.0.0",
"lit-element": "^4.0.0",
"mocha": "^9.2.2",
"onchange": "^7.1.0",
"prettier": "^2.8.8",
"rollup-plugin-esbuild": "^5.0.0",
"prettier": "^3.2.5",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-workbox": "^8.1.0",
"commit-and-tag-version": "^9.6.0"
},
"prettier": {
Expand Down
12 changes: 6 additions & 6 deletions src/generators/app-lit-element-ts/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"license": "MIT",
"type": "module",
"scripts": {
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\""
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"web-dev-server\""
},
"dependencies": {
"lit": "^2.0.2"
"lit": "^3.0.0"
},
"devDependencies": {
"@web/dev-server": "^0.1.38",
"concurrently": "^5.3.0",
"typescript": "^4.5.5",
"tslib": "^2.3.1"
"@web/dev-server": "^0.4.5",
"concurrently": "^8.2.2",
"typescript": "^5.4.5",
"tslib": "^2.6.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
stories: ['../**/out-tsc/stories/*.stories.{js,md,mdx}'],
const config = {
stories: ['../out-tsc/stories/**/*.stories.{js,md,mdx}'],
framework: {
name: '@web/storybook-framework-web-components',
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import { playwrightLauncher } from '@web/test-runner-playwright';

const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
const filteredLogs = ['Running in dev mode', 'Lit is in dev mode'];

export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
/** Test files to run */
Expand Down
11 changes: 6 additions & 5 deletions src/generators/app-lit-element-ts/templates/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"target": "es2018",
"module": "esnext",
"moduleResolution": "node",
"target": "es2021",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmitOnError": true,
"lib": ["es2017", "dom"],
"lib": ["es2021", "dom", "DOM.Iterable"],
"strict": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
Expand All @@ -14,7 +14,8 @@
"sourceMap": true,
"inlineSources": true,
"rootDir": "./",
"incremental": true
"incremental": true,
"skipLibCheck": true
},
"include": ["**/*.ts"]
}
4 changes: 2 additions & 2 deletions src/generators/app-lit-element/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"start": "web-dev-server"
},
"dependencies": {
"lit": "^2.0.2"
"lit": "^3.0.0"
},
"devDependencies": {
"@web/dev-server": "^0.1.38"
"@web/dev-server": "^0.4.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
stories: ['../**/stories/*.stories.{js,md,mdx}'],
const config = {
stories: ['../stories/*.stories.{js,md,mdx}'],
framework: {
name: '@web/storybook-framework-web-components',
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import { playwrightLauncher } from '@web/test-runner-playwright';

const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
const filteredLogs = ['Running in dev mode', 'Lit is in dev mode'];

export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
/** Test files to run */
Expand Down
2 changes: 1 addition & 1 deletion src/generators/app/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default `
\`p. .q'
\`p. open-wc.org .q'
\`b. @openWc .d'
\`q.. ..,' See more details at https://open-wc.org/init/
\`q.. ..,' See more details at https://open-wc.org/docs/development/generator/
'',,,,,,,,,,''

`;
18 changes: 8 additions & 10 deletions src/generators/building-rollup-ts/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
"start:build": "web-dev-server --root-dir dist --app-index index.html --open"
},
"devDependencies": {
"@babel/preset-env": "^7.24.6",
"@open-wc/building-rollup": "^2.2.3",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@web/rollup-plugin-html": "^1.11.1",
"@web/rollup-plugin-import-meta-assets": "^1.0.8",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"@web/rollup-plugin-html": "^2.3.0",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"babel-plugin-template-html-minifier": "^4.1.0",
"deepmerge": "^4.3.1",
"rimraf": "^3.0.2",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-workbox": "^6.2.2",
"rollup": "^2.60.2"
"rimraf": "^5.0.7",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-workbox": "^8.1.0",
"rollup": "^4.18.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import html from '@web/rollup-plugin-html';
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets';
import esbuild from 'rollup-plugin-esbuild';
import { generateSW } from 'rollup-plugin-workbox';
Expand Down Expand Up @@ -37,7 +37,7 @@ export default {
babel({
plugins: [
[
require.resolve('babel-plugin-template-html-minifier'),
'babel-plugin-template-html-minifier',
{
modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] },
failOnError: false,
Expand Down
18 changes: 8 additions & 10 deletions src/generators/building-rollup/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
"start:build": "web-dev-server --root-dir dist --app-index index.html --open"
},
"devDependencies": {
"@babel/preset-env": "^7.24.6",
"@open-wc/building-rollup": "^2.2.3",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@web/rollup-plugin-html": "^1.11.1",
"@web/rollup-plugin-import-meta-assets": "^1.0.8",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"@web/rollup-plugin-html": "^2.3.0",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"babel-plugin-template-html-minifier": "^4.1.0",
"deepmerge": "^4.3.1",
"rimraf": "^3.0.2",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-workbox": "^6.2.2",
"rollup": "^2.60.2"
"rimraf": "^5.0.7",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-workbox": "^8.1.0",
"rollup": "^4.18.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import html from '@web/rollup-plugin-html';
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets';
import esbuild from 'rollup-plugin-esbuild';
import { generateSW } from 'rollup-plugin-workbox';
Expand Down Expand Up @@ -37,7 +37,7 @@ export default {
babel({
plugins: [
[
require.resolve('babel-plugin-template-html-minifier'),
'babel-plugin-template-html-minifier',
{
modules: { lit: ['html', { name: 'css', encapsulation: 'style' }] },
failOnError: false,
Expand Down
2 changes: 1 addition & 1 deletion src/generators/common-repo/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"analyze": "cem analyze --litelement"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.4.17"
"@custom-elements-manifest/analyzer": "^0.10.2"
}
}
12 changes: 9 additions & 3 deletions src/generators/demoing-storybook-ts/templates/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"scripts": {
"storybook": "tsc && <%= scriptRunCommand %> analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
"storybook:build": "tsc && <%= scriptRunCommand %> analyze -- --exclude dist && build-storybook"
"storybook": "tsc && <%= scriptRunCommand %> analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"storybook dev -p 8080\"",
"storybook:build": "tsc && <%= scriptRunCommand %> analyze -- --exclude dist && storybook build"
},
"devDependencies": {
"@web/dev-server-storybook": "^0.5.4"
"@storybook/addon-a11y": "^7.5.0",
"@storybook/addon-essentials": "^7.5.0",
"@storybook/addon-links": "^7.5.0",
"@storybook/web-components": "^7.5.0",
"@web/storybook-builder": "^0.1.16",
"@web/storybook-framework-web-components": "^0.1.2",
"storybook": "^7.5.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
stories: ['../dist/stories/**/*.stories.{js,md,mdx}'],
const config = {
stories: ['../**/dist/stories/*.stories.{js,md,mdx}'],
framework: {
name: '@web/storybook-framework-web-components',
},
};

export default config;
Loading