grunt@0.4系でStylusのコンパイル、Styledoccoの生成、CSSファイルの結合・minifyを自動化するためのメモ。
環境の構築はpackage.json
で行う。
gruntに関連したpackage.json
周りはこのページが詳しい。
Gruntによる継続的なビルド環境を求めて 〜 package.jsonと0.4.0のこと ::ハブろぐ
grunt@0.4系でStylusのコンパイル、Styledoccoの生成、CSSファイルの結合・minifyを自動化するためのメモ。
環境の構築はpackage.json
で行う。
gruntに関連したpackage.json
周りはこのページが詳しい。
Gruntによる継続的なビルド環境を求めて 〜 package.jsonと0.4.0のこと ::ハブろぐ
// api/controllers/AuthController.js | |
var passport = require('passport'); | |
var AuthController = { | |
login: function (req,res) | |
{ | |
res.view(); | |
}, |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<!-- Make the app behave more like a native app --> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width, height=device-height" /> | |
<!-- Bootstrap styles --> | |
<link href="css/bootstrap.css" rel="stylesheet" media="screen" /> |
(function() { | |
if (!window.Modernizr) { | |
return; | |
} | |
var ua = new String(window.navigator.userAgent.toLowerCase()); | |
ua.has = function (cond) { | |
return this.indexOf(cond) != -1; | |
}; |
/** | |
* POST to create a new user. | |
*/ | |
exports.create = function *(){ | |
var body = yield parse(this); | |
// password | |
var pass = body.password; | |
assert(pass, 400, 'password is required'); |
Using D3 in a React TransitionGroup to transition elements. D3 is used purely for transitions, not for data joins. The distinction between entering and exiting elements is handled by the TransitionGroup component. See the React documentation for further information.
Alternative implementations only with D3 and using React without addons.
Note: This implementation is around 30% slower in processing 1000 circles than the other two.
/* | |
* config/bootstrap.js | |
* Example of how to redirect all http request to https | |
* See http://jsbot.io/node/http-and-https-handle-with-sailsjs | |
* | |
*/ | |
module.exports.bootstrap = function(cb) { | |
var express = require("express") | |
var app = express(); |
参考: https://medium.com/@jrwebdev/react-higher-order-component-patterns-in-typescript-42278f7590fb
まだ HOC と TypeScript の良い落としどころが見えてないが、何となく理解しつつある現状。 「TypeScript こわい」から卒業したのと、良記事があったので簡単にまとめておきます。
悪い。 => 型を設定することが難しい。
しかしやっていきたいので、any
を使わずに整理していこう。