Finish updating deps

This commit is contained in:
Jonathan Cremin 2016-06-02 21:06:52 +01:00
parent 44860b0dcf
commit 24e42343e4
6 changed files with 103 additions and 65 deletions

7
.babelrc Normal file
View file

@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-modules-commonjs",
"transform-es2015-destructuring",
"transform-object-rest-spread"
]
}

View file

@ -1,8 +1,7 @@
{ {
"extends": "airbnb/base", "extends": "airbnb/base",
"ecmaFeatures": { "ecmaFeatures": {
"modules": true, "modules": true
"jsx": true
}, },
"env": { "env": {
"node": true, "node": true,

View file

@ -5,27 +5,32 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"engines": { "engines": {
"node": "^6.0.0", "node": "^6.2.0",
"npm": "^3.8.5" "npm": "^3.8.5"
}, },
"scripts": { "scripts": {
"build": "npm run build-js && npm run build-sass", "build": "npm run build-js && npm run build-sass",
"build-js": "babel -D -m system -d web/public/build -i web/public web/public/src", "build-js": "babel -D -m system -d web/public/build -i web/public web/public/src",
"build-sass": "node-sass -r -o web/public/styles/ web/public/styles/", "build-sass": "node-sass -r -o web/public/styles/ web/public/styles/",
"cover": "istanbul cover _mocha -- -r babel/register test/**/*.spec.js", "cover": "istanbul cover _mocha -- -r babel-register test/**/*.spec.js",
"init": "node -r babel/register -e \"require('./lib/storage')();\"", "init": "babel-node -e \"require('./lib/storage').default();\"",
"jspm": "jspm install", "jspm": "jspm install",
"start": "npm run build && node -r babel/register app.js", "start": "npm run build && node -r babel-register app.js",
"test": "npm run test-seed && mocha -r babel/register test/**/*.spec.js", "test": "npm run test-seed && mocha -r babel-register test/**/*.spec.js",
"test-seed": "node test/fixtures/mongo-user.js && node test/fixtures/mongo-file.js", "test-seed": "node test/fixtures/mongo-user.js && node test/fixtures/mongo-file.js",
"watch": "parallelshell \"npm run watch-js\" \"npm run watch-sass\" \"npm run watch-server\"", "watch": "parallelshell \"npm run watch-js\" \"npm run watch-sass\" \"npm run watch-server\"",
"watch-js": "babel -Dw -m system -d web/public/build web/public/src", "watch-js": "babel -Dw -m system -d web/public/build web/public/src",
"watch-server": "nodemon -r babel/register app.js", "watch-server": "nodemon -r babel-register app.js",
"watch-sass": "node-sass -w -r -o web/public/styles/ web/public/styles/" "watch-sass": "node-sass -w -r -o web/public/styles/ web/public/styles/"
}, },
"dependencies": { "dependencies": {
"aws-sdk": "^2.3.16", "aws-sdk": "^2.3.16",
"babel": "~5.8.21", "babel": "^6.5.2",
"babel-cli": "^6.9.0",
"babel-plugin-transform-es2015-destructuring": "^6.9.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-register": "^6.9.0",
"basic-auth": "~1.0.3", "basic-auth": "~1.0.3",
"co": "~4.6.0", "co": "~4.6.0",
"co-busboy": "~1.3.0", "co-busboy": "~1.3.0",
@ -73,9 +78,10 @@
"swig": "~1.4.2" "swig": "~1.4.2"
}, },
"devDependencies": { "devDependencies": {
"babel-eslint": "^4.0.10", "babel-eslint": "^6.0.4",
"eslint": "~1.3.0", "eslint": "^2.11.1",
"eslint-config-airbnb": "0.0.8", "eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.8.1",
"istanbul": "^0.4.3", "istanbul": "^0.4.3",
"mocha": "^2.5.3", "mocha": "^2.5.3",
"nodemon": "^1.9.2", "nodemon": "^1.9.2",
@ -89,21 +95,21 @@
"baseURL": "web/public" "baseURL": "web/public"
}, },
"dependencies": { "dependencies": {
"angular": "npm:angular@~1.4.3", "angular": "npm:angular@^1.5.6",
"angular-reconnecting-websocket": "github:adieu/angular-reconnecting-websocket@~0.1.1", "angular-reconnecting-websocket": "github:adieu/angular-reconnecting-websocket@~0.1.1",
"angular-strap": "npm:angular-strap@~2.3.1", "angular/resource": "npm:angular-resource@^1.5.6",
"angular/resource": "npm:angular-resource@~1.4.3", "angular/route": "npm:angular-route@^1.5.6",
"angular/route": "npm:angular-route@~1.4.3", "angular-strap": "npm:angular-strap@^2.3.8",
"bootstrap-sass": "npm:bootstrap-sass@~3.3.5", "bootstrap-sass": "npm:bootstrap-sass@^3.3.6",
"cferdinandi/smooth-scroll": "github:cferdinandi/smooth-scroll@~5.3.7", "cferdinandi/smooth-scroll": "github:cferdinandi/smooth-scroll@~5.3.7",
"dropzone": "npm:dropzone@~4.0.1", "dropzone": "npm:dropzone@~4.0.1",
"jquery": "npm:jquery@~2.1.4", "jquery": "npm:jquery@^2.2.4",
"zeroclipboard": "npm:zeroclipboard@~2.2.0" "zeroclipboard": "npm:zeroclipboard@^2.2.0"
}, },
"devDependencies": { "devDependencies": {
"babel": "npm:babel-core@^5.8.22", "babel": "npm:babel-core@^5.8.24",
"babel-runtime": "npm:babel-runtime@^5.8.20", "babel-runtime": "npm:babel-runtime@^5.8.24",
"core-js": "npm:core-js@^1.1.0" "core-js": "npm:core-js@^1.1.4"
} }
} }
} }

