Socket
Book a DemoInstallSign in
Socket

gulp-es6-amd-optimizer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-es6-amd-optimizer

Find all the dependencies of one or more amd modules and sort them in the correct order, from leaf (module with no dependencies) to root (module which no other module depends on). This is an alternative to the official requireJS optimizer, but is designed

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

amd-optimize

Find all the dependencies of one or more amd modules and sort them in the correct order, from leaf (module with no dependencies) to root (module which no other module depends on). This is an alternative to the official requireJS optimizer, but is designed as a library, not a stand alone application.

Things it can and can't do

  • find dependencies of a module
  • name anonymous modules
  • sort modules from leaf to root
  • produce source-maps
  • use require config
    • use paths
    • use package
    • use map
  • relative dependencies
  • exclude modules and paths
  • umd/iife declarations
  • commonJS style define
  • plugins

UMD

This project tries to find top-level define() calls. If you call it with the option umd: true then it will try to find umd modules where the define call is not top-level. But to accept the define call it will need to be wrapped in an AMD test, like most of the examples on the UMD page. The define call in the following code will be found, and, if anonymous, will be named:

if (typeof define === 'function' && define.amd) {
  define(['b'], factory);
}

if (typeof define === 'function' && define['amd']) {
  define(['b'], factory);
}

factory(typeof define === 'function' && define.amd ? define : function(){});

FAQs

Package last updated on 07 Dec 2017

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