1 Star 0 Fork 6

gonfeig/appium

forked from Gitee 极速下载/appium 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
check-npm-pack-files.js 892 Bytes
一键复制 编辑 原始数据 按行查看 历史
Dan Graham 提交于 2019-01-10 08:35 . Shrinkwrap fixes (#11969)
const childProcess = require('child_process');
const _ = require('lodash');
const res = JSON.parse(childProcess.execSync('npm pack --dry-run --json --ignore-scripts', {encoding: 'utf8'}))[0];
// List of files we are testing to make sure they are included in package
const testFiles = [
'npm-shrinkwrap.json', // Check that npm-shrinkwrap.json is being packed
'LICENSE', // Check that license is included
'build/lib/appium.js', // Sanity check that build files are being included by testing just one file
];
// Get list of files in `testFiles` that aren't in the list of packaged fileNames
const missingFiles = _.without(testFiles, ..._.map(res.files, 'path'));
if (!_.isEmpty(missingFiles)) {
throw new Error(`Files [${missingFiles.join(', ')}] are not included in package.json "files". ` +
`Please make sure these files are included before publishing.`);
}
process.exit(0);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/gonfeig/appium.git
git@gitee.com:gonfeig/appium.git
gonfeig
appium
appium
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385