aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/server
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-10-05 14:03:47 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-10-05 14:03:47 +0800
commit7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0 (patch)
tree0dff417975467cf0d7a7d2acaddc65efdace1ca2 /mascara/server
parent2dba03ffc530e3e2a176aea9712ffc3e189bebc2 (diff)
downloadtangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar.gz
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar.bz2
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar.lz
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar.xz
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.tar.zst
tangerine-wallet-browser-7a9e2aa4f0fe8a12d1fac838f62ca4fbf6763af0.zip
mascara: linting and code clean up
Diffstat (limited to 'mascara/server')
-rw-r--r--mascara/server/index.js8
-rw-r--r--mascara/server/util.js10
2 files changed, 9 insertions, 9 deletions
diff --git a/mascara/server/index.js b/mascara/server/index.js
index 14e3fa18e..12b527e5d 100644
--- a/mascara/server/index.js
+++ b/mascara/server/index.js
@@ -5,7 +5,7 @@ const serveBundle = require('./util').serveBundle
module.exports = createMetamascaraServer
-function createMetamascaraServer(){
+function createMetamascaraServer () {
// start bundlers
const metamascaraBundle = createBundle(__dirname + '/../src/mascara.js')
@@ -17,13 +17,13 @@ function createMetamascaraServer(){
const server = express()
// ui window
serveBundle(server, '/ui.js', uiBundle)
- server.use(express.static(__dirname+'/../ui/'))
- server.use(express.static(__dirname+'/../../dist/chrome'))
+ server.use(express.static(__dirname + '/../ui/'))
+ server.use(express.static(__dirname + '/../../dist/chrome'))
// metamascara
serveBundle(server, '/metamascara.js', metamascaraBundle)
// proxy
serveBundle(server, '/proxy/proxy.js', proxyBundle)
- server.use('/proxy/', express.static(__dirname+'/../proxy'))
+ server.use('/proxy/', express.static(__dirname + '/../proxy'))
// background
serveBundle(server, '/background.js', backgroundBuild)
diff --git a/mascara/server/util.js b/mascara/server/util.js
index 6e25b35d8..6ab41b729 100644
--- a/mascara/server/util.js
+++ b/mascara/server/util.js
@@ -7,14 +7,14 @@ module.exports = {
}
-function serveBundle(server, path, bundle){
- server.get(path, function(req, res){
+function serveBundle (server, path, bundle) {
+ server.get(path, function (req, res) {
res.setHeader('Content-Type', 'application/javascript; charset=UTF-8')
res.send(bundle.latest)
})
}
-function createBundle(entryPoint){
+function createBundle (entryPoint) {
var bundleContainer = {}
@@ -30,8 +30,8 @@ function createBundle(entryPoint){
return bundleContainer
- function bundle() {
- bundler.bundle(function(err, result){
+ function bundle () {
+ bundler.bundle(function (err, result) {
if (err) {
console.log(`Bundle failed! (${entryPoint})`)
console.error(err)