You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/antd-tools/utils/getRunCmdEnv.js

15 lines
426 B

'use strict';
7 years ago
const path = require('path');
7 years ago
module.exports = function getRunCmdEnv() {
const env = {};
Object.keys(process.env).forEach(key => {
env[key] = process.env[key];
});
7 years ago
// make sure `antd-tools/node_modules/.bin` in the PATH env
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
env.PATH = env.PATH ? `${nodeModulesBinDir}:${env.PATH}` : nodeModulesBinDir;
return env;
};