auto-export-plugin
webpack auto export
Last updated 9 months ago by christo0625 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install auto-export-plugin 
SYNC missed versions from official npm registry.

Introduction

文件改动或删除时,自动收集文件中的export语句, 并在index.js文件中导出

  • 如果是非index.js文件改动会自动写入同级目录index.js文件中
  • 如果是index.js文件改动会自动写入上层目录的index.js文件中(如果不需要此特性,可以在ignored中写入/index/忽略)

Install

npm i auto-export-plugin -D

Usage

// webpack.config.js
...
const AutoExport = require('auto-export')

module.exports = {
  ...
  plugins: [
    ...
    new AutoExport({
      dir: ['src', 'constant'],
      ignored: /someFileName|someDirName/
    })
  ]
}

Options

  • dir (string/array): 需要监听的目录名, 默认为src目录
  • ignored (regexp): 过滤掉的文件名、目录名

Current Tags

  • 1.2.0                                ...           latest (9 months ago)

9 Versions

  • 1.2.0                                ...           9 months ago
  • 1.1.0                                ...           9 months ago
  • 1.0.6                                ...           10 months ago
  • 1.0.5                                ...           10 months ago
  • 1.0.4                                ...           10 months ago
  • 1.0.3                                ...           10 months ago
  • 1.0.2                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 18
Dependencies (6)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |