kopia lustrzana https://github.com/shoelace-style/shoelace
prettier
rodzic
bd590f5344
commit
a9b4dfbd99
|
@ -93,7 +93,7 @@ async function buildTheSource() {
|
||||||
// Public utilities
|
// Public utilities
|
||||||
...(await globby('./src/utilities/**/!(*.(style|test)).ts')),
|
...(await globby('./src/utilities/**/!(*.(style|test)).ts')),
|
||||||
// Theme stylesheets
|
// Theme stylesheets
|
||||||
...(await globby('./src/themes/**/!(*.test).ts')),
|
...(await globby('./src/themes/**/!(*.test).ts'))
|
||||||
],
|
],
|
||||||
outdir: cdndir,
|
outdir: cdndir,
|
||||||
chunkNames: 'chunks/[name].[hash]',
|
chunkNames: 'chunks/[name].[hash]',
|
||||||
|
@ -132,23 +132,19 @@ async function buildTheSource() {
|
||||||
...(await globby('./src/react/**/*.ts'))
|
...(await globby('./src/react/**/*.ts'))
|
||||||
],
|
],
|
||||||
outdir: 'dist/react',
|
outdir: 'dist/react',
|
||||||
chunkNames: 'react-chunks/[name].[hash]',
|
chunkNames: 'react-chunks/[name].[hash]'
|
||||||
}
|
};
|
||||||
|
|
||||||
const configs = [
|
const configs = [cdnConfig, npmConfig, reactConfig];
|
||||||
cdnConfig,
|
|
||||||
npmConfig,
|
|
||||||
reactConfig
|
|
||||||
]
|
|
||||||
|
|
||||||
if (serve) {
|
if (serve) {
|
||||||
// Use the context API to allow incremental dev builds
|
// Use the context API to allow incremental dev builds
|
||||||
const contexts = await Promise.all(configs.map((config) => esbuild.context(config)));
|
const contexts = await Promise.all(configs.map(config => esbuild.context(config)));
|
||||||
await Promise.all(contexts.map(context => context.rebuild()));
|
await Promise.all(contexts.map(context => context.rebuild()));
|
||||||
return contexts;
|
return contexts;
|
||||||
} else {
|
} else {
|
||||||
// Use the standard API for production builds
|
// Use the standard API for production builds
|
||||||
return await Promise.all(configs.map((config) => esbuild.build(config)));
|
return await Promise.all(configs.map(config => esbuild.build(config)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue