Add directly listing for releases (fix error) (#839)

* move copy index.html out of !production to run every time

* format

* dir syntax

* file order in dir listing

* Example title
This commit is contained in:
Ted Patrick
2022-10-08 18:34:28 -05:00
committed by GitHub
parent 18ede2b729
commit 54cb35b60a
2 changed files with 21 additions and 17 deletions

View File

@@ -13,13 +13,13 @@ const production = !process.env.ROLLUP_WATCH || (process.env.NODE_ENV === "produ
export default {
input: "src/main.ts",
output:[
output: [
{
sourcemap: true,
format: "iife",
inlineDynamicImports: true,
name: "app",
file: "build/pyscript.js",
sourcemap: true,
format: "iife",
inlineDynamicImports: true,
name: "app",
file: "build/pyscript.js",
},
{
file: "build/pyscript.min.js",
@@ -47,18 +47,22 @@ export default {
}),
// This will make sure that examples will always get the latest build folder
!production && copy({
targets: [
{ src: 'build/*', dest: 'examples/build' },
{ src: 'public/index.html', dest: 'build/' },
]
}),
targets: [
{ src: 'build/*', dest: 'examples/build' },
]
}),
copy({
targets: [
{ src: 'public/index.html', dest: 'build' },
]
}),
!production && serve(),
!production && livereload("public"),
// production && terser(),
!production && serve({
port: 8080,
contentBase: 'examples'}
)
contentBase: 'examples'
})
],
watch: {
clearScreen: false,