Skip to content

Commit

Permalink
Improve usage example in README.md (#778)
Browse files Browse the repository at this point in the history
By showing explicitly how/where `Mustache` comes from in that
specific scenario, where CommonJS is assume to be available,
either provided by Node.js or a build tool like webpack etc.

For the record, it could also be `import` if the using project
uses ES Modules, as we've recently exposed native ES Modules
support as well.
  • Loading branch information
natesire committed Apr 11, 2021
1 parent bd29972 commit edc988b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ $ npm install mustache --save
Below is a quick example how to use mustache.js:

```js
var Mustache = require('mustache');

var view = {
title: "Joe",
calc: function () {
Expand Down

0 comments on commit edc988b

Please sign in to comment.