New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-to-file

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-to-file

Evaluate js and output result to file

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

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>

Keywords

FAQs

Package last updated on 28 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc