Code Monkey home page Code Monkey logo

Comments (6)

AnthonySLWhite avatar AnthonySLWhite commented on May 31, 2024 4

Here you have it using the glob library that uses 16.1k gzipped:

import glob from 'glob';
const pluginsList = [
    copy({
      targets: [...glob.sync('public/**/*')],
    })
]

Then you just need to add it to your config and export it

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024 2

Hey,

Yes, I have plans to add glob paths support some time later. Need to test them well too so they don't produce weird results.

from rollup-plugin-copy.

lazarljubenovic avatar lazarljubenovic commented on May 31, 2024 1

It's probably better to leave this to a third-party lib as @AnthonySLWhite suggests, and just write it as a FAQ in the README, or something with an example or two. Much easier to maintain, much more versatile and configurable, and equally easy to use.

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024

Just a small update about this one:

When writing v1, I actually tried to use cpy package to copy files which has glob support, but it had some problems I didn't remember. I tried it today and found this problems again (mostly related to creating folders, some mentioned in cpy package issues).

I'll try to just use plain glob, until then try solution from @AnthonySLWhite. If I won't be able to solve this, I'll add a recipe with this solution to readme as @lazarljubenovic suggested.

Thanks to everyone :)

from rollup-plugin-copy.

frederikhors avatar frederikhors commented on May 31, 2024

@vladshcherbin can you release please? We need glob. Thanks.

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024

Released in 3.0.0 🎉

Thanks to everyone for patience and support. Took a bit longer than I'd expect, but I'm happy I took time to think about api and I'm happy how it turned out.

from rollup-plugin-copy.

Related Issues (20)

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.