Created
August 16, 2016 15:45
-
-
Save alhimik45/b5a2525c2a0af86afc7dc10a44706a07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gulp js | |
[22:44:22] Using gulpfile ~/projects/js/lecture/Gulpfile.js | |
[22:44:22] Starting 'js'... | |
events.js:141 | |
throw er; // Unhandled 'error' event | |
^ | |
TypeScript error: Error TS2318: Cannot find global type 'Array'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var browserify = require("browserify"); | |
var source = require("vinyl-source-stream"); | |
gulp.task('js', function () { | |
return browserify({ | |
entries: './src/ts/index.ts' | |
}).plugin('tsify') | |
.bundle() | |
.pipe(source('app.js')) | |
.pipe(gulp.dest('./static/js')); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"noImplicitAny": true, | |
"target": "ES5", | |
"module": "commonjs", | |
"allowJs": true | |
}, | |
"exclude": [ | |
"node_modules" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment