The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Angular Automation: Gulp Inject

Angular Automation: Gulp Inject

5:10
In this lesson, we are going to learn how to use the `gulp-inject` plugin to sanely and efficiently manage our file references with our HTML. Manually declaring JavaScript references will quickly get out of hand as your application grows in size and complexity. The `gulp-inject` plugin solves this problem by taking a stream of files, converting them into string references and then injecting those references into your HTML via annotations.
Watch this lesson now
Avatar
egghead.io

In this lesson, we are going to learn how to use the gulp-inject plugin to sanely and efficiently manage our file references with our HTML. Manually declaring JavaScript references will quickly get out of hand as your application grows in size and complexity. The gulp-inject plugin solves this problem by taking a stream of files, converting them into string references and then injecting those references into your HTML via annotations.

Avatar
liranviper

what do you use to make your terminal so colorful with those extra symbols?

In reply to egghead.io
Avatar
Lukas

I am using ZSH with Oh My ZSH which you can check out here http://ohmyz.sh/ Cheers!

In reply to liranviper
Avatar
Carlo

At this point I've a question about how you organize your app and files. Why don't you replicate into src the same structure you'll ultimately have into build. In other words, I can't see why the folder vendor is kept outside the folder src. In fact, how to you run your app in development, does it mean that you can run it only from the build folder?

In reply to egghead.io
Avatar
Lukas

Hi Carlo --

Generally, I develop from the src folder and serve from the build folder. When I am ready to package up my application, I compile it into a dist folder. The reason for this is that there is a gap between what you want to work with and what you want to serve to the browser i.e. using gulp-inject to handle your script tags instead of manually doing it by hand. You could easily combine these two directories into one but I find that separating them out gives me the granular control I want while providing an optimized environment for viewing the application and eventually distributing it.

In reply to Carlo
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?