Skip to content
This repository has been archived by the owner. It is now read-only.
Example for blog post about require extensions
JavaScript HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hooks
templates
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
esm.mjs Bootstrap example. Dec 24, 2019
package-lock.json Bootstrap example. Dec 24, 2019
package.json
require-pirates.js
require.js

README.md

HTML import example

Example for the blog post about importing HTML in Node.js.

Installation

npm install

Usage

For require.js and require-pirate.js:

node <file-name>

For esm.mjs:

node --experimental-modules --experimental-loader ./hooks/html-loader.mjs esm.mjs

All hooks are located in hooks directory. Sample HTML template is located in templates directory.

License

See LICENSE file for details.

You can’t perform that action at this time.