@@ -9,7 +9,6 @@ const findUp = require('../../../utilities/find-up').findUp;
9
9
let resolve = denodeify ( require ( 'resolve' ) ) ;
10
10
const fs = require ( 'fs-extra' ) ;
11
11
const _ = require ( 'lodash' ) ;
12
- let logger = require ( 'heimdalljs-logger' ) ( 'ember-cli:project' ) ;
13
12
const nodeModulesPath = require ( 'node-modules-path' ) ;
14
13
15
14
let processCwd = process . cwd ( ) ;
@@ -29,8 +28,6 @@ class Project {
29
28
@param {CLI } cli
30
29
*/
31
30
constructor ( root , pkg , ui , cli ) {
32
- logger . info ( 'init root: %s' , root ) ;
33
-
34
31
this . root = root ;
35
32
this . pkg = pkg ;
36
33
this . ui = ui ;
@@ -75,8 +72,6 @@ class Project {
75
72
*/
76
73
setupNodeModulesPath ( ) {
77
74
this . nodeModulesPath = nodeModulesPath ( this . root ) ;
78
-
79
- logger . info ( 'nodeModulesPath: %s' , this . nodeModulesPath ) ;
80
75
}
81
76
82
77
static nullProject ( ui , cli ) {
@@ -244,7 +239,6 @@ class Project {
244
239
ui . writeDeprecateLine ( '`Project.closest` is a private method that will be removed, please use `Project.closestSync` instead.' ) ;
245
240
246
241
return closestPackageJSON ( pathName ) . then ( result => {
247
- logger . info ( 'closest %s -> %s' , pathName , result ) ;
248
242
if ( result . pkg && result . pkg . name === 'ember-cli' ) {
249
243
return Project . nullProject ( _ui , _cli ) ;
250
244
}
@@ -264,24 +258,18 @@ class Project {
264
258
@return {Project } Project instance
265
259
*/
266
260
static closestSync ( pathName , _ui , _cli ) {
267
- logger . info ( 'looking for package.json starting at %s' , pathName ) ;
268
-
269
261
let ui = ensureUI ( _ui ) ;
270
262
271
263
let directory = findupPath ( pathName ) ;
272
- logger . info ( 'found package.json at %s' , directory ) ;
273
264
274
265
let relative = path . relative ( directory , pathName ) ;
275
266
if ( relative . indexOf ( 'tmp' ) === 0 ) {
276
- logger . info ( 'ignoring parent project since we are in the tmp folder of the project' ) ;
277
267
return Project . nullProject ( _ui , _cli ) ;
278
268
}
279
269
280
270
let pkg = fs . readJsonSync ( path . join ( directory , 'package.json' ) ) ;
281
- logger . info ( 'project name: %s' , pkg && pkg . name ) ;
282
271
283
272
if ( ! isEmberCliProject ( pkg ) ) {
284
- logger . info ( 'ignoring parent project since it is not an Angular CLI project' ) ;
285
273
return Project . nullProject ( _ui , _cli ) ;
286
274
}
287
275
@@ -319,19 +307,16 @@ class Project {
319
307
static getProjectRoot ( ) {
320
308
let packagePath = findUp ( process . cwd ( ) , 'package.json' ) ;
321
309
if ( ! packagePath ) {
322
- logger . info ( 'getProjectRoot: not found. Will use cwd: %s' , process . cwd ( ) ) ;
323
310
return process . cwd ( ) ;
324
311
}
325
312
326
313
let directory = path . dirname ( packagePath ) ;
327
314
const pkg = require ( packagePath ) ;
328
315
329
316
if ( pkg && pkg . name === 'ember-cli' ) {
330
- logger . info ( 'getProjectRoot: named \'ember-cli\'. Will use cwd: %s' , process . cwd ( ) ) ;
331
317
return process . cwd ( ) ;
332
318
}
333
319
334
- logger . info ( 'getProjectRoot %s -> %s' , process . cwd ( ) , directory ) ;
335
320
return directory ;
336
321
}
337
322
}
0 commit comments