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
// build/tasks/browserify.js | |
const gulp = require( 'gulp' ); | |
const browserify = require( 'browserify' ); | |
const uglify = require( 'gulp-uglify' ); | |
const source = require( 'vinyl-source-stream' ); | |
const gutil = require( 'gulp-util' ); | |
const buffer = require( 'vinyl-buffer' ); | |
const sourcemaps = require( 'gulp-sourcemaps' ); | |
const notify = require( 'gulp-notify' ); |
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
// test/server-test/serverSpec.js | |
// Test cases for routing | |
import { expect } from 'chai'; | |
import request from 'supertest'; | |
import mongoose from 'mongoose'; | |
import { ImdbSchema } from '../../app/server/models/ImdbSchema'; | |
import server from '../../app/server/'; | |
import sampleData from '../sampleData'; |
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
//tests and code for utils.js | |
const query = { | |
name: 'how I met your mother', | |
type: 'series' | |
}; | |
describe( 'Util helper methods', () => { | |
it( 'Util.getImdbId returns id for an Imdb search', () => { | |
return getImdbId( query ) | |
.then(( data ) => { |
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
import gulp from 'gulp'; | |
import browserSync from 'browser-sync'; | |
import nodemon from 'gulp-nodemon'; | |
const browserOpts = { | |
proxy: 'http://localhost:3000', | |
port: 9000, | |
open: false | |
}; |
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
/* eslint-disable import/no-extraneous-dependencies*/ | |
// Test cases for Mongo Schemas | |
import { ImdbSchema } from '../../app/server/models/ImdbSchema'; | |
import sampleData from '../sampleData'; | |
let movie; | |
let Imdb; | |
let connection; | |
require( '../../app/server/db' ); |
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
import Express from 'express'; | |
import pathUtil from 'path'; | |
import { DBDisconnect } from '../../utils'; | |
import { rootPath } from '../../conf'; | |
const bodyParser = require( 'body-parser' ); | |
const allRoutes = require( './routes' ); | |
const notFoundRoute = require( './routes/404' ); | |
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
import React, { Component } from 'react'; | |
import loadGoogleMapsAPI from 'load-google-maps-api'; // Única dependencia extra | |
// es muy importante añadirle height y width!!! | |
const MAP_STYLES = { | |
height: '450px', | |
width: '100%' | |
} | |
const OPTIONS = { |
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
import React, { Component } from 'react'; | |
import { Row, Col, Progress } from 'reactstrap'; | |
import Loading from '../components/subComponents/loading'; | |
import ReactHtmlParser from 'react-html-parser'; | |
export default class Success extends Component { | |
constructor( props ) { | |
super( props ) | |
this.state = { |
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
// build IA | |
import Human from 'forgotten/species'; | |
import Utils from 'some/crazy/path'; | |
@Uitls | |
@Human | |
export default IA extends Human { | |
constructor(type, ram) { | |
super(name, sex) | |
this.type = type; |
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
import { whichUserAgent, isFirefoxAgent, isWebKitAgent, isOldInternetExplorer } from './modules/userAgent'; | |
import { doHttpRequest } from './modules/httpRequest'; | |
document.addEventListener( 'DOMContentLoaded', () => { | |
/** | |
* checkHeightBody - Calls isFirefoxAgent, isWebKitAgent or isOldInternetExplorer | |
* dependig on userAgent | |
* | |
* @param {Object} navigatorObject navigator Object |