[Grunt & Yeoman] grunt-shell でシェルコマンドを実行する
世の task runner は、*-shell というパッケージでシェルコマンドを実行できるということで調べてみた。
[markdown]
> * [sindresorhus/grunt-shell](https://github.com/sindresorhus/grunt-shell)
## Install
Version 1.1.2
“`prettyprinted
% npm install –save-dev grunt-shell
“`
## Usage
`grunt shell:target` で `ls` が実行される。
“`:Gruntfile.coffee
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
shell:
options:
stderr: false
target:
command: ‘ls’
multiple:
command: [
‘mkdir test’,
‘cd test’,
‘ls’
].join(‘&&’)
# These plugins provide necessary tasks.
grunt.loadNpmTasks “grunt-rsync”
grunt.loadNpmTasks “grunt-shell”
“`
やりたいことを実現するために、他にも調査の必要があったのでつづく。
[/markdown]