fix: missing cli commands (#1478)

* fix: missing cli commands

* centralize
This commit is contained in:
Endi 2019-05-17 14:27:53 +07:00 committed by GitHub
parent be149e182f
commit 6b75bb3270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View file

@ -6,6 +6,11 @@
*/
async function execute() {
const commander = require('commander');
commander
.option('--skip-image-compression')
.option('--skip-next-release')
.parse(process.argv);
require('../write-translations.js');
const metadataUtils = require('./metadataUtils');
const blog = require('./blog');
@ -30,15 +35,12 @@ async function execute() {
const sep = path.sep;
const escapeStringRegexp = require('escape-string-regexp');
const {renderToStaticMarkupWithDoctype} = require('./renderUtils');
const commander = require('commander');
const imagemin = require('imagemin');
const imageminJpegtran = require('imagemin-jpegtran');
const imageminOptipng = require('imagemin-optipng');
const imageminSvgo = require('imagemin-svgo');
const imageminGifsicle = require('imagemin-gifsicle');
commander.option('--skip-image-compression').parse(process.argv);
// create the folder path for a file if it does not exist, then write the file
function writeFileAndCreateFolder(file, content) {
mkdirp.sync(path.dirname(file));