0.1.0 • Published 9 years ago

combine-entry v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

combine-entry Build Status

Scan entry files for combine modules. A plugin for moduleCompiler(come from edp-buid).

Installation

$ npm install combine-entry --save

Usage

In your edp-build-config.js, you can use this plugin to create moduleCompiler

exports.getProcessors = function () {
    ...
    var combineEntry = require('combine-entry');
    // 设置需要处理entry目录下的所有html文件
    var moduleCompiler = new ModuleCompiler(combineEntry('entry/*.html'))
    ...
};

API

combineEntry(patterns, options)

构建moduleProcessor需要的combine配置项

  • patterns {string|Array.<string>} 入口文件的匹配模式,具体书写方式看这里
  • options {Object=} 配置项
    • moduelId {string=} 公共模块ID,如果设置则后续所有的模块都不会包含公共模块以及公共模块的依赖
    • cwd {string=} 起始的入口文件扫描路径,默认为process.cwd()