Closed kunalkankariya closed 5 years ago
There are plenty of tasks spread throught the different modules. All they are defined in sp-build-tasks and registered in gulpfile.js
:
new (require('sp-build-tasks').SPBuildTasks)(gulp, {
privateConf: process.env.PRIVATE_JSON || './config/private.json',
appConfig: process.env.APP_JSON || './config/app.json',
taskPath: process.env.TASKS_PATH || './tools/tasks'
});
Also, you can define custom tasks. When scaffolding, there is the corresponding option. Which adds example.js in ./tools/tasks
folder.
//@ts-check
const { customTask } = require('sp-build-tasks');
module.exports = customTask((gulp, $, settings) => {
gulp.task('example', cb => {
console.log('Example Gulp Task');
cb();
});
});
Hope you got the idea.
Going to close it.
Thank you so much :)
This is a question and not an issue
The gulpfile.js doesn't list the tasks individually. So, where are they defined? and how does gulp know what to do when I say gulp push for instance. I know the npm scripts invokes this but where is the definition for gulp push ( I know its spsave under the hood).
Thanks!