0.1.1 • Published 10 years ago

grunt-extract-required v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

grunt-extract-required

Build Status

A grunt task to extract commonly required modules in src files, and genenrate a JS code to use as a loader.

Using extract-required inside.

Usage

A example grunt task in Gruntfile.js :

  ...

  extract_required: {
    lib: {
      files: {
        'output/core-require.js' : [ 'lib/core/**/*.js' ]
      },
      options: {
        baseDir: 'lib/',
        ignore: [ './submodule/**/*' ],
        exposeToGlobal: true
      }
    }
  },

  ...

Options

options.baseDir

Specify a base directory to canonicalize relatively loaded module paths.

options.ignore

Specify a glob pattern or name of modules to ignore from the output.

options.exposeToGlobal

If you want to expose the generated loader function to global, set true (or custom global function name; by default it use require). Otherwise the function will be opened as a CommonJS-style module.

0.1.1

10 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago