Skip to content

Commit a2b9b49

Browse files
author
Ahmad Awais
committed
🐛 FIX: Script Path
1 parent ab7c5d8 commit a2b9b49

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

packages/cgb-scripts/scripts/init.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -135,26 +135,6 @@ const printNextSteps = ( blockName, blockDir ) => {
135135
);
136136
};
137137

138-
/**
139-
* NPM install cgb-scripts.
140-
*
141-
* - Build package.json file.
142-
* - NPM install the plugin block.
143-
*
144-
* @param {string} blockDir The block directory.
145-
* @return {promise} promise resolved.
146-
*/
147-
148-
const buildBlockScripts = blockDir => {
149-
shell.cd( blockDir );
150-
151-
// Build the scripts.
152-
return new Promise( async resolve => {
153-
await execa( 'npm', [ 'run', 'build' ] );
154-
resolve( true );
155-
} );
156-
};
157-
158138
/**
159139
* Initializer function.
160140
*
@@ -189,9 +169,4 @@ module.exports = async( root, blockName, blockDir ) => {
189169

190170
// 2. Prints next steps.
191171
await printNextSteps( blockName, blockDir );
192-
193-
// 3. Build scripts.
194-
spinner.start( '4. Building block scripts...' );
195-
await buildBlockScripts( blockDir );
196-
spinner.succeed();
197172
};

packages/create-guten-block/app/initBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = ( blockName, blockDir ) => {
1515

1616
// Get path to cgb-scripts.
1717
const scriptsPath = path.resolve(
18-
root,
18+
blockDir,
1919
'node_modules',
2020
'cgb-scripts',
2121
'scripts',

0 commit comments

Comments
 (0)