{"id":17384339,"url":"https://github.com/tsertkov/grunt-sh","last_synced_at":"2025-08-03T03:30:55.865Z","repository":{"id":57255710,"uuid":"20867471","full_name":"tsertkov/grunt-sh","owner":"tsertkov","description":"Grunt task for executing commands in a shell attaching to its terminal.","archived":false,"fork":false,"pushed_at":"2023-07-04T10:30:39.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-17T16:19:00.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsertkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-15T23:20:23.000Z","updated_at":"2023-07-11T11:06:24.000Z","dependencies_parsed_at":"2024-06-19T15:33:13.520Z","dependency_job_id":"afb60221-4dbd-4843-b583-d7e6743f12c1","html_url":"https://github.com/tsertkov/grunt-sh","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsertkov%2Fgrunt-sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsertkov%2Fgrunt-sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsertkov%2Fgrunt-sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsertkov%2Fgrunt-sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsertkov","download_url":"https://codeload.github.com/tsertkov/grunt-sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228518315,"owners_count":17932431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T07:45:12.870Z","updated_at":"2024-12-06T19:41:10.117Z","avatar_url":"https://github.com/tsertkov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-sh\n[![NPM](https://nodei.co/npm/grunt-sh.png)](https://nodei.co/npm/grunt-sh/)\n\n\u003e Grunt task for executing commands in a shell and attaching to terminal by default.\n\n## Getting Started\nThis plugin requires Grunt `~0.4.5`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```sh\nnpm install grunt-sh --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-sh');\n```\n\n## The \"sh\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `sh` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  sh: {\n    options: {\n      // Task-specific child_process.spawn() options go here.\n    },\n    your_target1: \"echo this is target1 shell command\",\n    your_target2: {\n      options: {\n        // Target-specific child_process.spawn() options go here.\n        env: {\n          MY_VAR: \"my_value\"\n        },\n        cwd: \"/home\"\n      },\n      cmd: \"echo $MY_VAR \u0026\u0026 pwd\"\n    },\n    your_target3: \"bash\"\n  },\n});\n```\n\n### Options\n\nOptions are passed unmodified to [exec-sh](https://github.com/tsertkov/exec-sh) which is passing them to [child_process.spawn()](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).\n\n#### options.cwd\nType: `String`\n\nCurrent working directory of the child process\n\n#### options.stdio\nType: `Array|String`\nDefault: `inherit`\n\nChild's stdio configuration. By default stdio streams will be forwarded.\n\n#### options.env\nType: `Object`\n\nEnvironment key-value pairs\n\n#### options.detached\nType: `Boolean`\n\nThe child will be a process group leader.\n\n#### options.uid\nType: `Number`\n\nSets the user identity of the process. (See setuid(2).)\n\n#### options.gid\nType: `Number`\n\nSets the group identity of the process. (See setgid(2).)\n\n## License\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsertkov%2Fgrunt-sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsertkov%2Fgrunt-sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsertkov%2Fgrunt-sh/lists"}