Gulp.src Glob Won't Copy .csscomb.json File
Ad
I am trying to copy .csscomb.json
over to my dest
folder. Everything works and copies over, but the .csscomb.json does not. When I gulp.src the name specifically - it works. Does anyone know why? I am thinking it has to do with the period at the beginning of the name.
Below is a paired down version of the Gulp Task. The .csscomb is in the root folder.
Doesn't work...
gulp.task('copy', function() {
gulp.src('./**/*')
.pipe(gulp.dest('dest'))
.pipe(notify('Folders Copied finished'));
});
This works...
gulp.task('copy', function() {
gulp.src('.csscomb.json')
.pipe(gulp.dest('dest'))
.pipe(notify('Folders Copied finished'));
});
Also, when .csscomb is clumped in Gulp.src it doesn't work -
gulp.task('copy', function() {
gulp.src(['**/*', '.csscomb.json',
'!*.html',
'!js/',
'!js/**',
'!dist/',
'!dist/**',
'!styles/',
'!styles/**',
'!img/',
'!img/**']'./**/*')
.pipe(gulp.dest('dest'))
.pipe(notify('Folders Copied finished'));
});
Ad
Answer
Ad
glob() does list "hidden" files (files starting with . including the directories . and ..), but only if you explicitly ask it for. I guess it makes sense - as in you don't want all the hidden stuff with /.*
So for example... 'app/.htaccess'
Ad
source: stackoverflow.com
Related Questions
Ad
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
Ad