You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Expressで簡単なプロダクトを作る時のオレオレ最小構成です。 要件 サーバーサイドもクライアントサイドもES2015(ES6)で書く サーバーサイドはNode.jsがv4以上だとES2015で書けるはず importなどが使えないと知ったので、babel-nodeを使います クライアントサイドJSはBrowserify + Babelifyでコンパイルする 開発時はWatchifyする ビルド時はUglifyする CSSはStylusで書く StylusはExpressのMiddlewareで都度コンパイルする ライブラリはkouto-swissを使う ベンダープレフィックスはautoprefixerでつける ViewはJadeで書く サーバーからJadeに変数を渡したりする Gulpなどのタスクランナーは使わない $ npm run xxxでやる 画像のSprite化とかするならGu
Unfortunately, these people have a trademark for the word "jade" referring to software, so we've been forced to change our name. Fortunately, @davidglivar has kindly donated the name "pug" to us. I've claimed pug and pugjs everywhere I could think of so hopefully we shouldn't have any problems getting the name. Action items create a new logo (@GarthDB) design new branding for the website (@GarthDB
jade, sass/compass, coffeescript, bowerで静的Webサイトを作るGrunt.js秘伝のタレCoffeeScriptCompassbowergrunt.jsJade 最近のフロントエンド開発、静的サイト開発 HTMLを書くのにJadeを使いたい CSSを書くのにsass/compassを使いたい Javascriptを書くのにCoffeescriptを使いたい Javascriptのライブラリ管理にBowerを使いたい コンパイル処理の自動化などはGrunt.jsを使いたい sass/compassをつかうためにはrubyのcompass gemをインストールしないといけないのでnodeだけで完結できないのがネック。 とはいえ一番つかわれていそうなのがsassで、Stylusは日本語ドキュメントが少なかったり利用事例が少ないのでまだ早い感がある。 ディレ
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 自分が良く使う npm パッケージを、雑に紹介し感想を述べる記事です 非 Noder さん用にもなるように、超有名ライブラリも載せました 個人的感想の羅列で、また 1年以上使ってない/調べてないものも含みます。申し訳ないのですが、参考程度でよろしくです Web アプリケーション作成 express 一番有名でたぶん利用者も多い、Node.js の Webアプリケーションフレームワーク function (req, res, next) { return next(); } のような middleware という概念のフィルターを重ねて処
Jadeのテンプレート継承を使ってみたnode.jsの数あるテンプレートエンジンのうちJadeというのものがあり、expressで使っているのですが、0.16辺りでテンプレート継承をサポートしてたみたいなので使ってみた。 使い方extendsとblockを使うことによってテンプレート継承を行う。 継承元となるテンプレートはこんな風に書く。ファイル名は base.jade としておく。 //- base.jade !!! 5 html head h1 My Site block scripts script(src="/jquery.js") body block header header p some header content block content block footer footer p some footer content blockには名前をつけることができる。このコ
こんにちは、@nazomikanです (この記事はNode.js Advent Calendar 2013の10日めの記事です) nodeでテンプレートエンジンといえばjade その一方で公式ドキュメントで書かれていることだけではだいたい痒い所に手が届かないのでissueから拾い集めたノウハウとか将来的な話とかを書きます 属性の存在が条件によって分かれるケースの書き方 urlが存在するときdata-url属性をつける //truthy: <p data-url="xxx"> //falsy: <p> in jade: p(data-url=(url ? url : false)) 属性の値が条件によって分かれるケースの書き方 boolがtruthyの時はclass="is-show"を、そうでない時はclass="is-hide"をつける //truthy: <p class="is-sh
Hey! The Jade source code displayed in this, and many of the other pages in these docs, is interactive. Edit it and see what happens! String Interpolation, Escaped Consider the placement of the template locals title, author, and theGreat in the following template. - var title = "On Dogs: Man's Best Friend"; - var author = "enlore"; - var theGreat = "<span>escape!</span>"; h1= title p Written with
This project was formerly known as "Jade". However, it was revealed to us that "Jade" is a registered trademark; as a result, a rename was needed. After some discussion among the maintainers, "Pug" was chosen as the new name for this project. As of version 2, "pug" is the official package name. If your package or app currently uses jade, don't worry: we have secured permissions to continue to occu
a short introduction to jade jade is a template engine for node.js and the default rendering engine for the express web framework. simple jade how-to change your texteditor of choice to use 2 spaces for tabs (!)npm install expressnpm install jadecd /to/your/working/directorymkdir viewscreate a file views/layout.jade!!! 5 html(lang='en') head title= title body!= body div#navigation!= partial('navig
O'ReillyのSPA本のサンプルを読みながら、せっかくだからjade式に書いてみよう、なんて思ったら、scriptべた書きを上手く表現できなかったので。 #構成 基本的にnodeclipseのexpressプロジェクトの構成をそのままに。 ##app.js 実はapp.jsの中身は良く理解していない。(今後の課題) prettyをtrueにして、読み易いHTMLを出力するようにだけした。 /** * Module dependencies. */ var express = require('express') , routes = require('./routes') , user = require('./routes/user') , http = require('http') , path = require('path'); var app = express(); //
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く