Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

[Idea][cgb-scripts] Move ownPackage to devDependencies on eject command #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/cgb-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ inquirer

// Dependencies.
appPackage.dependencies = appPackage.dependencies || {};
appPackage.devDependencies = appPackage.devDependencies || {};
if ( appPackage.dependencies[ ownPackageName ] ) {
// Del cgb-scripts from dependencies now.
console.log( ` ➖ Removing ${ cyan( ownPackageName ) } from dependencies.` );
Expand All @@ -201,8 +202,8 @@ inquirer
// if ( ownPackage.optionalDependencies[ key ] ) {
// return;
// }
console.log( ` ➕ Adding ${ green( key ) } to dependencies.` );
appPackage.dependencies[ key ] = ownPackage.dependencies[ key ];
console.log( ` ➕ Adding ${ green( key ) } to devDependencies.` );
appPackage.devDependencies[ key ] = ownPackage.dependencies[ key ];
} );

// Sort the dependencies because we are that good :).
Expand Down