Socket
Book a DemoInstallSign in
Socket

grunt-depmod

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-depmod

Grunt task for .js module dependency analysis and tracking

0.2.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

grunt-depmod

Analyses .js files for various module systems and extracts the module names and dependency information.

Recognizes the AMD

define('module-name', ['dep1-module'], function(dep1) {
    // ...
});

and the YUI3 module convention

YUI.add('module-name', function(Y) {
    // ...
}, '0.0.1', { requires: ['dep1-module'] });

Tasks

depmod

Generate the depmod information in JSON format

{
   'depmod': {
       other: {
           src: [ '**/[^\.]*.{css,js}' ],
           dest: 'other-depmod.json',
           processName: function(name, filename) {
               if (filename.match(/\.css$/)) {
                   return 'CSS!'+name;
               return name;
           }
       }
   }
}

depmod-tracker

Analyze the depmod information and watch for changes. This can be further used to consume the depmod information from within other grunt tasks.

{
   'depmod-tracker': {
       app: {
           src: [ '**/[^\.]*.{css,js}' ],
           processName: function(name, filename) { return name; },
           modulesInfo: [ 'other-depmod.json' ]
       }
   }
}

depmod-resolve

Provide a list of files necessary for the specified module to load with all transitive dependencies.

{
   'depmod-resolve': {
       app: {
           modulesInfo: [ 'other-depmod.json' ],
           module: 'my-app-main-module'
       }
   }
}

Copyright (c) 2013, GoodData Corporation (BSD License)

Keywords

grunt

FAQs

Package last updated on 23 Feb 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.