lib/cli.js
function resolveBase(app) {
    const paths = [
      { name: 'base', path: path.resolve(cwd, 'node_modules/base') },
      { name: 'base-app', path: path.resolve(cwd, 'node_modules/base-app') },
      { name: 'assemble-core', path: path.resolve(cwd, 'node_modules/assemble-core') },
      { name: 'assemble', path: path.resolve(cwd, 'node_modules/assemble') },
      { name: 'generate', path: path.resolve(cwd, 'node_modules/generate') },
      { name: 'update', path: path.resolve(cwd, 'node_modules/update') },
      { name: 'verb', path: path.resolve(cwd, 'node_modules/verb') },
      { name: 'core', path: path.resolve(__dirname, '..') }
    ];

    for (const file of paths) {
      if (opts.app && file.name === opts.app && (app = resolveApp(file))) {
        return app;
      }
    }

    if (opts.app) {
      app = resolveApp({
        name: opts.app,
        path: path.resolve(cwd, 'node_modules', opts.app)
      });
    }
    return app;
  }
function resolveBase(app) {
    const paths = [
      { name: 'base', path: path.resolve(cwd, 'node_modules/base') },
      { name: 'base-app', path: path.resolve(cwd, 'node_modules/base-app') },
      { name: 'assemble-core', path: path.resolve(cwd, 'node_modules/assemble-core') },
      { name: 'assemble', path: path.resolve(cwd, 'node_modules/assemble') },
      { name: 'generate', path: path.resolve(cwd, 'node_modules/generate') },
      { name: 'update', path: path.resolve(cwd, 'node_modules/update') },
      { name: 'verb', path: path.resolve(cwd, 'node_modules/verb') },
      { name: 'core', path: path.resolve(__dirname, '..') }
    ];

    for (const file of paths) {
      if (opts.app && file.name === opts.app && (app = resolveApp(file))) {
        return app;
      }
    }

    if (opts.app) {
      app = resolveApp({
        name: opts.app,
        path: path.resolve(cwd, 'node_modules', opts.app)
      });
    }
    return app;
  }
function resolveBase ( app ) { const paths = [ { name : 'base' , path : path . resolve ( cwd , 'node_modules/base' ) } , { name : 'base-app' , path : path . resolve ( cwd , 'node_modules/base-app' ) } , { name : 'assemble-core' , path : path . resolve ( cwd , 'node_modules/assemble-core' ) } , { name : 'assemble' , path : path . resolve ( cwd , 'node_modules/assemble' ) } , { name : 'generate' , path : path . resolve ( cwd , 'node_modules/generate' ) } , { name : 'update' , path : path . resolve ( cwd , 'node_modules/update' ) } , { name : 'verb' , path : path . resolve ( cwd , 'node_modules/verb' ) } , { name : 'core' , path : path . resolve ( __dirname , '..' ) } ] ; for ( const file of paths ) { if ( opts . app && file . name === opts . app && ( app = resolveApp ( file ) ) ) { return app ; } } if ( opts . app ) { app = resolveApp ( { name : opts . app , path : path . resolve ( cwd , 'node_modules' , opts . app ) } ) ; } return app ; }
Resolve the "app" to use
Resolve the app to use