GithubHelp home page GithubHelp logo

copy-static-files-plugin's Introduction

webpack插件copy-static-files-plugin

使用webpack中发现经常需要把生成的资源文件拷贝到其他项目中,并且需要改更一些文件的后缀如把.html的文件改为.jsp等;于是就写了这么个插件,可能适用范围并不广;但却可以减少些手工活,另外也顺便也学习下webpack插件开发。

使用方法:

安装:

npm instal copy-static-files-plugin

使用:

const CopyStaticFilesPlugin = require('copy-static-files-plugin');

...
plugins:[
  new CopyStaticFilesPlugin([
    { type:'js', to: 'E:\\testObject\\static' },
    { type:'css', to: 'E:\\testObject\\static' },
    { type:'html', to: 'E:\\testObject\\page',totype:'jsp' }
    ]);
]
...

options说明:

type:对应生成资源的后缀; to:要复制到的文件夹; totype:更改后缀(目前jsp会加入特定申明,其他则单纯的复制改变后缀);

copy-static-files-plugin's People

Watchers

 avatar  avatar

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.