GithubHelp home page GithubHelp logo

antoinemary / grunt-angular-file-loader Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 8.0 45 KB

Automatically sort and inject AngularJS app files depending on module definitions and usage

License: MIT License

JavaScript 30.36% HTML 69.64%

grunt-angular-file-loader's People

Contributors

anteq avatar areksredzki avatar liamwhan avatar maxaon avatar miloss avatar noxi89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grunt-angular-file-loader's Issues

Extra Empty line added with each script tag inserted

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)

image

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

Add slash before the generated path

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

tag messup

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 -->

build crash - Error in parsing "my.controller.js", Cannot read property 'value' of null

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

ejs support

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.