0.4.0 • Published 6 years ago

@loopback/dist-util v0.4.0

Weekly downloads
119
License
MIT
Repository
github
Last release
6 years ago

@loopback/dist-util

This package is no longer actively maintained.

Please upgrade your project to use a single compilation target, for example by changing your build script in package.json as follows:

{
  "scripts": {
    "build": "lb-tsc es2017 --outDir dist"
  }
}

Overview

Utilities to work with dist folders used by different Node.js versions.

versiondirectory
6.x LTSnot supported
8.x LTSdist8
9.xdist8
10.xdist10
newerdist10

Installation

Run the following command to install this package:

$ npm install @loopback/dist-util

Basic Use

Configure your TypeScript build to produce two distribution versions:

  • dist8 compiled for es2017 target
  • dist10 compiled for es2018 target

Put the following line to your main index.js file:

module.exports = require('@loopback/dist-util').loadDist(__dirname);
// calls `require(__dirname + '/dist8')` or `require(__dirname + '/dist10')`

It is also possible to obtain the name of the correct dist directory without loading the dist files:

const dist = require('@loopback/dist-util').getDist();
console.log(dist);
// prints `dist8` or `dist10`

Contributions

Contributors

See all contributors.

License

MIT

0.4.0

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago