Skip to content

Commit

Permalink
Fix the incompatible paths in the JS package generator-grow when co…
Browse files Browse the repository at this point in the history
…mposing generators.
  • Loading branch information
eason9487 committed Apr 19, 2024
1 parent 3f41aea commit 27594d9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/js/generator-grow/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import Generator from 'yeoman-generator';
import path from 'node:path';

/**
* Internal dependencies
Expand All @@ -13,15 +14,18 @@ export default class GrowGenerator extends Generator {
usage() {
return 'yo grow[:app] [options]';
}
initializing() {
const packageRoot = this.sourceRoot() + '/../';
this.composeWith( {

async initializing() {
const packageRoot = path.resolve( this.sourceRoot(), '../..' );

await this.composeWith( {
Generator: GitHubGenerator,
path: packageRoot + '../github/index.js',
path: path.resolve( packageRoot, 'github/index.js' ),
} );
this.composeWith( {

await this.composeWith( {
Generator: DotFilesGenerator,
path: packageRoot + '../dotfiles/index.js',
path: path.resolve( packageRoot, 'dotfiles/index.js' ),
} );
}
}

0 comments on commit 27594d9

Please sign in to comment.