Although we'll now end up with only `mustache.js` in the git repo,
being written in ESM syntax, the npm package will still be as before:
- `mustache.js`: UMD, meaning CommonJS, AMD or global scope
- `mustache.mjs`: ESM
No need for X amount of different Node.js version to all run the linting
as part of their CI rutine. Easier to just run that once, completely
separate from the unit tests.
With the introduction of a build step, where we take the source in .mjs
and build it into .js for non-ES Module systems, it's very important
that we remember to keep those two in sync.
That's what the CI job created in these changes ensure;
1. Run the build script
2. See if there are any pending git changes as a result
As long as there are no pending git changes, we're all fine and dandy,
or else we need to run the `npm run build` and commit the changes.
To ensure the ES module and source exposed by this package is compatible
with Deno going forward.
Added benefit is we get some sanity checks of the source code for free
due to Deno's built-in TypeScript compiler getting angry if it sees
things that does not make sense, in terms of missing function arguments
and so on.
This is a precursor to introducing a build step that will change what
we expose from this package. Better off writing some tests to verify
existing projects with different module systems continue to work as
expected.
This is a precursor to introducing a build step that will change what
we expose from this package. Better off writing some tests to verify
existing projects with different module systems continue to work as
expected.
When initially creating the GitHub Actions
workflow, it was obviously forgotten to make
it also run on pull requests, not only when
changes are pushed to branches in the
original repository (not a fork).