UNPKG

@area17/a17-boilerplate

Version:

The official AREA 17 boilerplate

23 lines (19 loc) 1.03 kB
const path = require('path'); const spawn = require('cross-spawn'); const fs = require('fs-extra'); const utils = require('../utils'); const chalk = require('chalk'); const data = require(utils.getManifestPath()); const createLogger = require('logging').default; const logger = createLogger('Clean'); const argv = require('minimist')(process.argv.slice(2)); const nodeRev = require('node-rev').default; const options = { files: data.paths.dist + '**/*.css,' + data.paths.dist + '**/*.js', //glob to files you want in the manifest outputDir: data.paths.dist,//where you want the files to be output that are part of the manifest file: data.paths.dist + 'rev-manifest.json',//optional, allows you to specify location of manifest file and name it, default is root of the project hash: argv.production //if you are in dev mode, you can set this to false to just have it create the manifest with the same filenames }; logger.info('Starting Assets revision'); nodeRev(options); logger.info(chalk.green('Succeed Assets revision'));