Skip to content

Commit 4df51f0

Browse files
committed
chore: add angular-cli configuration to the project object
1 parent 8083979 commit 4df51f0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

addon/ng2/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
/* jshint node: true */
22
'use strict';
33

4+
var config = require('./models/config');
5+
46
module.exports = {
57
name: 'ng2',
8+
9+
config: function () {
10+
this.project.ngConfig = this.project.ngConfig || config.CliConfig.fromProject();
11+
},
12+
613
includedCommands: function () {
714
return {
815
'new': require('./commands/new'),

addon/ng2/models/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface CliConfigJson {
1313

1414
function _findUp(name: string, from: string) {
1515
let currentDir = from;
16-
while (currentDir && currentDir != '/') {
16+
while (currentDir && currentDir !== path.parse(currentDir).root) {
1717
const p = path.join(currentDir, name);
1818
if (fs.existsSync(p)) {
1919
return p;

0 commit comments

Comments
 (0)