Comments (7)
Can you please be more specific or give an example of the issue you're having which I can reproduce?
from grunt-include-source.
html source:
<!-- include: "type": "js", "files": "bower/angular/**/*.js" -->
<!-- /include -->
<!-- include: "type": "js", "files": "bower/**/*.js" -->
<!-- /include -->
html result:
<!-- include: "type": "js", "files": "bower/angular/**/*.js" -->
<script src="bower/angular/angular.js"></script>
<!-- /include -->
<!-- include: "type": "js", "files": "bower/**/*.js" -->
<script src="bower/angular-animate/angular-animate.js"></script>
<script src="bower/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="bower/angular-cookies/angular-cookies.js"></script>
<script src="bower/angular-dynamic-locale/src/tmhDynamicLocale.js"></script>
<script src="bower/angular-local-storage/dist/angular-local-storage.js"></script>
<script src="bower/angular-resource/angular-resource.js"></script>
<script src="bower/angular-sanitize/angular-sanitize.js"></script>
<script src="bower/angular-translate-loader-partial/angular-translate-loader-partial.js"></script>
<script src="bower/angular-translate-storage-cookie/angular-translate-storage-cookie.js"></script>
<script src="bower/angular-translate-storage-local/angular-translate-storage-local.js"></script>
<script src="bower/angular-translate/angular-translate.js"></script>
<script src="bower/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower/angular/angular.js"></script>
<script src="bower/bootswatch-dist/js/bootstrap.js"></script>
<script src="bower/jquery/dist/jquery.js"></script>
<script src="bower/lodash/lodash.js"></script>
<!-- /include -->
bower/angular/angular.js is duplicated
from grunt-include-source.
I see what you mean, but I'm not sure how this can be solved. Maybe by implementing a secondary pattern to exclude certain files:
<!-- include: "type": "js", "files": "bower/angular/**/*.js" -->
<!-- /include -->
<!-- include: "type": "js", "files": "bower/**/*.js", "exclude": "bower/angular/**/*.js" -->
<!-- /include -->
What do you think? Shouldn't be difficult to implement.
from grunt-include-source.
Hi thanks for replying,
I think best would be if files would accept sort for comma delimited list of file patterns, so that exclusion could be achieved by exclamation mark:
"files": "bower///*.js, !bower/angular//*.js"
but what ever is easier, explicit exclude argument is also fine, but would have to accept list of patterns as well...IMHO
Thanks,
Martin
from grunt-include-source.
The ability to exclude files would be great, and would help with the ordering issue as well (workaround).
from grunt-include-source.
This should now work as described in http://gruntjs.com/api/grunt.file#grunt.file.expand. See also https://github.com/jwvdiermen/grunt-include-source/blob/master/test/files/index.html#L69 for an example.
This is native for the pattern, but adding a !
didn't work for me when using a comma separated list. So I manually split the files
option before passing it to grunt's expand method.
Closing now, let me know if this doesn't work for you.
from grunt-include-source.
Can you provide a more complete example of working with exclusions?
What do you mean by
So I manually split the files option before passing it to grunt's expand method.
How do you do that?
from grunt-include-source.
Related Issues (20)
- Same source and destination file. HOT 3
- type="text/javascript" is redundant HOT 2
- Grunt's <%= %> feature is not supported HOT 2
- Line break issue in Windows with wiredep HOT 4
- Ordering doesn't work HOT 2
- Stip of the last <include> block header when writing deps to the same file HOT 6
- why not include sources??? HOT 1
- Include sources in the same file HOT 2
- Please support TypeScript template HOT 1
- How to include source maps (.map extension not supported)? HOT 1
- Include sources in js files HOT 3
- [Question] Targets, could be a folder and not a file HOT 1
- Overwrite not working
- Exclude paths HOT 1
- Warning: Symbol is not defined Use --force to continue. HOT 2
- Fails to include all files in <%= myFileList.js %> HOT 1
- TO DELETE
- script tag not included in html
- Adding support for JSP files
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 grunt-include-source.