anikethsaha / create-web-app

Select your project type and use any boilerplate to get started! a project where you dont need any manually boilerplate adding phase in your software development phases
https://www.npmjs.com/package/@buildtip/create-web-app
Apache License 2.0
15 stars 3 forks source link

Bug: Cant get the location of the template folder after installed as global Dependency #24

Closed anikethsaha closed 5 years ago

anikethsaha commented 5 years ago

In this package project link the main file is running when the package is run is dist/cli.js. Now, this file needs to get a projects from one upper directory. The method I implemented in node is

fs.readFile(`../generators/app/templates/${answer.stack}/package.json`,CB)

But this is checking from in the folder from where the command is running or from the location of the user’s terminal. Not from where this package is installed.

I want a node method or something which can get me the location of the project installed (global location as it is global package) not the location from where it is called.

This is a major issue and till its open , The tool is not working properly.

The next patch release will be resolving this issue.

NPM forum link

anikethsaha commented 5 years ago

Fixed at https://github.com/buildtip/create-web-app/commit/0e931bfb114ab9055831d7da1de4484b91866ff5