antoinemary / grunt-angular-file-loader Goto Github PK
View Code? Open in Web Editor NEWAutomatically sort and inject AngularJS app files depending on module definitions and usage
License: MIT License
Automatically sort and inject AngularJS app files depending on module definitions and usage
License: MIT License
There are bug-fixes in this repo that haven't been published.
I am using this grunt plugin and it works great but the problem I am having is that it is injecting files into index.html with an extra line (Empty)
So because of this issue the grunt usemin plugin is not replacing the list of script tags by
the equivalent concatenated file (which gets generated properly).
When I remove the empty lines manually then usemin is able to inject the concatenated js file
Dear developer!
Thanks for the plugin, it is very usefull for me, but I got a simple problem with it.
I would like to start all generated script src path from /
Because:
Current target is looks like: <script src="js/auth/auth.module.js" type="text/javascript"></script>
But If I write angular HTML5 url friendly application, and I got an application url like: http://localhost/login , then the generated scripts url would like to download from http://localhost/login/js/auth/... , and from the root. But if the script generate the / to the front of the script url, then everything will be fine.
Thanks
Auto-indentation is not working (I guess). It duplicated tags from above.
Template-File:
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<!-- angular -->
<!-- endangular -->
<!-- endbuild -->
Result:
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<!-- angular -->
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="modules/directives/...js" type="text/javascript"></script>
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<!-- endangular -->
<!-- endbuild -->
after update to newest version 1.3.0
grunt config:
angularFileLoader: {
options: {
scripts: ['<%= yeoman.app %>/app/{,**/}*.js', '!<%= yeoman.app %>/app/global-config.js']
},
default_options: {
src: '<%= yeoman.tmp %>/index.html'
}
},
run console:
Running "angularFileLoader:default_options" (angularFileLoader) task
>> Error in parsing "src/app/myController.controller.js", Cannot read property 'value' of null
>> (10+ more lines like one above)
>> 152 files inserted into .tmp/index.html
result on browser console:
Uncaught Error: [$injector:modulerr] Failed to instantiate module appMyModule due to: (...)
after rollback to 1.1.5 everything works fine
Hi @AntoineMary ,
I was trying the same out with ejs templates ? Does this module support ejs templates.
As i was checking no files were getting added into the ejs templates.
Kindly help me out!!!
Thanks in advance.
Since this is the most reliable angular source injector I have ever used.. is it too difficult to add concatenation and minification as well? There seems to be so much need for such a tool and https://github.com/claudio-silva/grunt-angular-builder doesn't cut it with external libraries.. Thank you so much!
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.