@auturge/expect-cwd
v0.1.1
Published
Terminates the process if the user is acting from the wrong working directory.
Downloads
7
Readme
auturge/expect-cwd
Getting Started
@auturge/expect-cwd is available as source code from GitHub, or as a package on npm.
Install it using the follow terminal command:
$ npm install @auturge/expect-cwd
Using expect-cwd
Place the command in your npm script. For example:
{
"scripts": {
"prepublishOnly": "expect-cwd ./dist"
}
}
In this example, if I try to run npm publish
from the project root, expect-cwd
will tell me to change to the ./dist
folder, and then terminate the process.
NOTE: This does NOT make node aware of your scripts from different folders.
That is, if you put
expect-cwd
in apackage.json
script, you'll need to either be able to run that command from the target folder natively, or you'll need apackage.json
in the target folder.
Contributing and Internal Documentation
The auturge family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our documentation on contributing.
License
Distributed under the MIT license. See LICENSE
for more information.