Code Monkey home page Code Monkey logo

auto-export-plugin's Introduction

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): 过滤掉的文件名、目录名

auto-export-plugin's People

Contributors

layne0625 avatar

Stargazers

WangHao avatar gp avatar Leiyin Lin avatar SengMitnick avatar  avatar kuankuan lu avatar coderly avatar NiuFang avatar BoGuan avatar enoyao avatar  avatar  avatar  avatar  avatar Ruios avatar Nghia Pham avatar 孤标傲世 avatar qzs avatar  avatar Aben avatar 冯淼森 avatar  avatar  avatar 小白程序之路 avatar  avatar cary avatar  avatar

auto-export-plugin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.