5
excluding some gulp-inject directories
source link: https://www.codesd.com/item/excluding-some-gulp-inject-directories.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
excluding some gulp-inject directories
advertisements
Ignoring bower_components
while including css
and javascript
files
gulp.task('files', function(){
var target = gulp.src("./client/index.html");
var sources = gulp.src(["./client/**/*.js", "./client/**/*.css"], {read: false});
target.pipe(inject(sources))
.pipe(gulp.dest("./client"))
});
I don't want to include client/bower_components
in my index.html? Is there a way i can specify what files to include in my sources
?
https://github.com/klei/gulp-inject#optionsignorepath
Exclude the bower_components
like this.
var sources = gulp.src(["!./client/bower_components/**/*"
"./client/**/*.js", "./client/**/*.css"], {read: false});
Related Articles
Is there a way to generate a directory in Ruby but exclude some directories?
I want to glob a directory to post-process header files. Yet I want to exclude some directories in the project. Right now the default way is... Dir["**/*.h"].each { |header| puts header } Seems inefficient to check each header entry manually if
The gulp injection transformation does not work
I've tried to setup gulp-inject to inject dependencies into index.html. Everything works fine except transform function. I need to replace part of filepath in the following way: /frontend/src/ --> /static/ I've tried to do it like this (copy-pasted f
How do I exclude some files from Xcode indexing?
I have an iOS project with 5600 files in the source code repository. Xcode appears to visit all of those files during its indexing. Some of the files are large images that I can see no benefit to indexing. How can I tell Xcode to exclude those files
Exclude the range of directories in the search command
I have directory called test which has sub folders in the date range like 01,02,...31. This all sub folders contain .bz2 files in it. I need to search all the files with .bz2 extension using find command but excluding particular range of directories.
Using gulp-inject: How to add a query string to the injected file name
I use gulp-inject to add files to load to index.html. To force browser to reload js-scripts, I want to add a query string to the filename that is injected into index.html. I suspect this is possible with gulp-inject's transform function. But reading
How to use the count () method on a list, excluding some elements
So, I want to if, in a list, there are any repeated numbers, but I want to exclude some of them. How can I do it, using the count() method? Can I? Example: thelist = [0,0,3,4] for x in thelist: if thelist.count(x) > 1: print("Repeated") break
Gulp-Inject does not work
I have a simple Gulp build process setup for testing. I've read the documentation many times but I can't seem to get Gulp-inject to inject the scripts I want into an index.html file. My Gulp file looks like this: gulp.task('inject1', function() { ret
Random ActiveRecord with where and excluding some records
I would like to write a class function for my model that returns one random record that meets my condition and excludes some records. The idea is that I will make a "random articles section." I would like my function to look like this Article.ra
Windows Bat file delete all files and folders excluding some files and folders
I want to delete files and folder in a directory excluding some file and folder in a bat file. I need to keep these file, update.bat FolderName.zip FolderName and all other should deleted from the directory, I wrote the .bat file but seems FolderName
How to remove any HTML tag exclude some tags
This question already has an answer here: Strip all HTML tags, except allowed 3 answers I create a form and I want to use PHP to remove all HTML tags but exclude some tags (<b>, <strong>, <em>, <i>, <p>, <br>, <ul>
Exclude some directories from ls and copy the rest to a shared path
I have a folder that contains sub-directories A,B,C and D. I need to copy directories A and D to another directory called 'copy' while excluding B and C(i.e. B and C doesn't get copied over). I was thinking about doing the following (in command-line
tar / gzip excluding some files
I have a directory with many sub-directories. In some of those sub-directories I have files with *.asc extension and some with *.xdr. I want to create a SINGLE tarball/gzip file which maintains the directory structure but excludes all files with the
How to get a random number from a range, excluding some values
In C#, how do I get a random number from a range of values - like 1..100, but that number should not be in some specific list of values, like 5, 7, 17, 23?Since no-one has posted any example code: private int GiveMeANumber() { var exclude = new HashS
Twitter API Search - how to exclude some tweets?
Based on some search parameters, I am collecting tweets. However, I want to EXCLUDE tweets that meet the following conditions: contains a URL (no hyperlinks!) is in another language other than English contains an @reply contains hash reference #keywo
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK