mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Release: remove scripts and dev deps from dist package.json
- this became necessary due to the addition of the prepare script - scripts aren't needed and don't work in the dist repo Close gh-5404
This commit is contained in:
parent
3b963a2166
commit
7eac932da7
@ -15,8 +15,7 @@ module.exports = function( Release, files, complete ) {
|
|||||||
const extras = [
|
const extras = [
|
||||||
"src",
|
"src",
|
||||||
"LICENSE.txt",
|
"LICENSE.txt",
|
||||||
"AUTHORS.txt",
|
"AUTHORS.txt"
|
||||||
"package.json"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,6 +100,19 @@ module.exports = function( Release, files, complete ) {
|
|||||||
shell.rm( "-f", `${ Release.dir.dist }/src/wrapper.js` );
|
shell.rm( "-f", `${ Release.dir.dist }/src/wrapper.js` );
|
||||||
shell.rm( "-f", `${ Release.dir.dist }/src/.eslintrc.json` );
|
shell.rm( "-f", `${ Release.dir.dist }/src/.eslintrc.json` );
|
||||||
|
|
||||||
|
// Write package.json
|
||||||
|
// Remove scripts and other superfluous properties,
|
||||||
|
// especially the prepare script, which fails on the dist repo
|
||||||
|
const packageJson = Object.assign( {}, pkg );
|
||||||
|
delete packageJson.scripts;
|
||||||
|
delete packageJson.devDependencies;
|
||||||
|
delete packageJson.dependencies;
|
||||||
|
delete packageJson.commitplease;
|
||||||
|
await fs.writeFile(
|
||||||
|
`${ Release.dir.dist }/package.json`,
|
||||||
|
JSON.stringify( packageJson, null, 2 )
|
||||||
|
);
|
||||||
|
|
||||||
// Write generated bower file
|
// Write generated bower file
|
||||||
await fs.writeFile( `${ Release.dir.dist }/bower.json`, generateBower() );
|
await fs.writeFile( `${ Release.dir.dist }/bower.json`, generateBower() );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user