Replies: 2 comments
-
Try adding a glob pattern for the files rather than just the folder name. I've always had file globs 'cause never new I could just use the folder.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You need to specify the glob pattern for the file with their extension or use wildcard extension // Copy the Project-specific CSS files
const copyProjectCSSFiles = () => {
console.log('Copying project css')
return src(['./src/projects/**/css/*.css']) // this
.pipe(dest('./dist'))
};
const copyProjectJSFiles = () => {
console.log('Copying project js')
return src(['./src/projects/**/js/*.js']) // and this
.pipe(dest('./dist'))
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OS: MacOS 11.4
Gulp: 4.0.2
I have the following directory structure:
I have the following Gulp tasks to move the embedded css/js directories with the project.
I have the following default:
The CSS files get moved correctly, but the Javascript files do not appear to be moved at all.
I am at a loss as to how one method appears to work and the other does not. I split the copy into two methods because when I used the following code:
I got the same behavior, i.e, the CSS files would get copied over properly but the Javascript files were ignored. I am attaching my gulpfile.js to provide a full picture with the other functions in that file.
gulpfile.js.txt
Beta Was this translation helpful? Give feedback.
All reactions