Since the dist folder is checked in, it shouldn't reflect out-of-date src/style folders. This adds a script which directly runs webpack and lessc after installation. Running directly, it seems to work. In my use case, I'm importing code from the src folder directly and have my own bundler setup (webpack, via nextjs) for javascript, but I'm having to run lessc node_modules/crosswords-js/style/crosswords.less myself which I shouldn't need to do.
I also added a files declaration to package.json so only files which might be useful to end users are included when published to npm.
I haven't dug into the makefile setup or anything like that, but as a first step making sure dist stays up to date seems like a no-brainer to me.
One of the changes mentioned in https://github.com/dwmkerr/crosswords-js/pull/36#issuecomment-1703921285.
Since the
dist
folder is checked in, it shouldn't reflect out-of-datesrc
/style
folders. This adds a script which directly runswebpack
andlessc
after installation. Running directly, it seems to work. In my use case, I'm importing code from thesrc
folder directly and have my own bundler setup (webpack, via nextjs) for javascript, but I'm having to runlessc node_modules/crosswords-js/style/crosswords.less
myself which I shouldn't need to do.I also added a
files
declaration to package.json so only files which might be useful to end users are included when published to npm.I haven't dug into the
makefile
setup or anything like that, but as a first step making suredist
stays up to date seems like a no-brainer to me.