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

babel-get-export-sources

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-get-export-sources

get all local module files that are exported by a package

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

babel-get-export-sources

Build Status Coverage Status semantic-release

get all local module files that are exported by a package

install

npm i es6-get-export-source

use

const path = require('path');
const getExportSources = require('babel-get-export-sources');
const babel = require('babel-core');
const mainFile = path.resolve(__dirname, require('./package.json').main);
const babelConfig = {
  presets: [
    'babel-preset-es2015',
    'babel-preset-es2016'
  ],
  plugins: [
    'transform-object-rest-spread',
  ]
};

getExportSources(mainFile, babel, babelConfig).then((result) => {
  console.log(result);
  /*
  {
    default: '/Users/xiphe/[...]/somePackage/src/DefaultComponent.js',
    HelperComponent: '/Users/xiphe/[...]/somePackage/src/lib/HelperComponent.js'
  }
  */
}, (error) => {
  /* do s.th. with error */
});

Keywords

FAQs

Package last updated on 09 Apr 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