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
const https = require('https'); | |
const toCamel = (s) => { | |
return s.replace(/([-_][a-z])/ig, ($1) => { | |
return $1.toUpperCase() | |
.replace('-', '') | |
.replace('_', ''); | |
}); | |
} |
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, etc | |
import { beginRegistration } from 'actions/registration'; | |
export RegistrationButton extends Component { | |
propTypes = { | |
text: PropTypes.string.isRequired, | |
beginRegistration: PropTypes.func.isRequired | |
}; |
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
/*eslint-disable */ | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var makeConfig = require('./webpack.config.js'); | |
var CleanWebpackPlugin = require('clean-webpack-plugin'); | |
var plugins = [ | |
new CleanWebpackPlugin(['public'], { | |
root: path.join(__dirname, ''), | |
verbose: 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
namespace :npm do | |
desc 'setups frontend and deploys in to /public dir' | |
task :setup_frontend do | |
on roles(:all) do | |
within release_path do | |
api_env = fetch(:api_env, :dev) | |
execute "cd #{release_path}/frontend \ | |
&& npm install --silent --no-spin \ | |
&& API_ENV=#{api_env} npm run build-prod \ | |
&& ln -s ../REVISION ../public/version.txt \ |
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, PropTypes } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { default as Decorated } from 'react-widgets/lib/DateTimePicker'; | |
import moment from 'lib/moment'; | |
export default class DateTimePicker extends Component { | |
static propTypes = { | |
value: PropTypes.any, | |
format: PropTypes.string, | |
onChange: PropTypes.func, |
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, PropTypes } from 'react'; | |
import jQuery from 'jquery'; | |
require('bootstrap-datepicker/dist/css/bootstrap-datepicker.css'); | |
require('bootstrap-datepicker/js/bootstrap-datepicker.js'); | |
export default class DatePicker extends Component { | |
static propTypes = { | |
date: PropTypes.instanceOf(Date).isRequired, |
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
setTimeout(function() { | |
console.log('delayed by 1500') | |
}, 1500); | |
// blocking for loop for 3000ms | |
for(;;) ... |