Created
July 9, 2020 08:52
-
-
Save GeoffCapper/9be1acf4c37f256584e1087f1e634ac3 to your computer and use it in GitHub Desktop.
Tests For TS Build 62630302
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
export let myvariable = 'hello world!'; |
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
'use strict'; | |
const gulp = require('gulp'); | |
const browserify = require('browserify'); | |
const source = require("vinyl-source-stream"); | |
// const tsify = require('tsify'); | |
gulp.task('compile', function (finished) { | |
console.log('Compiling scripts.'); | |
browserify({ | |
standalone: 'main' | |
}) | |
.add('src/scripts/scriptloader.ts') | |
.plugin("tsify", { | |
noImplicitAny: false, | |
module: 'CommonJS' | |
}) | |
.transform("babelify") | |
.bundle() | |
.pipe(source('bundle.js')) | |
.pipe(gulp.dest('debug/js')).on('end', function () { | |
finished(); | |
}); | |
}); |
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
<html> | |
<body> | |
<h1>Test</h1> | |
<script src="debug/js/bundle.js"></script> | |
</body> | |
</html> |
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
import { myvariable } from './globalvars'; | |
console.log(myvariable); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test files for a StackOverflow problem. Presumes .ts files are in src/scripts/ and .html is in root of directory.