gulp-ampify is a Gulp.js wrapper for the ampify package.
Install via NPM with npm install gulp-ampify --save-dev
In your gulpfile.js:
const ampify = require('gulp-ampify'); // Add the package to your gulpfile
const output_dir = './dist'; // Example output directory
const pages_path = './dist/**/*.html' // Example path to your html files
gulp.task('ampify', function(){
return gulp.src(pages_path)
.pipe(ampify(output_dir)) // Argument specifies relative link to assets
.pipe(gulp.dest(output_dir))
};