GreatBigBore Posted August 17, 2016 Share Posted August 17, 2016 So I've read the instructions on contributing to Phaser, but I'm clearly missing something important. I've reached this point: After that you can clone the repository and run ```npm i``` inside the cloned folder. This will install dependencies necessary for building the project. Once that is ready, make your changes and submit a Pull Request: Ok, but how to buiild? I tried just running grunt to see if it would pick up some default script. No luck. How to run jshint against my changes? Am I missing some other instructions in some obvious place that only a dork would miss? Link to comment Share on other sites More sharing options...
rich Posted August 18, 2016 Share Posted August 18, 2016 Running grunt on its own does have a default, which will build a release into the dist folder for local testing. For jshint, just run 'grunt jshint'. Link to comment Share on other sites More sharing options...
GreatBigBore Posted August 18, 2016 Author Share Posted August 18, 2016 Ah, ok, I'm starting to catch on. What's the 'build' folder for? I was loading phaser.js from that; that's why I thought grunt wasn't working -- phaser.js in the 'build' folder didn't get updated. So now I have index.html pointing to the 'dist' folder. Link to comment Share on other sites More sharing options...
stupot Posted August 18, 2016 Share Posted August 18, 2016 1. start by having node.js installed, this will get you the npm executable. 2. you'll need some global packages, these two at least I think type 'npm install -g grunt' type 'npm install -g grunt-cli' 3. open up a command prompt and move to the phaser directory 4. type 'npm install', this will install phasers dependency code locally 5. you should now be able to build phaser by typing 'grunt' 6. check the \dist folder for output ... a million things can go wrong getting a decent node.js environment setup though. You might also need a compiler installed if npm installers need to build anything native Link to comment Share on other sites More sharing options...
GreatBigBore Posted August 18, 2016 Author Share Posted August 18, 2016 2 minutes ago, stupot said: 1. start by having node.js installed, this will get you the npm executable. ... ... a million things can go wrong getting a decent node.js environment setup though. You might also need a compiler installed if npm installers need to build anything native Steps 1-4 are clear from the instructions in the phaser readme. It was 5 & 6 that I wasn't clear on. The part about running grunt is under a heading that says, Never commit new builds, so I didn't read it closely, because I figured I would obey the heading without needing any further convincing. Yes, I should have read it, I know. Anyway, all is well, I just needed to run grunt. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts