coffeekraken-scripts-stack v1.0.4
Coffeekraken Scripts Stack
- Homepage: Coffeekraken
- Source: Github
- Twitter: Coffeekraken
Table of content
Features
- Display nicely your npm scripts
- List all your scripts automaticaly
- Switch between scripts output easily
- Automatically switch between scripts when they starts
- Display script status like error, success, running, etc...
- Built-in watch mecanism
- Simply define which files to monitor and which scripts to execute
- Display the watch status of each scripts
- Run your scripts visually
- Execute the wanted script with 1 key press
Install
# using npm
npm install coffeekraken-scripts-stack --save-dev
# using yarn
yarn add coffeekraken-scripts-stack --dev
Launch
In order to launch Script Stack in your project, you just need to add this line in your package.json
scripts:
{
"scripts": {
"my-cool-script": "something cool...",
"start": "coffeekraken-scripts-stack my-cool-script [options]"
}
}
Then launch your scripts stack with
# using npm
npm start
# or using yarn
yarn start
Options
Here's the available options that the coffeekraken-scripts-stack
CLI provide
--no-switch
Disable the auto-switch feature. This will prevent the interface to change the selected script when one of them is started.
coffeekraken-scripts-stack --no-switch
--no-watch
Do not start the watch feature on each scripts. This will prevent the interface to automatically start the watches routines on each watchable ones.
coffeekraken-scripts-stack --no-watch
--no-notifications
Do not display any system wide notifications when scripts are completed
coffeekraken-scripts-stack --no-notifications
-c --color
Specify the main color of the interface. Useful to identify a particular project when multiple ones are launched at once.
coffeekraken-scripts-stack -c cyan
The available values of this options are :
black blue green yellow cyan white magenta red
-i --ignore
Specify a script to ignore in the interface. Usually it's a good idea to ignore the start
one if you use it to lauch the interface like so:
coffeekraken-script-stack -i start -i my-other-script
Watch
This interface has a built-in mecanism to watch files and launch a script when these are updated/deleted/added.
Simply specify in your package.json
a watch
property like so:
{
"watch": {
"my-cool-script": {
"paths": "src/js/**/*.js",
"options": {}
},
"my-another-cool-script": {
// etc...
}
},
"scripts": {
"my-cool-script": "webpack",
"my-another-cool-script": "something cool...",
"start" : "coffeekraken-scripts-stack -i start"
}
}
Each watch
objects are a chokidar paths
and options
arguments. Refer to it for more infos.
Notifications
By default, scripts stack will display a system wide notification when a script is completed. This behavior can be removed by setting the --no-notifications
option.
The notifications have no special icons by default but some special icons are available if your script name matches those rules:
$scriptName
===css|fonts|icons|img|js
- dist:
fonts
===css|fonts|icons|img|js
- The last script name part (separated by :)
Here's some exemples of script names that will benefit of the special icons:
img
dist:img
dist:js
something:cool:fonts
js
- etc...
Contribute
This is an open source project and will ever be! You are more that welcomed to contribute to his development and make it more awesome every day. To do so, you have several possibilities:
Who are Coffeekraken
We try to be some cool guys that build some cool tools to make our (and yours hopefully) every day life better.
More on who we are
License
The code is available under the MIT license. This mean that you can use, modify, or do whatever you want with it. This mean also that it is shipped to you for free, so don't be a hater and if you find some issues, etc... feel free to contribute instead of sharing your frustrations on social networks like an asshole...