testem.json
{
"framework": "qunit",
"cwd": "dist",
"test_page": "tests/index.html",
}
These instructions will guide you through the process of setting up local, trusted websites on your own computer.
These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.
NOTE: You may substitute the edit
command for nano
, vim
, or whatever the editor of your choice is. Personally, I forward the edit
command to Sublime Text:
alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
/* | |
// Usage: | |
gulp.task('docs', function(cb) { | |
gulp.src('path/to/your/src') | |
.pipe(hologram(cb)); | |
}); | |
*/ | |
var gulp = require('gulp'), | |
notify = require('gulp-notify'), |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
/** | |
* Jasmine RequestAnimationFrame: a set of helpers for testing funcionality | |
* that uses requestAnimationFrame under the Jasmine BDD framework for JavaScript. | |
*/ | |
;(function() { | |
var index = 0, | |
callbacks = {}; | |
function MockRAF(global) { |
// app/controllers/sign-in.js | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
signIn(){ | |
this.set('errors', null); | |
var params = { identification: this.get('email'), password: this.get('password') }; | |
// Redirects to index route on success (configurable in config/environment.js) | |
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params); |
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
/*! | |
* Copyright 2015 Google Inc. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
// just the assignments app, when server does routing | |
render(<AssignmentsApp params={SERVER_PARAMS}/>, el) | |
// just the courses app, same AssignmentsApp when server routed | |
render(( | |
<Router> | |
<Route path={SERVER_BASE_URL} component={CoursesApp}> | |
<IndexRoute component={CourseDashboardApp}> | |
<Route path="assignments" component={AssignmentsApp}> | |
</Route> |
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |