M
M
Maxim Vasiliev2016-07-16 23:18:34
JavaScript
Maxim Vasiliev, 2016-07-16 23:18:34

Where can I get gulp scripts for developing an angular application with modules?

I would like to have a set of gulp tasks / scripts that can:

  • collect everything together in dist, but separately by modules
  • tasty auto-inject everything in index.html, including bower components
  • run tests with karma and protractor
  • serve all files to the browser, with monitoring for changes and auto-reload
  • with the addition of new modules, components, directives and other things, I can handle it myself

The key point here is that the modules lie and are assembled separately from the application, which can be a demo at all and then go to the gh-pages branch.
That is, the layout would be something like this:
src/
    app/
        index.html
        *.js
        *.css
        assets/
           картинки или что-нить ещё
    foo/
        module.js
        *.js
        assets/
           картинки или что-нить ещё
    bar/
        module.js
        *.js
        assets/
           картинки или что-нить ещё
dist/
     app/
         index.html
         app.js
         app.css
         templateCache.js
     foo/
         foo.js
         foo.css
         templateCache.js
         assets/
           картинки или что-нить ещё
    bar/
         bar.js
         bar.css
         templateCache.js
         assets/
           картинки или что-нить ещё

Attempts to google something ready-made from the category of yeoman generators ended up with fountain-generator (formerly generator-gulp-angular), which can do everything mentioned, but does not know how to several modules. And I can’t remake his scripts to meet these requirements due to lack of knowledge in gulp.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2016-07-17
@healqq

It seems to me that this is a rather rare need, in terms of assembly by modules. it will be faster to look at the gulp doc and change the prefabricated tasks a little for the desired effect (in fact, you just need to change the mapping of the incoming and outgoing file paths)

O
ozknemoy, 2016-07-17
@ozknemoy

you can look at the NG6-starter-master or NG6-todomvc-starter git or other builds from the same author ( https://github.com/AngularClass/NG6-starter/blob/m... ) and finish them for yourself. there is also yeoman angular. templateCache really increases performance? I think to try it, but I don’t really want to increase the initial load time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question