Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates a lot of folders on mac #5

Closed
nathraQ opened this issue Apr 13, 2016 · 5 comments
Closed

Creates a lot of folders on mac #5

nathraQ opened this issue Apr 13, 2016 · 5 comments
Labels

Comments

@nathraQ
Copy link

nathraQ commented Apr 13, 2016

Running ng2-dg --file bootstrap.ts with any project (tried it e.g. with AngularShowcase/angular2-sample-app) creates empty folders named a,b,c and so on.

I'm using it with osx version 10.11.3 and node version v5.6.0

@manekinekko
Copy link
Member

@nathraQ that's weird. Because I just tested with AngularShowcase/angular2-sample-app and got the graph (see below). Can you give more details about how to reproduce your issue?

image

image

@manekinekko
Copy link
Member

@nathraQ any updates ?

@bitsmag
Copy link

bitsmag commented Apr 18, 2016

I got another laptop today and didn't install the package globally - I got the same problem.

The code which creates the directory uses process.cwd() which returns the current working directory. If the package is not installed globally you have to use "node node_modules/angular2-dependencies-graph/bin" to run the tool - the working directory is then the directory of the angular project, not the directory of the ng2-dg project. Using __dirname solves the problem

I created a pull request. I didn't understand why there is a forEach loop to create the directory, thats why I removed the loop in the second commit.

@manekinekko
Copy link
Member

thanks @bitsmag I'll check your PR this WE.

@manekinekko
Copy link
Member

fix merged in #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants