grunt-execsyncs

0.1.1 • Public • Published

grunt-execsyncs

Grunt plugin for executing shell commands using execSync command.

https://github.com/yosuke-furukawa/execsyncs can execute shell commands synchronously.

How to use

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

$ npm install grunt-execsyncs -D

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-execsyncs');

This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.

Configure

'use strict';
  grunt.initConfig({
    execsyncs: {
      ls: {
        cmd: "ls > ./test/ls.txt",
      },
      ls2: {
        cmds: [
          "ls -al > ./test/ll.txt",
          "npm list > ./test/npm.txt",
        ],
      },
      rm: {
        cmds: [
          "rm ./test/ls.txt",
          "rm ./test/ll.txt",
          "rm ./test/npm.txt",
        ],
      }
    },
  });
  grunt.loadNpmTasks('grunt-execsyncs');
  grunt.registerTask('test', [
    'execsyncs:ls', 
    'execsyncs:ls2', 
    'execsyncs:rm'
  ]);
 

Dependencies (1)

Dev Dependencies (3)

Package Sidebar

Install

npm i grunt-execsyncs

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • yosuke-furukawa