a11yproject.com icon indicating copy to clipboard operation
a11yproject.com copied to clipboard

Remove Gulp in Favor of NPM CLI

Open esjay opened this issue 3 years ago • 4 comments

In this PR, per Issue #989, we remove all traces of Gulp in favor of all NPM scripts for both development and build phases. We leverage new CLI-compliant NPM packages where necessary to provide cross-platform compatibility for non-unix-shell environments.

esjay avatar Oct 27 '20 05:10 esjay

putting this work on hold until #989 is addressed at the eleventy is in a better place with incremental build

esjay avatar Feb 16 '21 03:02 esjay

Hi @esjay do you have any further interest in working on this? I was looking into upgrading to 11ty v2 first before seeing if we could merge this, but I think due to the nature of how entwined these changes are, I think we need to do both of these changes at the same time. Let us know if you would still be interested in tackling this.

It should be a smooth upgrade to v2, the Eleventy Upgrade help plugin (https://github.com/11ty/eleventy-upgrade-help) shows no errors that we need to deal with.

nchan0154 avatar Sep 07 '23 03:09 nchan0154

Upgraded all the dependencies using the great base that Wayne has given us, and now the build does actually run well with Eleventy's incremental watching. I need to compare the site side by side and make sure everything still works, and double check that all the options to our new dependencies are valid/not deprecated. I also need to test whether or not the site builds in Windows (outside of WSL), as this an issue reported by previous contributors.

nchan0154 avatar Oct 03 '23 10:10 nchan0154

(As always, apologies for coming back to this so late.) I've tested the site side by side and it looks good. However, I'm running into some issues with Windows compatibility. There's lots of references to things that don't work on Windows, eg.

  • svgo \"dist/img/**/*.svg\" Glob syntax doesn't work in windows
  • mkdir -p Mkdir does work on windows, but the -p flag doesn't. I've tested it with npx mkdirp and it does work.
  • mv and rm don't work either

I'm wondering what you all feel the best path forwards is. Personally, I do like the idea of keeping it lean with npm scripts, but once we start using npx to pull in random packages for that cross system goodness, we end up creating our own little monster that may be harder than just using something like Vite, which 11ty now supports. Of course, we can leave it as it is and put a note in the readme that Windows users will have to use WSL, but I'd prefer to support as many environments as possible in order to create a more welcoming and inclusive environment for contributors.

Open to thoughts and suggestions.

nchan0154 avatar Jan 24 '24 07:01 nchan0154