Skip to content

Instantly share code, notes, and snippets.

View glenasmith's full-sized avatar

Glen Smith glenasmith

View GitHub Profile
@glenasmith
glenasmith / deploy.cmd
Created June 2, 2015 20:00
An extract of a customised deploy.cmd for running Gulp tasks during Azure deploys
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
:: << Other steps from your file omitted here >>
:: 3. Install npm packages (remove the --production switch!)
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
pushd "%DEPLOYMENT_TARGET%"
call :ExecuteCmd !NPM_CMD! install
@glenasmith
glenasmith / gulpfile.js
Created May 25, 2015 08:49
Zip up your webjob files into a deployable artifact
gulp.task('webjob', function() {
var webjob = "feedFetcher.zip";
del(webjob)
return gulp.src(['parsers/*.js', 'package.json', 'feedFetcher.js'], {base: "."})
.pipe(zip(webjob))
.pipe(gulp.dest('.'));
});
@glenasmith
glenasmith / VotingDemo.ts
Last active August 29, 2015 14:15
A small TypeScript demo for the lightening talk at Canberra JUG
module Voting {
export interface Voter {
votes : number;
castVote() : void;
}
class VotingMachine implements Voter {
constructor(public votes : number = 0) {