Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added quick build script for deployment
To be able to deploy to surge, I needed a prebuilt package. SystemJS now builds a bundle from main. The rest of the required files are copied into a public folder. It is ugly, but a working hack at least.
- Loading branch information
1 parent
2332373
commit b5711dc
Showing
4 changed files
with
52 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ npm-debug.log | |
app/**/*.js | ||
app/**/*.js.map | ||
.idea/ | ||
typings/ | ||
typings/ | ||
public/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Quick and dirty dist "build system", requires TypeScript compilation to have been performed before starting | ||
*/ | ||
|
||
var path = require("path"); | ||
var Builder = require('systemjs-builder'); | ||
var fs = require('fs'); | ||
|
||
fs.createReadStream('CNAME').pipe(fs.createWriteStream('public/CNAME')); | ||
fs.createReadStream('index.html').pipe(fs.createWriteStream('public/index.html')); | ||
fs.createReadStream('styles.css').pipe(fs.createWriteStream('public/styles.css')); | ||
fs.createReadStream('systemjs.config.js').pipe(fs.createWriteStream('public/systemjs.config.js')); | ||
|
||
// optional constructor options | ||
// sets the baseURL and loads the configuration file | ||
var builder = new Builder('', 'systemjs.config.js'); | ||
|
||
builder | ||
.bundle('app/main.js', 'public/systemjsbundle.js') | ||
.then(function() { | ||
console.log('Build complete'); | ||
}) | ||
.catch(function(err) { | ||
console.log('Build error'); | ||
console.log(err); | ||
}); |
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
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