This file contains hidden or 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
| var isIE = (function() { | |
| var ua = navigator.userAgent, | |
| ieMatches = [/Edge\/[0-9\.]+$/, /MSIE/, /Trident\/[0-9\.]+/]; | |
| for(var i = 0, len = ieMatches.length; i < len; i++) { | |
| if (ua.match(ieMatches[i])) { | |
| return true; | |
| } | |
| } |
This file contains hidden or 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
| 'use strict'; | |
| const gulp = require('gulp'); | |
| const $ = require('gulp-load-plugins')(); | |
| const _ = require('lodash'); | |
| const fs = require('fs-extra'); | |
| const runSequence = require('run-sequence'); |
This file contains hidden or 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
| import { Route, RouteControllerDecorator as RouteController } from './lib/octv'; | |
| import { GamesService } from './services'; | |
| module.exports = (function() { | |
| @RouteController({ | |
| providers: ['express'] | |
| }) | |
| class GamesController { | |
| baseUrl:string = '/games'; | |
| gamesService:GamesService; |
This file contains hidden or 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
| gulp.task('ng-bundle', function(done) { | |
| process.chdir('dist'); | |
| let bundleFilename = 'app.bundle.js'; | |
| const Builder = require('systemjs-builder'); | |
| let builder = new Builder(); | |
| builder.loadConfig('system-config.js') |
This file contains hidden or 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
| // @note start server with pm2 in production | |
| module.exports = (function() { | |
| const argv = require('yargs').argv; | |
| const env = argv.env || process.env.NODE_ENV || 'dev'; | |
| const port = <number> argv.port || 3000; | |
| var app = require('express')(); | |
| const octvConfig = require('./octv.environments')(env); |
This file contains hidden or 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
| export default function RouteController(decoratorParams:Object) { | |
| var providers:any[]; | |
| if (Array.isArray(decoratorParams['providers'])) { | |
| providers = decoratorParams['providers'].map((provider:string) => { | |
| let p = require(provider); | |
| return p; | |
| }); | |
| } |
This file contains hidden or 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
| http { | |
| proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
| proxy_temp_path /var/tmp; | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_comp_level 6; |
This file contains hidden or 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
| var RouteController = require('./lib/RouteController'); | |
| @RouteController({ | |
| providers: ['express', 'mongoose'] | |
| }) | |
| class Dota2Controller { | |
| baseUrl:string = '/dota2'; | |
| routes:any; | |
| constructor(private express, private mongoose) { |
This file contains hidden or 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
| # Atom Init Script (atom/init.coffee) | |
| atom.commands.add 'atom-text-editor', 'custom:toggle-typescript-pane', -> | |
| editor = atom.workspace.getActiveTextEditor() | |
| tsPane = document.querySelector('.atomts') | |
| if (!tsPane) | |
| return | |
| isHidden = tsPane.classList.contains('atomts-hidden') |