Here’s a brain dump of my experience getting these recent-ish techs up and running together on a small project … Project Structure and Goal My project (named baby-engine), is structured like this, you can see it here src/ <ES6 JavaScript source> lib/ <the ES6 js in src/ gets built and dumped into here as ES5 JS> index.js <-- npm module entry point written in vanilla ES5 and require()s stuff from l
手元でコードを書きながら React.js を学習しようと、タイトルどおりの最小構成を作ってみました。 上記の公式ページの Starter Kit や Tutorial の構成が物足りなかったので.. GitHub に置いたので、よろしければ参考にしてください。 ⇒ https://github.com/hkusu/react-babel-browserify-gulp-sample 上記の README.md に記載している通り、特徴としては次のとおりです。 ECMAScript 6 構文のサポートおよび JSX ファイルのコンパイルに Babel を利用 依存モジュールの管理(CommonJS準拠)に Browserify を利用 タスクランナーとして gulp を利用 またサンプルコードとして、簡単なデータバインドを React.js で実装してあります。デモは こちら(GitHub
browserify の API が変わったので、この記事のコードのままでは動きません! gulp で browserify しようとしたんだけど、 色々ハマったので、 ひとまずまとめておきたい。 登場人物 gulp ちゃん フロントエンドのビルドエンジン。 grunt を馬鹿にしてる。 browserify ちゃん CommonJS スタイルの require をフロントエンドでも使えるようにする npm モジュール。 調子に乗ってるけど webpack がきになる。 vinyl ちゃん npm 全般で使うオブジェクトの名前。モナドを感じる。 俺がさっき知った。 gulp の仕組み そもそも gulp って、確かに grunt より短く書けるけど、 具体的になにしてるのかよくわかんねーよ! って思ったので、 まず、この短いコードから考えていきたい。 var gulp = require(
Getting Started One weekend, I decided to really immerse myself in Grunt and RequireJS. Gotta stay up on these things right? Done. Then Monday rolls around, "and just like that Grunt and RequireJS are out, it’s all about Gulp and Browserify now." (╯°□°)╯︵ ┻━┻ When I was done flipping tables, I set aside my newly acquired Grunt + RequireJS skills, and started over again with Gulp and Browserify to
まずnpmから必要な物をいれる。gulpで browserify/coffeeify を使ってビルドする場合、coffee-script も必要になる。 $ mkdir proj-path; cd proj-path $ npm init $ npm install --save-dev gulp gulp-browserify gulp-watch gulp-plumber gulp-rename coffeeify coffee-script gulp-rename リネームタスク gulp-watch 監視タスク gilp-plumber タスクの実行に失敗してもgulpを終了させないパイプ(watchでビルド失敗時に終了させない) gulp-browserify browserify gulpfile.coffee gulp = require 'gulp' browserify
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く