@@ -7,34 +7,34 @@ const path = require("node:path")
77const fs = require ( "node:fs/promises" )
88const rss = require ( "@11ty/eleventy-plugin-rss" )
99const dedent = require ( "dedent" )
10- const { build } = require ( "esbuild" ) ;
10+ const { build } = require ( "esbuild" )
1111
1212const buildJS = ( config = { } ) => {
1313 return build ( {
1414 minify : process . NODE_ENV === "development" ? false : true ,
1515 bundle : true ,
1616 write : true ,
17- outdir : ' _site/script' ,
17+ outdir : " _site/script" ,
1818 ...config ,
19- } ) ;
19+ } )
2020}
2121
2222module . exports = ( eleventyConfig ) => {
2323 eleventyConfig . addPlugin ( rss )
2424 eleventyConfig . addPlugin ( css )
25-
25+
2626 const entryPoints = glob . sync ( "script/*.[tj]s" )
2727 eleventyConfig . addWatchTarget ( "script/*.[tj]s" )
2828
29- buildJS ( { entryPoints} )
30-
29+ buildJS ( { entryPoints } )
30+
3131 eleventyConfig . on ( "beforeWatch" , ( changedFiles ) => {
3232 // Run me before --watch or --serve re-runs
33- if ( entryPoints . some ( watchPath => changedFiles . includes ( watchPath ) ) ) {
34- buildJS ( { entryPoints} )
33+ if ( entryPoints . some ( ( watchPath ) => changedFiles . includes ( watchPath ) ) ) {
34+ buildJS ( { entryPoints } )
3535 }
36- } ) ;
37-
36+ } )
37+
3838 // eleventyConfig.addPlugin(js, {
3939 // entryPoints: glob.sync("script/*.[tj]s"),
4040 // outDir: "_site/script",
0 commit comments