View file

@ -3,9 +3,9 @@ import Router from 'koa-router';
import csrf from 'koa-csrf'; import csrf from 'koa-csrf';
import views from 'koa-views'; import views from 'koa-views';
import stats from 'koa-statsd'; import stats from 'koa-statsd';
import * as redis from '../lib/redis';
import StatsD from 'statsy'; import StatsD from 'statsy';
import errors from 'koa-error'; import errors from 'koa-error';
import * as redis from '../lib/redis';
import * as index from './routes/index'; import * as index from './routes/index';
import * as file from './routes/file'; import * as file from './routes/file';
import * as pro from './routes/pro'; import * as pro from './routes/pro';
@ -13,7 +13,10 @@ import * as user from './routes/user';
const router = new Router(); const router = new Router();
router.use(errors({template: path.join(__dirname, 'public', 'error.html')})); router.use(errors({
engine: 'ejs',
template: path.join(__dirname, 'public', 'error.html')
}));
const statsdOpts = {prefix: 'hostr-web', host: process.env.STATSD_HOST}; const statsdOpts = {prefix: 'hostr-web', host: process.env.STATSD_HOST};
router.use(stats(statsdOpts)); router.use(stats(statsdOpts));
@ -37,8 +40,8 @@ router.use(function* stateMiddleware(next) {
router.use(csrf()); router.use(csrf());
router.use(views('views', { router.use(views(path.join(__dirname, 'views'), {
default: 'ejs', extension: 'ejs'
})); }));
router.get('/', index.main); router.get('/', index.main);

View file

@ -1,9 +1,11 @@
System.config({ System.config({
baseURL: "/",
defaultJSExtensions: true, defaultJSExtensions: true,
transpiler: "babel", transpiler: "babel",
babelOptions: { babelOptions: {
"optional": [ "optional": [
"runtime" "runtime",
"optimisation.modules.system"
] ]
}, },
paths: { paths: {
@ -12,62 +14,83 @@ System.config({
}, },
map: { map: {
"angular": "npm:angular@1.4.5", "angular": "npm:angular@1.5.6",
"angular-reconnecting-websocket": "github:adieu/angular-reconnecting-websocket@0.1.1", "angular-reconnecting-websocket": "github:adieu/angular-reconnecting-websocket@0.1.1",
"angular-strap": "npm:angular-strap@2.3.1", "angular/resource": "npm:angular-resource@1.5.6",
"angular/resource": "npm:angular-resource@1.4.5", "angular/route": "npm:angular-route@1.5.6",
"angular/route": "npm:angular-route@1.4.5", "angular-strap": "npm:angular-strap@2.3.8",
"babel": "npm:babel-core@5.8.23", "babel": "npm:babel-core@5.8.38",
"babel-runtime": "npm:babel-runtime@5.8.20", "babel-runtime": "npm:babel-runtime@5.8.38",
"bootstrap-sass": "npm:bootstrap-sass@3.3.5", "bootstrap-sass": "npm:bootstrap-sass@3.3.6",
"cferdinandi/smooth-scroll": "github:cferdinandi/smooth-scroll@5.3.7", "cferdinandi/smooth-scroll": "github:cferdinandi/smooth-scroll@5.3.7",
"core-js": "npm:core-js@1.1.3", "core-js": "npm:core-js@1.2.6",
"dropzone": "npm:dropzone@4.0.1", "dropzone": "npm:dropzone@4.0.1",
"jquery": "npm:jquery@2.1.4", "jquery": "npm:jquery@2.2.4",
"zeroclipboard": "npm:zeroclipboard@2.2.0", "zeroclipboard": "npm:zeroclipboard@2.2.0",
"github:jspm/nodelibs-assert@0.1.0": {
"assert": "npm:assert@1.4.1"
},
"github:jspm/nodelibs-buffer@0.1.0": { "github:jspm/nodelibs-buffer@0.1.0": {
"buffer": "npm:buffer@3.4.3" "buffer": "npm:buffer@3.6.0"
}, },
"github:jspm/nodelibs-path@0.1.0": { "github:jspm/nodelibs-path@0.1.0": {
"path-browserify": "npm:path-browserify@0.0.0" "path-browserify": "npm:path-browserify@0.0.0"
}, },
"github:jspm/nodelibs-process@0.1.1": { "github:jspm/nodelibs-process@0.1.2": {
"process": "npm:process@0.10.1" "process": "npm:process@0.11.3"
}, },
"npm:angular-strap@2.3.1": { "github:jspm/nodelibs-util@0.1.0": {
"util": "npm:util@0.10.3"
},
"npm:angular-strap@2.3.8": {
"buffer": "github:jspm/nodelibs-buffer@0.1.0", "buffer": "github:jspm/nodelibs-buffer@0.1.0",
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
"fs": "github:jspm/nodelibs-fs@0.1.2", "fs": "github:jspm/nodelibs-fs@0.1.2",
"path": "github:jspm/nodelibs-path@0.1.0", "path": "github:jspm/nodelibs-path@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.1", "process": "github:jspm/nodelibs-process@0.1.2",
"systemjs-json": "github:systemjs/plugin-json@0.1.0" "util": "github:jspm/nodelibs-util@0.1.0"
}, },
"npm:angular@1.4.5": { "npm:assert@1.4.1": {
"process": "github:jspm/nodelibs-process@0.1.1" "assert": "github:jspm/nodelibs-assert@0.1.0",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"util": "npm:util@0.10.3"
}, },
"npm:babel-runtime@5.8.20": { "npm:babel-runtime@5.8.38": {
"process": "github:jspm/nodelibs-process@0.1.1" "process": "github:jspm/nodelibs-process@0.1.2"
}, },
"npm:buffer@3.4.3": { "npm:buffer@3.6.0": {
"base64-js": "npm:base64-js@0.0.8", "base64-js": "npm:base64-js@0.0.8",
"ieee754": "npm:ieee754@1.1.6", "child_process": "github:jspm/nodelibs-child_process@0.1.0",
"is-array": "npm:is-array@1.0.1"
},
"npm:core-js@1.1.3": {
"fs": "github:jspm/nodelibs-fs@0.1.2", "fs": "github:jspm/nodelibs-fs@0.1.2",
"process": "github:jspm/nodelibs-process@0.1.1", "ieee754": "npm:ieee754@1.1.6",
"systemjs-json": "github:systemjs/plugin-json@0.1.0" "isarray": "npm:isarray@1.0.0",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:core-js@1.2.6": {
"fs": "github:jspm/nodelibs-fs@0.1.2",
"path": "github:jspm/nodelibs-path@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"systemjs-json": "github:systemjs/plugin-json@0.1.2"
}, },
"npm:dropzone@4.0.1": { "npm:dropzone@4.0.1": {
"process": "github:jspm/nodelibs-process@0.1.1" "process": "github:jspm/nodelibs-process@0.1.2"
}, },
"npm:jquery@2.1.4": { "npm:inherits@2.0.1": {
"process": "github:jspm/nodelibs-process@0.1.1" "util": "github:jspm/nodelibs-util@0.1.0"
}, },
"npm:path-browserify@0.0.0": { "npm:path-browserify@0.0.0": {
"process": "github:jspm/nodelibs-process@0.1.1" "process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:process@0.11.3": {
"assert": "github:jspm/nodelibs-assert@0.1.0"
},
"npm:util@0.10.3": {
"inherits": "npm:inherits@2.0.1",
"process": "github:jspm/nodelibs-process@0.1.2"
}, },
"npm:zeroclipboard@2.2.0": { "npm:zeroclipboard@2.2.0": {
"process": "github:jspm/nodelibs-process@0.1.1" "process": "github:jspm/nodelibs-process@0.1.2"
} }
} }
}); });

View file

@ -21,17 +21,17 @@
</div> </div>
<div class='row vertical-center'> <div class='row vertical-center'>
<div class='col-md-12'> <div class='col-md-12'>
<h2>{{ status }}</h2> <h2><%= status %></h2>
{% if status >= 500 %} <% if (status >= 500) { %>
<h1>{{ error }}</h1> <h1><%= error %></h1>
<p>Refreshing might fix the problem. If not, sit tight! We're on it!</p> <p>Refreshing might fix the problem. If not, sit tight! We're on it!</p>
{% elseif status === 404 %} <% } else if (status === 404) { %>
<h1>Sorry, it looks like the file you asked for is gone.</h1> <h1>Sorry, it looks like the file you asked for is gone.</h1>
<a href='/'>Take Me Home</a> <a href='/'>Take Me Home</a>
{% else %} <% } else { %>
<h1>{{ error }}</h1> <h1><%= error %></h1>
<a href='/'>Take Me Home</a> <a href='/'>Take Me Home</a>
{% endif %} <% } %>
</p> </p>
</div> </div>
</div> </div>