on-the-fly

0.0.11 • Public • Published

on the fly

use typescript or es6+ config (or any) file on the fly, built in-memory, required into memory, without a footprint.

installation

yarn add on-the-fly global
npm i -s -g

usage:

const onTheFly = require('on-the-fly')
const dir = __dirname
 
// requires resolve(dir, config.js)
onTheFly('config.js', dir).then((config) => {
  console.log(config, typeof config)
})
 
// requires resolve(dir, config.js)
onTheFly('config.ts', dir).then((config) => {
  console.log(config, typeof config)
})

cli

  • simply: onthefly config
  • or more verbose: onthefly config.ts directoryHere

Readme

Keywords

none

Package Sidebar

Install

npm i on-the-fly

Weekly Downloads

0

Version

0.0.11

License

none

Last publish

Collaborators

  • aretecode