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 gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
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
| { | |
| "env": { | |
| "browser": true, | |
| "node": true, | |
| "es6": true | |
| }, | |
| "plugins": ["react"], | |
| "ecmaFeatures": { |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Index</title> | |
| <script type="text/javascript"> | |
| window.open ("popup.html","mywindow", "width=350,height=250"); | |
| // Create IE + others compatible event handler |
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
| module.exports = { | |
| 'extends': 'airbnb', | |
| 'installedESLint': true, | |
| 'plugins': [ | |
| 'react', | |
| ], | |
| "rules": { | |
| "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], | |
| "no-console": ["error", { allow: ["warn", "error", "log"] }] | |
| }, |
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 React, { Component } from 'react'; | |
| import { Field, reduxForm } from 'redux-form'; | |
| import { connect } from 'react-redux'; | |
| import * as actions from '../../actions'; | |
| const form = reduxForm({ | |
| form: 'ReduxFormTutorial', | |
| validate | |
| }); |
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
Show hidden characters
| { | |
| "presets": ["es2015", "react"], | |
| "plugins": [ | |
| "add-module-exports", | |
| "transform-object-rest-spread", | |
| "transform-class-properties", | |
| "transform-flow-strip-types" | |
| ] | |
| } |
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 form, | |
| docfrag, | |
| formId, | |
| inputString1, | |
| inputString2, | |
| inputNameString1, | |
| inputNameString2; | |
| docfrag = document.createDocumentFragment(); |
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
| function addLoadEvent(func) { | |
| var oldonload = window.onload; | |
| if (typeof window.onload != 'function') { | |
| window.onload = func; | |
| } else { |
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
| // sizeSelectionModule and addToCartModule are local variables that | |
| // act as shortcuts to their namespaces | |
| describe("when add to cart form is submitted", function () { | |
| var $form; | |
| beforeEach(function () { | |
| // We use div instead of form so we can just mock the submit behavior | |
| $form = $("<div />"); | |
| }); |
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 numbers = [0,1,2,3,5,8,9,11]; | |
| var sum = 17; | |
| function ifTwoNumbersEqualSum(arr, sum){ | |
| var innerArr = []; | |
| for(var k = 0, len = numbers.length; k < len; k++){ | |
| var difference = sum - numbers[k]; |