generators/app/files.js
function addPageSetsModule(clientFramework) {
    let appModulePath;
    try {
        if (clientFramework !== 'angular1') {
            appModulePath = `${CLIENT_MAIN_SRC_DIR}app/app.module.ts`;
            const fullPath = path.join(process.cwd(), appModulePath);

            let args = {
                file: appModulePath
            };

            args.haystack = this.fs.read(fullPath);

            args.needle = `import { ${this.angularXAppName}EntityModule } from './entities/entity.module';`;
            args.splicable = [`import { ${this.angularXAppName}PageSetsModule } from './pages/page-sets.module';`]
            args.haystack = jhipsterUtils.rewrite(args);

            args.needle = `${this.angularXAppName}AccountModule,`;
            args.splicable = [`${this.angularXAppName}PageSetsModule,`]
            args.haystack = jhipsterUtils.rewrite(args);

            this.fs.write(fullPath, args.haystack);

        }
    } catch (e) {
        this.log(`${chalk.yellow('\nUnable to find ') + appModulePath + chalk.yellow('. Reference to PageSets module not added to App module.\n')}`);
        this.log('Error:', e);
    }
}
function addPageSetsModule(clientFramework) {
    let appModulePath;
    try {
        if (clientFramework !== 'angular1') {
            appModulePath = `${CLIENT_MAIN_SRC_DIR}app/app.module.ts`;
            const fullPath = path.join(process.cwd(), appModulePath);

            let args = {
                file: appModulePath
            };

            args.haystack = this.fs.read(fullPath);

            args.needle = `import { ${this.angularXAppName}EntityModule } from './entities/entity.module';`;
            args.splicable = [`import { ${this.angularXAppName}PageSetsModule } from './pages/page-sets.module';`]
            args.haystack = jhipsterUtils.rewrite(args);

            args.needle = `${this.angularXAppName}AccountModule,`;
            args.splicable = [`${this.angularXAppName}PageSetsModule,`]
            args.haystack = jhipsterUtils.rewrite(args);

            this.fs.write(fullPath, args.haystack);

        }
    } catch (e) {
        this.log(`${chalk.yellow('\nUnable to find ') + appModulePath + chalk.yellow('. Reference to PageSets module not added to App module.\n')}`);
        this.log('Error:', e);
    }
}
function addPageSetsModule ( clientFramework ) { let appModulePath ; try { if ( clientFramework !== 'angular1' ) { appModulePath = ` ${ CLIENT_MAIN_SRC_DIR } ` ; const fullPath = path . join ( process . cwd ( ) , appModulePath ) ; let args = { file : appModulePath } ; args . haystack = this . fs . read ( fullPath ) ; args . needle = ` ${ this . angularXAppName } ` ; args . splicable = [ ` ${ this . angularXAppName } ` ] args . haystack = jhipsterUtils . rewrite ( args ) ; args . needle = ` ${ this . angularXAppName } ` ; args . splicable = [ ` ${ this . angularXAppName } ` ] args . haystack = jhipsterUtils . rewrite ( args ) ; this . fs . write ( fullPath , args . haystack ) ; } } catch ( e ) { this . log ( ` ${ chalk . yellow ( '\nUnable to find ' ) + appModulePath + chalk . yellow ( '. Reference to PageSets module not added to App module.\n' ) } ` ) ; this . log ( 'Error:' , e ) ; } }
Add pageSets module to app module.

@param {string} clientFramework - The name of the client framework
Add pageSets module to app module .