Currently, I am running the app emulation using the Chrome browser with ionic serve
. I also see that there is a gulpfile.js associated with the framework. What is the relationship between ionic and and gulp?
Gulp is a task manager and let you perform several actions to automate your build.
I personnaly perform several actions PRE-BUILD to prepare my project before starting a proper ionic build that triggers hooks & everything normal.
My pre-build actions are mainly to customize my config.xml
Therefore, you can build a ionic project WITHOUT using any gulp commands. And you can use to help you build several steps of your project
Here is an exemple of someone work with gulp to help him "boost" his build process : http://www.thomasmaximini.com/2015/02/10/speeding-up-ionic-app-development-with-gulp.html Tasks that he performs are : SASS Compil & concatenation of severals But he also simplifies some of ionic cli commands.
Have a look at: https://github.com/driftyco/ionic-cli#advanced-serve-options (see "Gulp Integrations").
You can add a gulpStartupTasks
property in the ionic.project
file located in your project root.
They example the above linked documentation gives is:
{
"name": "SmoothRiders",
"gulpStartupTasks": [
"watch"
]
}
In this case, the watch
gulp task is executed when you run $ ionic serve
.
If you run $ ionic setup sass
, it will add the configuration to your ionic.project
. Once you understand that, you're good to go so long as you understand gulp.