The sequel to my CoP talk "Let's Talk About JavaScript"
Slides for this presentation: http://slides.com/michaelsnead/lets-talk-about-javascript-5
- Install node.js
https://nodejs.org/download/ - Install gulp globally by opening an admin prompt and running
npm install -g gulp - If anything went wrong, make sure these are in your path:
C:\Program Files\nodejs
C:\Users\<UserName>\AppData\Roaming\npm
- Install the Task Runner Explorer extension for VS2013
https://visualstudiogallery.msdn.microsoft.com/8e1b4368-4afb-467a-bc13-9650572db708
- Add a
package.jsonfile like the one here to the root of your web project:
https://github.com/aikeru/LetsTalkJavaScript2/raw/master/ExistingMVCAfter/LetsTalkJS2/package.json - Run
npm installfrom within the same folder
You only need to do this when the package.json changes. - Add a
gulpfile.jsfile like the one here to the root of your web project
https://raw.githubusercontent.com/aikeru/LetsTalkJavaScript2/master/ExistingMVCAfter/LetsTalkJS2/gulpfile.js
- Add the images
Check.pngandwarning.pngfrom here:
https://github.com/aikeru/LetsTalkJavaScript2/tree/master/ExistingMVCBefore/LetsTalkJS2 - Change the path of your JavaScript tests to match where you keep them
The example has two projects,LetsTalkJS2andPresentation.Tests. Since the tests are in thePresentation.Testsfolder, you specify to go up one folder (to solution root) then into thePresentation.Testsproject folder and into theClientfolder where tests are stored.
The relative path is configured on line 15 ofgulpfile.js.