dwmkerr / crosswords-js

Tiny, lightweight crossword control for the web.
https://dwmkerr.github.io/crosswords-js/
MIT License
71 stars 27 forks source link

compile js + css #37

Closed mmkal closed 9 months ago

mmkal commented 9 months ago

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-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.

dwmkerr commented 9 months ago

Looks great thanks @mmkal