Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed mustache.js -> mustache.mjs to transition to being an ES module
In an effort of moving with recent changes in Node.js and its built-in
support for ES modules, we're making the main source code reside inside
`mustache.mjs`. This will also allow Deno users to use this package as
an ES module directly by importing `mustache.mjs`.

An ES3 / UMD version of the source code is still planned to exist in
`mustache.js`, but will involve a build step to transform the ES module
source into a plain .js version.

By renaming the file *before* changing any contents, git will
recognise the file has been renamed and therefore allows us to see all
historical changes to the old .js source code with the `--follow` argument:

```
$ git log --follow -- mustache.mjs
```

Without ensuring git sees this is a file rename, we will in practise
loose the old source code's history, or at least make it quite weird
and less intuitive to find. That's not fair to the historical
contributors and in general getting hold of a well documented log of
changes to a file in git, is extremely valuable in those few scenarios
where it's *really* needed.
  • Loading branch information
phillipj committed Dec 18, 2019
1 parent 9452eaf commit abc3984
Showing 1 changed file with 0 additions and 0 deletions.
File renamed without changes.

0 comments on commit abc3984

Please sign in to comment.