Jump to content

Using the GruntFile


LuckieLordie
 Share

Recommended Posts

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 install

in 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

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 install

in 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 :P 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

it should find it if '/usr/local/bin' is on your path. 

echo $PATH

will tell you if it is. if not you need to add it. add something like

export PATH=$PATH:/usr/local/bin

to 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

it should find it if '/usr/local/bin' is on your path. 

echo $PATH

will tell you if it is. if not you need to add it. add something like

export PATH=$PATH:/usr/local/bin

to 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

/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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...