Comments (8)
i have an idea !
cpx "favicons/**/*.*" ./dest
target
android-chrome-144x144.png
android-chrome-192x192.png
android-chrome-36x36.png
android-chrome-48x48.png
android-chrome-72x72.png
android-chrome-96x96.png
apple-touch-icon-114x114-precomposed.png
apple-touch-icon-114x114.png
apple-touch-icon-120x120-precomposed.png
apple-touch-icon-120x120.png
apple-touch-icon-144x144-precomposed.png
apple-touch-icon-144x144.png
apple-touch-icon-152x152-precomposed.png
apple-touch-icon-152x152.png
apple-touch-icon-180x180-precomposed.png
apple-touch-icon-180x180.png
apple-touch-icon-57x57-precomposed.png
apple-touch-icon-57x57.png
apple-touch-icon-60x60-precomposed.png
apple-touch-icon-60x60.png
apple-touch-icon-72x72-precomposed.png
apple-touch-icon-72x72.png
apple-touch-icon-76x76-precomposed.png
apple-touch-icon-76x76.png
apple-touch-icon-precomposed.png
apple-touch-icon.png
browserconfig.xml
favicon-160x160.png
favicon-16x16.png
favicon-196x196.png
favicon-32x32.png
favicon-48x48.png
favicon-96x96.png
favicon.ico
manifest.json
mstile-144x144.png
mstile-150x150.png
mstile-310x150.png
mstile-310x310.png
mstile-70x70.png
however, this is not perfect...
its without filename extension
ex) readme
from cpx.
Thank you for the question.
Directories which have some content files will be copied automatically.
If you want to copy empty directories, use --include-empty-dirs
option.
from cpx.
I need this and I also think adding this feature would be great.
P.S. for future readers: I achieved it like this (notice how the assets directory has been copied):
"scripts": {
"dev": "concurrently \"npx cpx src/static/**/* dist --watch\" \"npx cpx manifest.json dist --watch\" \"npx cpx assets/**/* dist/assets\" \"npx tsc --watch\""
},
from cpx.
cpx src dist
doesn't work?
from cpx.
Currently, no.
I have designed this tool to copy specific files as companion to transpilers. I had not thought copying directories. The feature would be useful.
from cpx.
No problem. For anyone else stumbling upon this in the interim (or if you want to borrow some code) https://www.npmjs.com/package/ncp can do this.
Thanks for your work @mysticatea
from cpx.
this works fine for me, without configuring file extensions. packages folder has 4-5 more folders, with different files in them. not sure if this was the exact question.
"scripts": {
"start": "yarn watchChanges",
"watchChanges": "cpx \"packages/**\" \"web/src\" --watch & cpx \"packages/**\" \"mobile/src\" --watch"
}
from cpx.
following works for me:
cpx "icons/**" build/icons && ..
from cpx.
Related Issues (20)
- Fix security warning HOT 4
- With --clean don't delete files that will be copied
- No release in two years? HOT 4
- Include "dotfiles" together with normal files HOT 3
- Please update to chokidar 2.x to avoid ReDOS vulnerability HOT 5
- npm audit issue HOT 8
- How to copy only files without the folder structure HOT 1
- cpx HOT 1
- npm audit issue [set-value] High
- npm audit issue [mixin-deep] High
- cpx fails with ENOENT: no such file or directory, chmod... HOT 6
- include none-ts files, and templates/**/*.* and exclude node_modules
- Doesn't work with yarn and npm scripts HOT 1
- Throws ENOENT when dest is in tmpdir
- null
- How to exclude d.ts files?
- Several security vulnerabilities in dependency list HOT 7
- How to force file overwrite?
- MAC of M1 chip does not take effect
- Veracode vulnerability in dependent package shell-quote HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpx.