Skip to content

Commit

Permalink
chore: merged frontend package.json into main one
Browse files Browse the repository at this point in the history
  • Loading branch information
hfreire committed May 29, 2017
1 parent 4e1aac9 commit 81541f2
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 56 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
coverage
share
src/web/app
src/web/*
!src/web/systemjs.config.js
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ coverage
node_modules
.idea
*.iml
src/web/*.js
!src/web/systemjs.config.js
src/web/*.js.map
tmp

30 changes: 26 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
},
"homepage": "https://github.com/hfreire/get-me-a-tinder-date-service#readme",
"dependencies": {
"@angular/animations": "4.1.3",
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/material": "2.0.0-beta.6",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@angular/router": "4.1.3",
"@types/lodash": "4.14.64",
"angular-in-memory-web-api": "0.3.2",
"angular2-moment": "1.3.3",
"core-js": "2.4.1",
"font-awesome": "4.7.0",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"zone.js": "0.8.11",
"aws-sdk": "2.58.0",
"bluebird": "3.5.0",
"bluebird-retry": "0.10.1",
Expand Down Expand Up @@ -41,10 +59,13 @@
"istanbul": "0.4.5",
"last-release-github": "1.1.1",
"mocha": "3.4.2",
"semantic-release": "6.3.6",
"pre-git": "3.14.0",
"semantic-release": "6.3.6",
"standard": "10.0.2",
"testdouble": "2.1.2"
"testdouble": "2.1.2",
"tslint": "5.3.2",
"tslint-config-standard": "^5.0.2",
"typescript": "2.3.3"
},
"config": {
"pre-git": {
Expand All @@ -56,10 +77,11 @@
},
"scripts": {
"commit": "./node_modules/.bin/commit-wizard",
"clean": "rm -rf coverage",
"lint": "node_modules/.bin/eslint .",
"clean": "rm -rf coverage && find src/web -type f -name '*.js.map' -exec rm {} +",
"lint": "node_modules/.bin/eslint . && node_modules/.bin/tslint src/web",
"coverage": "node_modules/.bin/istanbul cover --include-all-sources --root src --print detail ./node_modules/mocha/bin/_mocha -- --recursive test",
"test": "npm run lint && npm run coverage",
"compile": "node_modules/.bin/tsc",
"semantic-release": "./node_modules/.bin/semantic-release pre && node_modules/.bin/semantic-release post",
"build": "pushd ./share/docker; NAME=$npm_package_name ./hooks/build; popd",
"push": "pushd ./share/docker; NAME=$npm_package_name ./hooks/push; popd",
Expand Down
41 changes: 28 additions & 13 deletions src/routes/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,42 @@ const { join } = require('path')

class Web extends Route {
constructor () {
super('GET', '/', 'www', 'www')
super('GET', '/', 'web', 'web')
}

auth () {
return false
}

toRoute () {
return _(super.toRoute())
.omit('config.handler')
.merge({
method: 'GET',
path: '/{param*}',
handler: {
directory: {
path: join(__dirname, '../web'),
index: true
return [
_(super.toRoute())
.omit('config.handler')
.merge({
method: 'GET',
path: '/{param*}',
handler: {
directory: {
path: join(__dirname, '../web'),
index: true
}
}
}
})
.value()
})
.value(),
_(super.toRoute())
.omit('config.handler')
.merge({
method: 'GET',
path: '/node_modules/{param*}',
handler: {
directory: {
path: join(__dirname, '../../node_modules'),
index: true
}
}
})
.value()
]
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

const ENVIRONMENT = process.env.ENVIRONMENT || 'local'
const FIND_DATES_PERIOD = process.env.FIND_DATES_PERIOD || 10 * 60 * 1000

const { Serverful } = require('serverful')
Expand Down Expand Up @@ -62,6 +63,10 @@ const findDates = function () {

class Server extends Serverful {
start () {
if (ENVIRONMENT === 'local') {
return Promise.all([ super.start(), SQLite.start() ])
}

return Promise.all([ super.start(), SQLite.start().then(() => Tinder.authorize()), Taste.bootstrap() ])
.then(() => {
if (FIND_DATES_PERIOD > 0) {
Expand Down
4 changes: 0 additions & 4 deletions src/web/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions src/web/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

import {enableProdMode} from "@angular/core";
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";
import { enableProdMode } from '@angular/core'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'

import {AppModule} from "./app/app.module";
import { AppModule } from './app/app.module'

enableProdMode()

Expand Down
31 changes: 0 additions & 31 deletions src/web/package.json

This file was deleted.

File renamed without changes.
3 changes: 3 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "tslint-config-standard"
}

0 comments on commit 81541f2

Please sign in to comment.