Last active
November 27, 2018 00:04
Star
You must be signed in to star a gist
npm script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -*- coding: utf-8, tab-width: 2 -*- | |
SPACE="${*//[^ ]/ }" | |
echo "####${SPACE// /#}####" | |
echo "## $SPACE ##" | |
echo "## $* ##" | |
echo "## $SPACE ##" | |
echo "####${SPACE// /#}####" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "name": "my-command", | |
"version": "0.0.1", | |
"bin": { | |
"my-command": "my_script.sh" | |
}, | |
"scripts": { | |
"test": "my-command hello world" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/…/nodejs/modules/my-command$ npm test | |
> my-command@0.0.1 test /…/nodejs/modules/my-command | |
> my-command hello world | |
sh: 1: my-command: not found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/tmp/yolo$ npm test | |
> yolo@0.0.1 test /…/tmp/yolo | |
> my-command here it works | |
##################### | |
## ## | |
## here it works ## | |
## ## | |
##################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment