Skip to content

Commit

Permalink
Merge pull request #227 from ngx-rocket/bugfix/update
Browse files Browse the repository at this point in the history
Fixed project type detection (fixes #226)
  • Loading branch information
sinedied committed Jan 24, 2018
2 parents 7b69424 + ea841af commit 861c68d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const inquirer = require('inquirer');
const env = require('yeoman-environment').createEnv();
const chalk = require('chalk');
const figures = require('figures');
const get = require('lodash.get');
const minimist = require('minimist');
const updateNotifier = require('update-notifier');
const asciiLogo = require('@ngx-rocket/ascii-logo');
Expand Down Expand Up @@ -124,7 +125,7 @@ class NgxCli {
console.log(asciiLogo(pkg.version));
} else if (fs.existsSync('.yo-rc.json')) {
const rc = JSON.parse(fs.readFileSync('.yo-rc.json'));
addon = Boolean(rc['generator-ngx-rocket']);
addon = Boolean(get(rc, 'generator-ngx-rocket.props.isAddon'));
} else {
this._exit(`No existing app found, use ${chalk.blue('ngx new')} instead`);
}
Expand Down
1 change: 1 addition & 0 deletions generators/addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class NgxAddonGenerator extends Generator {
this.insight.track('generator', this.props.advanced ? 'advanced' : 'simple');
this.insight.track('package-manager', this.packageManager);
this.props.className = upperFirst(camelCase(this.props.appName));
this.props.isAddon = true;
}

install() {
Expand Down
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"inquirer": "^5.0.1",
"insight": "^0.9.0",
"lodash.camelcase": "^4.3.0",
"lodash.get": "^4.4.2",
"lodash.upperfirst": "^4.3.1",
"minimist": "^1.2.0",
"update-notifier": "^2.3.0",
Expand Down

0 comments on commit 861c68d

Please sign in to comment.