- Expose their mappings so that they are programmatically consumable and easily associated w/ the right plugin
- Expose a list of migrations, which are one of:
- Transform: Migrate a document from one version to the next
- Seed: Create a new document
- Old data which is imported will be run through the migrations before being persisted
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
Look for `// CHRIS:` comments to get some inline thoughts. | |
Well, I learned something new. I've never seen "text/babel" as a script type. How are you transpiling your JSX? | |
I think if I were interviewing you, I'd ask why you didn't use ES6 modules or TypeScript, and something like Webpack to bundle them. It's something you should familiarize yourself with, since every production stack you will work with will be using some equivalent. (TypeScript + VS Code is a great combo, by the way.) | |
You'll also benefit from using a linter on your JavaScript. It catches bugs, and ensures you format things nicely (which helps when someone's interviewing / reviewing your code!) | |
So here's what I'd recommend after a quick scan: |
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
'use strict'; | |
// The STRIPE-supported currencies, sorted by code | |
export const currencies = [ | |
{ | |
'code':'AED', | |
'description':'United Arab Emirates Dirham' | |
}, | |
{ | |
'code':'AFN', |
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
# OpenStruct is slow. But if you need/want similar functionality, | |
# you can achieve it with really good perf results. See the impl | |
# of NotificationEvent below. | |
# | |
# Benchmark results from my Macbook (2.6 GHz Intel Core i5) | |
# | |
# Rehearsal ----------------------------------------------------- | |
# Literal 1.060000 0.020000 1.080000 ( 1.080056) | |
# NotificationEvent 1.350000 0.000000 1.350000 ( 1.367066) | |
# OpenStruct 11.500000 0.110000 11.610000 ( 11.646464) |
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
// A single mixin per file allows file-scoped variables | |
@mixin theme-blue { | |
// File-scoped variables | |
$main-bg: white; | |
$main-fg: #333; | |
$accent-bg: #00B4EF; | |
$accent-fg: white; | |
$content-width: 700px; | |
$gutter-width: 1rem; |
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
// Example usage of SortedRouter | |
var SortedRouter = require('./sortedrouter'); | |
var router = new SortedRouter(); | |
// Supports multiple URLs | |
router.route('', 'books', show('<h1>Books</h1>')); | |
router.route('books/new', show('<h1>New Book</h1>')); | |
router.route('books/:id', show('<h1>Show Book</h1>')); |
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
<!-- Notice that the quoatation marks are not consistent. They should all be | |
" but some are “ Note, this last one is slanted. I'm not even sure how that | |
one got in, but I noticed some students had those slanty quotes! That's not | |
valid HTML! --> | |
<form method=“get" action=“/save-user”> | |
<div class="form_div personal"> | |
<label>Name<br><input type=“text” name=“userName” required="required"></label> | |
</div> | |
</form> |
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
// This is what your gulp task should look like | |
gulp.task('qunit', function(done) { | |
var files = glob.sync('./test/**/*.html'); | |
runAllQunits(files); | |
}); | |
// Runs through each qunit file (one at a time, though this could be relatively easily parallelized) | |
function runAllQunits(testFiles) { | |
var browser = new Zombie(); |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Toggle Example</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
} |
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
use std::io::Writer; | |
// This specifies lifetime constraint of 'a | |
// Type W must implement the Writer trait | |
// Type W has the lifetime 'a (the same as the related struct instance) | |
pub struct Foo<'a, W: 'a + Writer> { | |
writer: &'a mut W | |
} |
NewerOlder