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'; | |
module.exports = class ListView { // 変更したのはココ! | |
constructor() { | |
this.list = []; | |
}; | |
add(item) { | |
this.list.push(item); | |
return this; |
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
Show hidden characters
{ | |
"presets": ["es2015"] | |
} |
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
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
gulp.task('browserify', function(){ | |
browserify('./app.js', { debug: true }) | |
.transform(babelify) // ←ココ!! | |
.bundle() | |
.pipe(source('bundle.js')) |
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
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var transform = require('vinyl-transform'); | |
gulp.task('browserify', function() { | |
gulp.src('./app.js') | |
.pipe(transform(function(filename){ | |
return browserify(filename, {debug: true}) | |
.transform(babelify) |
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
# git settings | |
source /usr/local/etc/bash_completion.d/git-prompt.sh | |
source /usr/local/git/contrib/completion/git-completion.bash | |
GIT_PS1_SHOWDIRTYSTATE=true | |
export PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' |
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
#!/bin/bash | |
# How to use | |
# You may have to give permission first time only. | |
# $ chmod u+x 全部.command | |
# open editor (e.g., atom) | |
cd ~/Applications/ | |
atom |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<link rel="stylesheet" href="./main.css" /> | |
</head> | |
<body> |
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
export default class RequestService { | |
getAsync(groupId) { | |
return new Promise.race([ | |
this._getFromCache(groupId), | |
this._getFromServer(groupId) | |
]); | |
} | |
_getFromCache(groupId) { | |
return new Promise((resolve, reject) => {/* (A) */}) |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script> | |
(function() { | |
if (!conditions) { // 条件は省略 | |
return; | |
} | |
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
var gulp = require('gulp'); | |
var del = require('del'); | |
var webpack = require('gulp-webpack'); | |
var eslint = require('gulp-eslint'); | |
var plumber = require('gulp-plumber'); | |
var notify = require('gulp-notify'); | |
var webpackConfig = require('./webpack.config.js'); | |
gulp.task('clean', function() { | |
return del.sync(['dist']); |