Skip to content

Commit

Permalink
minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Aug 1, 2017
1 parent 522a93d commit 035a5e7
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ Thumbs.db
.nvm-version
node_modules
npm-debug.log

.scaleway
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
sudo: false
language: node_js

node_js:
- "stable"

- 'stable'
- '7'
- '6'
script:
- "npm run build"

notifications:
email: false

sudo: false

- 'npm run build'
branches:
only:
- master
Expand Down
24 changes: 11 additions & 13 deletions build.js
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)
4 changes: 2 additions & 2 deletions deploy
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/
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Jannis R
Copyright (c) 2017, Jannis R

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"build": "node build.js",
"ssh": "ssh -i ./scaleway [email protected]",
"ssh": "ssh [email protected]",
"deploy": "./deploy"
}
}
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Inspired by [kiss by *Massimo Santini*](https://github.com/mapio/kiss).
[![build status](https://img.shields.io/travis/derhuerst/html-vault.svg)](https://travis-ci.org/derhuerst/html-vault)
[![dependency status](https://img.shields.io/david/derhuerst/html-vault.svg)](https://david-dm.org/derhuerst/html-vault#info=dependencies)
[![dev dependency status](https://img.shields.io/david/dev/derhuerst/html-vault.svg)](https://david-dm.org/derhuerst/html-vault#info=devDependencies)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/html-vault.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)



Expand Down

0 comments on commit 035a5e7

Please sign in to comment.