Builtin resources for inline-js
npm install inline-js-default-resourcesinline-js-default-resources
===========================



This repository contains the builtin resources for inline-js
Installation
------------
``js
`
npm install inline-js-default-resources
`
Usage
-----
js
`
const {createInliner} = require("inline-js-core");
const {RESOURCES} = require("inline-js-default-resources");
const inliner = createInliner();
RESOURCES.forEach(inliner.resource.add);
file
RESOURCES
---------
This repository contains following resources:
* : It reads the content from a file path, which may be relative to the file which requires the resource.
Buffer
The result could be a utf8 string or a , depending on the extension of the file (see is-binary-path).
text
* : Like file, but the result is always a utf8 string.
raw
* : Like file, but the result is always a Buffer.
cmd
* : Execute a command and read the stdout as a utf8 string. You may pass the second argument which represent the encoding (default: utf8). Passing buffer to get raw Buffer object.
`
js
`
Current date: $inline("cmd:date /t")
file
PATH_LIKE
---------
A set of resource type. These resources use a filepath as their first argument, including , text, and raw`.
Changelog
---------
* 0.1.0 (Jun 27, 2018)
- First release.