-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
22 additions
and
32 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
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 |
---|---|---|
|
@@ -4,5 +4,3 @@ Thumbs.db | |
.nvm-version | ||
node_modules | ||
npm-debug.log | ||
|
||
.scaleway |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
var fs = require('fs') | ||
var jsStringEscape = require('js-string-escape') | ||
'use strict' | ||
|
||
var sjcl, skeleton, bundle, index | ||
const fs = require('fs') | ||
const jsStringEscape = require('js-string-escape') | ||
|
||
console.info('Reading JSCL from NPM package.') | ||
sjcl = fs.readFileSync(require.resolve('sjcl'), {encoding: 'utf8'}) | ||
const sjcl = fs.readFileSync(require.resolve('sjcl'), {encoding: 'utf8'}) | ||
|
||
console.info('Reading DownloadJS from NPM package.') | ||
downloadjs = fs.readFileSync(require.resolve('downloadjs/download.min.js'), {encoding: 'utf8'}) | ||
const downloadjs = fs.readFileSync(require.resolve('downloadjs/download.min.js'), {encoding: 'utf8'}) | ||
|
||
console.info('Reading skeleton HTML.') | ||
skeleton = fs.readFileSync('./src/skeleton.html', {encoding: 'utf8'}) | ||
const skeleton = fs.readFileSync('./src/skeleton.html', {encoding: 'utf8'}) | ||
|
||
console.info('Creating bundle HTML.') | ||
bundle = skeleton.replace('{{sjcl}}', sjcl) | ||
let bundle = skeleton.replace('{{sjcl}}', sjcl) | ||
bundle = encodeURIComponent(bundle) | ||
bundle = jsStringEscape(bundle) | ||
|
||
console.info('Reading web service HTML.') | ||
index = fs.readFileSync('./src/index.html', {encoding: 'utf8'}) | ||
|
||
console.info('Creating web service HTML.') | ||
index = index.replace('{{sjcl}}', sjcl) | ||
index = index.replace('{{downloadjs}}', downloadjs) | ||
index = index.replace('{{bundle-html}}', bundle) | ||
const index = fs.readFileSync('./src/index.html', {encoding: 'utf8'}) | ||
.replace('{{sjcl}}', sjcl) | ||
.replace('{{downloadjs}}', downloadjs) | ||
.replace('{{bundle-html}}', bundle) | ||
|
||
console.info('Writing web service HTML.') | ||
fs.writeFileSync('./index.html', index) |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
rsync -rav --delete -e 'ssh -i ./.scaleway' \ | ||
rsync -rav --delete \ | ||
--exclude '.*' \ | ||
--exclude node_modules \ | ||
. root@static.jannisr.de:/var/www/html-vault.jannisr.de/ | ||
. root@html-vault.jannisr.de:/var/www/html-vault.jannisr.de/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
}, | ||
"scripts": { | ||
"build": "node build.js", | ||
"ssh": "ssh -i ./scaleway [email protected]", | ||
"ssh": "ssh [email protected]", | ||
"deploy": "./deploy" | ||
} | ||
} |
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