This file contains 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
const path = require('path'); | |
const webpack = require('webpack'); | |
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const settings = require('./settings'); | |
module.exports = { | |
entry: [ | |
'./src/client/index' | |
], |
This file contains 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
const path = require('path'); | |
const webpack = require('webpack'); | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
const settings = require('./settings'); | |
module.exports = { | |
devtool: 'cheap-module-eval-source-map', | |
entry: [ | |
'./src/client/index' | |
], |
This file contains 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
// Drops all mongo collections associated with a test Database before running any tests. | |
process.env.NODE_ENV = 'test'; | |
import mongoose from 'mongoose'; | |
import settings from '../../src/config/settings'; | |
before(async function(){ | |
const dropCollection = (name) => { | |
return new Promise(function(resolve, reject){ |
This file contains 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
// Utility function to flatten an object with varied inner structure. | |
// Particularly useful in gulp when setting up a watch to listen for any file change. | |
// Arbitrary file path object | |
const paths = { | |
module1: { | |
js: [ | |
'src/app/**/*.js', | |
'some_package/foo.js', | |
'some_package/bar.js', |
This file contains 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
<?php | |
/** | |
* @author K0b3 | |
* Makes a service request to reservations api in order to create a reservation | |
* @param <int> $hold_id | |
* The hold ID to be upgraded to a reservation | |
* @param <int> $order_group_id | |
* The order group which the hold is part of | |
* @param <int> $customer_id |
This file contains 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
<?php | |
/* @author: K0b3 Attias | |
* Executes a services call to a specific endpoint using curl with a number of options | |
* TODO: Modify the params to be a single object with multiple options | |
* @since 09/02/11 | |
* @param <string> $service: The service to execute the call on (defined as a constant in one of the includes files) | |
* @param <string> $method: The method that will be called on the service (defined as a constant in one of the includes files) | |
* @param <string> $http_method: HTTP method | |
* @param <array> $params: Params which will be passed to the endpoint |