Socket
Socket
Sign inDemoInstall

rollup-plugin-cpy2

Package Overview
Dependencies
113
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rollup-plugin-cpy2

Simple rollup plugin to copy static assets over to you public directory


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

rollup-plugin-cpy2

Very basic rollup plugin to copy static assets over to you public directory. Files are copied using cpy

Installation

This package can be installed using npm:

npm install rollup-plugin-cpy2

Usage

Add the following lines to your rollup.config.js:

import copy from 'rollup-plugin-cpy2';

...

export default {
    ...
    plugins: [
        ...
        copy({
          src: ['**/*.less'],
          dest: path.resolve(__dirname, '../es/'),
          options: {
            cwd: path.resolve(__dirname, '../src/components/'),
            parents: true,
            rename: basename => `style/${basename}`,
          },
        }),
        ...
    ]
    ...
}

Options

  • src: <array> : glob style filenames
  • dest: <string> : assets to copy to
  • options: <object> : cpy config options
  • cwd: <string> : Working directory to find source files. (default is process.cwd())
  • parents: <boolean> : Preserve path structure. (default is false)
  • rename: <string|function> : Filename or function returning a filename used to rename every file in files. (default is null)

Keywords

FAQs

Last updated on 19 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc