js-to-file
Evaluate js and output result to file
Last updated 3 years ago by danielpanpm .
MIT · Original npm · Tarball · package.json
$ cnpm install js-to-file 
SYNC missed versions from official npm registry.

js-to-file

npm version Conventional Commits code style: prettier

Evaluate js and output result to file

Install

$ npm install --save-dev js-to-file

Usage

$ js2file templates/ --outDir dist --ext html

Options

$ js2file --help

Usage
  $ js2file [folder]

Options
  --outDir where to output files to, defaults to [folder]
  --ext    resulting extension, required
  --require require file before execution

Examples
  $ js2file templates/ --outDir dist --ext html
  typescript
  $ js2file templates/ --outDir dist --ext html --require ts-node/register
  ttypescript
  $ TS_NODE_COMPILER=ttsc js2file templates/ --outDir dist --ext html --require ts-node/register

Example

// templates/home.js
exports.default = () => "<h1>Hello World</h1>";
// dist/home.html
<h1>Hello World</h1>

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

2 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |