fliphub-monorepo
Version:
the builder of builders
58 lines (41 loc) • 1.37 kB
Markdown
//img.shields.io/npm/v/on-the-fly.svg
[ ]: https://npmjs.org/package/on-the-fly
[ ]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[ ]: https://spdx.org/licenses/MIT
[ ]: https://img.shields.io/gitter/room/fliphub/pink.svg
[ ]: https://gitter.im/fliphub/Lobby
[ ]: https://img.shields.io/badge/%F0%9F%8F%97%20%F0%9F%92%A0-flipfam-9659F7.svg
[ ]: https://www.npmjs.com/package/flipfam
> use typescript or es6+ config (or any) file on the fly, built in-memory, required into memory, without a footprint.
```bash
yarn add on-the-fly global
npm i on-the-fly -s -g
```
```js
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)
})
```
```bash
onthefly config
```
```bash
onthefly config.ts directoryHere
```
[![NPM version][onthefly-npm-image]][onthefly-npm-url]
[![MIT License][license-image]][license-url]
[![fliphub][gitter-badge]][gitter-url]
[![flipfam][flipfam-image]][flipfam-url]
[ ]: https: