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
const config = require('./_' + process.env.NODE_ENV); | |
export default class Environment { | |
static get API_ORIGIN() { | |
return config.API_ORIGIN; | |
} | |
} |
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
const config = require('./_' + process.env.NODE_ENV); | |
export default class Environment { | |
static get API_ORIGIN() { | |
return config.API_ORIGIN; | |
} | |
} |
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
const config = { | |
API_ORIGIN: 'https://example-beta.com/api/' // 開発環境用 | |
} | |
module.exports = config; |
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
import nodeResolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs' | |
import babel from 'rollup-plugin-babel' | |
export default { | |
entry: 'src/main.js', // エントリーポイント | |
dest: 'dist/bundle.js', // アウトプット | |
plugins: [ // 利用するプラグイン | |
nodeResolve({ jsnext: true }), // node_modulesを利用する | |
commonjs(), // CommonJSモジュールをES6に変換する |
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
.image-grid { | |
text-align: justify; | |
text-align-last: justify; | |
} | |
.image-grid-item { | |
display: inline-block; | |
} |
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
{ | |
"scripts": { | |
"build" : "gulp", | |
"production": "gulp production", | |
"sass" : "gulp sass", | |
"minify" : "gulp minify" | |
} | |
} |
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']); |
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"> | |
<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> |