node.js - how to set grunt variable env path -
i trying set grunt
node.js
project , have followed below steps:
1)i have installed node.js
, working fine.
2)installed git
.
3)installed grun
running: npm install -g grunt-cli
.
c:\users\user\downloads\bpost-gs-api-1.1.1>npm install -g grunt-cli c:\users\user\appdata\roaming\npm\grunt -> c:\users\891153\appdata\roaming\npm\node_modules\grunt-cli\bin\grunt c:\users\user\appdata\roaming\npm `-- grunt-cli@1.2.0
now have run cmd grunt -version
, got below error:
grunt
not recognized internal or external command, operable program or batch file.
can please me set grunt
project. how setup variable env
, how setup path etc.
appreciate help
https://gruntjs.com/getting-started
in order started, you'll want install grunt's command line interface (cli) globally. may need use sudo (for osx, *nix, bsd etc) or run command shell administrator (for windows) this.
npm install -g grunt-cli
this put grunt command in system path, allowing run directory. note installing grunt-cli not install grunt task runner! job of grunt cli simple: run version of grunt has been installed next gruntfile. allows multiple versions of grunt installed on same machine simultaneously.
start reading this: https://gruntjs.com/installing-grunt
if need specific version of grunt or grunt plugin, run npm install grunt@version --save-dev version version need.
for better understood on how start setup grunt project: https://gruntjs.com/getting-started#preparing-a-new-grunt-project
a typical setup involve adding 2 files project: package.json , gruntfile. package.json: file used npm store metadata projects published npm modules. list grunt , grunt plugins project needs devdependencies in file. gruntfile: file named gruntfile.js or gruntfile.coffee , used configure or define tasks , load grunt plugins. when documentation mentions gruntfile talking file, either gruntfile.js or gruntfile.coffee.
Comments
Post a Comment