From 9e62f0371f66cc4f2aa275f958f16a9443b108b7 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 8 Oct 2024 17:33:26 +0800 Subject: chore: apply standardjs with trailing comma --- rollup.config.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'rollup.config.js') diff --git a/rollup.config.js b/rollup.config.js index 145224b..f5a22eb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,12 +13,12 @@ const general = { dir: './dist', format: 'esm', entryFileNames: '[name].mjs', - sourcemap: 'true' - } + sourcemap: 'true', + }, ], watch: { clearScreen: false, - include: ['src/**', 'mapclay/dist/mapclay.mjs'] + include: ['src/**', 'mapclay/dist/mapclay.mjs'], }, context: 'window', plugins: [ @@ -26,13 +26,12 @@ const general = { name: 'watch-mapclay', buildStart () { const mapclayPath = join(process.cwd(), 'mapclay', 'dist', 'mapclay.mjs') - console.log('Watching:', mapclayPath) if (existsSync(mapclayPath)) { this.addWatchFile(mapclayPath) } else { - console.log('mapclay.mjs not found at:', mapclayPath) + console.warn('mapclay.mjs not found at:', mapclayPath) } - } + }, }, { name: 'leader-line', @@ -41,7 +40,7 @@ const general = { return `${code}\nexport default LeaderLine;` } return null - } + }, }, { name: 'mapclay', @@ -50,24 +49,24 @@ const general = { return './mapclay/dist/mapclay.mjs' } return null - } + }, }, node(), commonjs(), production && terser({ - keep_fnames: true + keep_fnames: true, }), - production && bundleStats() - ] + production && bundleStats(), + ], } export default [ { - input: 'src/editor.mjs' + input: 'src/editor.mjs', }, { - input: 'src/dumbymap.mjs' - } + input: 'src/dumbymap.mjs', + }, ] .map(config => ({ ...general, ...config })) .filter((config) => production || config.input.match(/editor/)) -- cgit v1.2.3-70-g09d2