Dev Tools is a way for the client to take over the development responsibility for their Banno CMS website. To maintain source control on the files we need to do some prep work on their site.
Edits to package.json
Because we are setting the client up to be a dev we need to remove the “grunt”, “grunt-site-scaffold”, and “grunt-cms-upload” devDependencies. The scaffold and upload dependencies won’t install properly and can cause complications with npm install. If the site is older and still using the internal fonts repo, that dependency will also need to be removed, and fonts will need to be set up using the newer process.
Edits to gulpfile
In the event the client needs help in the future we need to be able to access the current source files of the site. To do this the source files need to be included in the zip that is uploaded to the CMS. Above the “make-zip” gulp task please insert the following two tasks:
gulp.task('source', function(cb) {
var copySource = gulp.src('./src/**/*')
.pipe(gulp.dest('./deploy/src'));
var copyPackage = gulp.src('./package.json')
.pipe(gulp.dest('./deploy'));
var copyGulpfile = gulp.src(['./gulpfile.js', ])
.pipe(gulp.dest('./deploy'));
return merge(copySource, copyPackage, copyGulpfile);
});
gulp.task('clean-deploy', function() {
return del(['deploy/src/*.html', 'deploy/src/assets'])
});
If you are working on a newer site that has disclaimers relying on the make file you will also want to add a line in the source task to copy that over as well.
After those tasks are created we also need to include them in the default runSequence.
Wrapping up
To finish prepping files make sure to run gulp and checking that the source files are now in the zip. If so upload to UAT, and Prod after getting approval from the PC/CWA.