Skip to content

Commit

Permalink
build: remove babel and webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Mar 25, 2024
1 parent 6306b11 commit 43ea846
Show file tree
Hide file tree
Showing 13 changed files with 11,232 additions and 16,537 deletions.
15 changes: 0 additions & 15 deletions babel.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion demos/examples/LanguageMultiSelect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const editor = $rdf.namedNode('http://example.com/LanguageMultiSelect')
export const component: (theme: 'lumo' | 'material') => Lazy<MultiEditorComponent> = theme => ({
editor,
async lazyRender() {
await import(`multiselect-combo-box/theme/${theme}/multiselect-combo-box`)
await import(/* @vite-ignore */`multiselect-combo-box/theme/${theme}/multiselect-combo-box`)

return ({ property }, { update }) => {
const languages = property.shape.in
Expand Down
2 changes: 1 addition & 1 deletion demos/examples/StarRating/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function loadIcon({ defaultIcon, shape, updateComponentState }: LoadIcon)
const iconName: IconName | undefined = shape.pointer.out(dash.icon).value as IconName
if (iconName) {
try {
({ definition: icon } = await import(`@fortawesome/free-solid-svg-icons/${iconName}.js`))
({ definition: icon } = await import(/* @vite-ignore */`@fortawesome/free-solid-svg-icons/${iconName}.js`))
} catch (e) {
icon = null
}
Expand Down
9 changes: 9 additions & 0 deletions demos/lit-html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
}
</style>
<title>@hydrofoil/shaperone lit-html playground</title>
<script type="module">
import process from "process";
import { Buffer } from "buffer";
import EventEmitter from "events";

window.Buffer = Buffer;
window.process = process;
window.EventEmitter = EventEmitter;
</script>
</head>

<body>
Expand Down
18 changes: 8 additions & 10 deletions demos/lit-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"license": "MIT",
"scripts": {
"prebuild": "rimraf ../../dist/playground",
"build": "webpack --mode production",
"start": "NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --mode development"
"build": "vite build",
"start": "vite"
},
"dependencies": {
"@captaincodeman/rdx": "^1.0.0-rc.8",
Expand Down Expand Up @@ -50,14 +50,12 @@
"nanoid": "^5.0.6"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-decorators": "^7.10.1",
"@babel/plugin-proposal-optional-chaining": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"browserify-zlib": "^0.2.0",
"process": "^0.11.10",
"rimraf": "^3.0.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
"rollup-plugin-node-polyfills": "^0.2.1",
"util": "^0.12.5",
"vite": "^5.2.6"
}
}
24 changes: 12 additions & 12 deletions demos/lit-html/src/configure.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Component } from '@hydrofoil/shaperone-core'
import * as nativeComponents from '@hydrofoil/shaperone-wc/NativeComponents'
import * as mwcComponents from '@hydrofoil/shaperone-wc-material/components'
import * as LanguageSelect from '@hydrofoil/shaperone-playground-examples/LanguageMultiSelect'
import * as StarRating from '@hydrofoil/shaperone-playground-examples/StarRating'
import { component as starRating } from '@hydrofoil/shaperone-playground-examples/StarRating'
import { DescriptionTooltip } from '@hydrofoil/shaperone-playground-examples/DescriptionTooltip'
import * as vaadinComponents from '@hydrofoil/shaperone-wc-vaadin/components'
import * as shoelaceComponents from '@hydrofoil/shaperone-wc-shoelace/components'
import { settings as shoelaceSettings } from '@hydrofoil/shaperone-wc-shoelace/settings'
import * as nativeComponents from '@hydrofoil/shaperone-wc/NativeComponents.js'
import * as mwcComponents from '@hydrofoil/shaperone-wc-material/components.js'
import * as LanguageSelect from '@hydrofoil/shaperone-playground-examples/LanguageMultiSelect/index.js'
import * as StarRating from '@hydrofoil/shaperone-playground-examples/StarRating/index.js'
import { component as starRating } from '@hydrofoil/shaperone-playground-examples/StarRating/index.js'
import { DescriptionTooltip } from '@hydrofoil/shaperone-playground-examples/DescriptionTooltip.js'
import * as vaadinComponents from '@hydrofoil/shaperone-wc-vaadin/components.js'
import * as shoelaceComponents from '@hydrofoil/shaperone-wc-shoelace/components.js'
import { settings as shoelaceSettings } from '@hydrofoil/shaperone-wc-shoelace/settings.js'
import { configure } from '@hydrofoil/shaperone-wc/configure.js'
import { dash } from '@tpluscode/rdf-ns-builders'
import { Decorate, RenderTemplate, templates } from '@hydrofoil/shaperone-wc/templates'
import * as MaterialRenderStrategy from '@hydrofoil/shaperone-wc-material/renderer'
import { Decorate, RenderTemplate, templates } from '@hydrofoil/shaperone-wc/templates.js'
import * as MaterialRenderStrategy from '@hydrofoil/shaperone-wc-material/renderer/index.js'
import shaperoneHydra from '@hydrofoil/shaperone-hydra'
import { validate } from '@hydrofoil/shaperone-rdf-validate-shacl'
import * as xone from '@hydrofoil/shaperone-playground-examples/XoneRenderer'
import * as xone from '@hydrofoil/shaperone-playground-examples/XoneRenderer/index.js'
import { errorSummary } from '@hydrofoil/shaperone-playground-examples/ErrorSummary/index.js'
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js'
import $rdf from './env.js'
Expand Down
37 changes: 37 additions & 0 deletions demos/lit-html/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig } from 'vite'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'

export default defineConfig({
define: {
global: 'window',
},
server: {
hmr: false,
},
resolve: {
alias: {
stream: 'readable-stream',
zlib: 'browserify-zlib',
util: 'util',
},
},
optimizeDeps: {
esbuildOptions: {
plugins: [
<any>NodeGlobalsPolyfillPlugin({
process: true,
buffer: true,
}),
],
},
},
build: {
rollupOptions: {
plugins: [
rollupNodePolyFill(),

Check failure on line 33 in demos/lit-html/vite.config.ts

View workflow job for this annotation

GitHub Actions / build

No overload matches this call.

Check failure on line 33 in demos/lit-html/vite.config.ts

View workflow job for this annotation

GitHub Actions / build

No overload matches this call.
],
},
},
})
9 changes: 0 additions & 9 deletions demos/lit-html/webpack.config.js

This file was deleted.

Loading

0 comments on commit 43ea846

Please sign in to comment.