commit
04d0642806
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
# pkgName=$(cat ../package.json .name | sed 's/\"//g')
|
||||
|
||||
yarn build:zip
|
||||
git add dist.zip
|
||||
yarn lint-staged
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "rollup --config",
|
||||
"build:zip": "yarn build && node scripts/dist.zip.js",
|
||||
"build:zip": "yarn build && node scripts/zip.js",
|
||||
"test": "jest --passWithNoTests",
|
||||
"lint": "eslint",
|
||||
"format": "prettier --check --write '{src,__tests__}/**/*.{js,ts,tsx}'",
|
||||
|
|
|
@ -4,6 +4,8 @@ const rimraf = require('rimraf');
|
|||
const archiver = require('archiver');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const pkg = require('../package.json');
|
||||
|
||||
const zip = archiver('zip');
|
||||
const distPath = path.resolve(__dirname, '..', 'dist');
|
||||
const distZipName = 'dist.zip';
|
||||
|
@ -26,6 +28,6 @@ rimraf(distZipPath, () => {
|
|||
console.log(chalk.green(`created ${distZipName} in ${ss}s`));
|
||||
});
|
||||
zip.pipe(outputStream);
|
||||
zip.directory(distPath, false);
|
||||
zip.directory(distPath, pkg.name);
|
||||
zip.finalize();
|
||||
});
|
Loading…
Reference in New Issue