Skip to content

questions about inject:js behaviour #4

@poliveira89

Description

@poliveira89

Hello,

Disclaimer: I know that gulp <command> and gulpfile.js from a generated project is not "generator-gulp-angular-subtask" fault.

I'm using this project, but I have been struggling with something. With the Javascript files (more specifically with Angular files: controllers, providers, services, etc).

So everytime I create a file with this generator, it will append manually before the <!-- inject:partials --> on the index.html without gulp wiredep or gulp inject:js, like this:

    <!-- build:js scripts/vendor.js -->
    <!-- bower:js -->
    <script src="../bower_components/jquery/dist/jquery.js"></script>
    <script src="../bower_components/angular/angular.js"></script>
    ...
    <!-- endbower -->
    <!-- endbuild -->

    <!-- build:js({.tmp,src}) scripts/app.js -->
    <!-- inject:js -->
    ...
    <!-- endinject -->

    <script src="app/example/controllers/example-controller.js"></script>
    <!-- inject:partials -->
    <!-- angular templates will be automatically converted in js and inserted here -->
    <!-- endinject -->
    <!-- endbuild -->

And every time I delete manually the folders containg this controllers (etc), the gulp wiredep fixes the content for <!-- inject:js --> but not remove those before <!-- inject:partials -->.

This behaviour seems strange for me, what do you think? It's expected or premeditated?
This may not be the core of my problem, but I think it's related, which is:

  1. index.html content fully erased
  2. dependecy injection or management (how you prefer to call it) affected: not enabling to "load" or "use " the angular components

I hope this issue, starts some kind of conversation which will help me understand this project and related operations and if those causes me trouble... thank you 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions