LuckieLordie Posted December 4, 2013 Share Posted December 4, 2013 Hey,Probably being a bit dense but I need help building the dev branch into the phaser.js file. How do I use the grunt commands? I've tried using the terminal to do it but it doesn't recognise it :/ Thanks! ps: Sorry for hammering the forums over the last few weeks with questions you probably think are simple! Link to comment Share on other sites More sharing options...
mavericknl Posted December 4, 2013 Share Posted December 4, 2013 Did you install grunt-cli globally using the -g parameter? Link to comment Share on other sites More sharing options...
jcs Posted December 4, 2013 Share Posted December 4, 2013 in other words: - install node.js (see nodejs.org if you're running on an unfortunate OS without a package manager)- run: npm install -g grunt-cli from the command-line (terminal)- run: npm installin your phaser directory to pick up the node packages that phaser uses you can then run:grunt from the command-line (terminal) in your phaser directory to build Link to comment Share on other sites More sharing options...
LuckieLordie Posted December 4, 2013 Author Share Posted December 4, 2013 in other words: - install node.js (see nodejs.org if you're running on an unfortunate OS without a package manager)- run: npm install -g grunt-cli from the command-line (terminal)- run: npm installin your phaser directory to pick up the node packages that phaser uses you can then run:grunt from the command-line (terminal) in your phaser directory to build I'm on Mac btw I installed the package from nodejs.org but the commands still don't work in the terminal :/ "npm: command not found" I assume that it's because I'm not in the right folder. The installer says it installed npm and Node at "/usr/local/bin" so shouldn't it be able to find that command? Link to comment Share on other sites More sharing options...
jcs Posted December 4, 2013 Share Posted December 4, 2013 it should find it if '/usr/local/bin' is on your path. echo $PATHwill tell you if it is. if not you need to add it. add something likeexport PATH=$PATH:/usr/local/binto your '.profile' file. (in your home directory) (FYI, Mac has a great package manager, it's just not installed by default. it's called "homebrew" [http://brew.sh]) Link to comment Share on other sites More sharing options...
LuckieLordie Posted December 4, 2013 Author Share Posted December 4, 2013 it should find it if '/usr/local/bin' is on your path. echo $PATHwill tell you if it is. if not you need to add it. add something likeexport PATH=$PATH:/usr/local/binto your '.profile' file. (in your home directory) (FYI, Mac has a great package manager, it's just not installed by default. it's called "homebrew" [http://brew.sh])Cool! I'll look into homebrew. When I navigate to "usr/local/bin" and do an ls I can see npm and node. The problem is if I try to use the npm commands you gave me It just doesn't recognise npm at all. Link to comment Share on other sites More sharing options...
jcs Posted December 4, 2013 Share Posted December 4, 2013 /usr/local/bin has to be on your path (i.e. in your PATH environment variable). if it isn't on your path the OS will not find it. as I said, you can run 'echo $PATH' to see if it is. if it is not, you can add it to your path by editing your .profile file, as I mentioned above Link to comment Share on other sites More sharing options...
jcs Posted December 4, 2013 Share Posted December 4, 2013 (P.S. - you'll have to restart your terminal after editing the .profile file. .profile is read when the terminal session starts) Link to comment Share on other sites More sharing options...
LuckieLordie Posted December 10, 2013 Author Share Posted December 10, 2013 (P.S. - you'll have to restart your terminal after editing the .profile file. .profile is read when the terminal session starts) Cheers jcs, I took some time and came back to it with a fresher head and managed to stop being so dense xD Link to comment Share on other sites More sharing options...
jcs Posted December 10, 2013 Share Posted December 10, 2013 glad to hear it! LuckieLordie 1 Link to comment Share on other sites More sharing options...
Recommended Posts