提交 6ef86d5f 编写于 作者: J Joao Moreno

drop lodash dependency

上级 d546a4a6
...@@ -9,7 +9,6 @@ const gulp = require('gulp'); ...@@ -9,7 +9,6 @@ const gulp = require('gulp');
const path = require('path'); const path = require('path');
const assert = require('assert'); const assert = require('assert');
const cp = require('child_process'); const cp = require('child_process');
const _ = require('lodash');
const util = require('./lib/util'); const util = require('./lib/util');
const pkg = require('../package.json'); const pkg = require('../package.json');
const product = require('../product.json'); const product = require('../product.json');
...@@ -23,13 +22,12 @@ function packageInnoSetup(iss, options, cb) { ...@@ -23,13 +22,12 @@ function packageInnoSetup(iss, options, cb) {
options = options || {}; options = options || {};
const definitions = options.definitions || {}; const definitions = options.definitions || {};
const defs = _(definitions) const keys = Object.keys(definitions);
.forEach((value, key) => assert(typeof value === 'string', `Missing value for '${ key }' in Inno Setup package step`))
.map((value, key) => `/d${ key }=${ value }`)
.value();
const args = [iss] keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${ key }' in Inno Setup package step`));
.concat(defs);
const defs = keys.map(key => `/d${ key }=${ definitions[key] }`);
const args = [iss].concat(defs);
cp.spawn(innoSetupPath, args, { stdio: 'inherit' }) cp.spawn(innoSetupPath, args, { stdio: 'inherit' })
.on('error', cb) .on('error', cb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册