Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loopback/dist-util

Package Overview
Dependencies
Maintainers
17
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loopback/dist-util

Select dist directory based on Node.js major version.

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
88
decreased by-27.27%
Maintainers
17
Weekly downloads
 
Created
Source

@loopback/dist-util

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

  • Guidelines
  • Join the team

Contributors

See all contributors.

License

MIT

Keywords

FAQs

Package last updated on 08 Jun 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