V
V
vasIvas2015-07-31 23:54:20
Angular
vasIvas, 2015-07-31 23:54:20

How to combine faucet and AngularJS?

I decided to create my first project in angular and prepared the builders for several days (gulp + browser-sync), but first .. Background: it all started from the moment I realized that I wanted my project to be "perfect", in the sense that I write in jade + sass and I want my project to be in a compiled, not glued form. So I created a folder with a name like "uncompile-src". And then immediately "bang!!!". I am a supporter of classes and the theory of "one class - one file", as well as separate packages for each individual "link". Which in turn means "nonsense", because I do not use a preprocessor for js and it is already clear that it will look stupid that there will be no js in the folder for the uncompiled one.
But this is half the trouble. As I found out that it is possible to inject files using gulp-inject, I immediately abandoned the idea of ​​\u200b\u200bgluing and decided to inject them directly from the src folder into the browser using browser-sync.
And everything is as it should be, but js files do not maintain the order of the queue and errors are pouring in.
Is it possible to solve this problem or is it worth starting to glue everything into one file again?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2015-08-01
@vasIvas

And everything is as it should be, but js files do not maintain the order of the queue and errors are pouring in.

I advise you to start using RequireJS or Browserify. And even better - Babel and ES2015 modules, it's time already. All other attempts to "maintain the order of the queue" are doomed from birth to lameness and crutches :)

I
Igor Shumilovsky, 2015-11-04
@JiSeven

Webpack is also good for working with Angular. Uses commonJS to load dependencies

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question