Code Monkey home page Code Monkey logo

Comments (5)

vladshcherbin avatar vladshcherbin commented on May 31, 2024

@riccardonuzz hey, I've checked this config:

copy({
  targets: [
    { src: ['assets/*', '!**/*.tsx'], dest: 'dist/assets' }
  ]
})

It works for me. πŸ€”It copies all files from assets folder and it subfolders except files with .tsx extension.

I can upload my test repo to see if it works for you or can you show yours? Also, what OS are you using, maybe it's related?

from rollup-plugin-copy.

riccardonuzz avatar riccardonuzz commented on May 31, 2024

Ok, I just updated the previous message. So this is what I'm trying to achieve:

  • I need to copy the src/profiles folder keeping the folder structure. (This is why I'm not using src/*, cause it copies all files in the root of selected destination).
  • During the copy process I need to exclude .tsx files.

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024

@riccardonuzz okay, so this is your code:

copy({ targets: [{ src: ['src/profiles', '!**/*.tsx'], dest: 'dist' }] })

src/profiles will select folder, !**/*.tsx will exclude files. What you need is to select files in this folder so you can exclude them. Try this one instead:

copy({ targets: [{ src: ['src/profiles/*', '!**/*.tsx'], dest: 'dist/profiles' }] })

You can change dist/profiles to any folder you want files to copy to.

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024

Hey, @riccardonuzz

Any chance you can test the solution so I can close the issue or give other suggestions if it doesn't help?

from rollup-plugin-copy.

vladshcherbin avatar vladshcherbin commented on May 31, 2024

Closing due to no response. Feel free to comment if the solution, provided above, doesn't work

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.