gil / gulp-include-source Goto Github PK
View Code? Open in Web Editor NEWInclude scripts and styles into your HTML files automatically.
License: MIT License
Include scripts and styles into your HTML files automatically.
License: MIT License
I suggest that empty lines should be ignored when <!-- include:js(list:vendorList) -->
syntax is used.
At least the last empty line should since in many cases people set their IDEs/editors to add an empty line at the end of each saved file.
Support for full RegEx patterns would be extremely helpful, and expected (works for the grunt
counterpart)
<!-- include:js(system/**/!(*.module).js) -->
Hi im new in gulp, how should write includeSources functions for selecting my js file?
Will this work with html files?
bower_components/jquery/dist/jquery.min.js
bower_components/angular/angular.min.js
?
this does not work:
gulp.task 'index', ->
gulp.src dir.src + '/index.jade'
.pipe $.jade({pretty: true})
.pipe $.includeSource()
.pipe gulp.dest(dir.tmp)
Currently the matching regular expression does not allow any inner parenthesis. By changing line 19 from return contents.match(/<!--\s+include:([a-z]+)\(([^)]+)\)\s+-->/);
to 'return contents.match(//);' users can now add full glob filters.
Ex.
Currently this include will fail and be passed over because it has inner parenthesis.
<!-- include:js(app/*/**/+(*.module|module).js) -->
There is a problem which can result in nothing being added to the output html file.
I dug around a bit and the solution seems to be to include an option to specify the location of the javascript files that are to be included.
The current code assumes that the js/css files are located relative to the input file but that doesn't work once you start to do thing like build it with jade e.g.
gulp.src('./src/jade/*.jade')
.pipe(jade())
.pipe(includeSource())
.pipe(gulp.dest('./app'));
It is looking in ./src/jade for my scripts and I need a way to tell it to look in ./app or maybe ./src/js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.