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
Build the skills your teams need Give your teams the O’Reilly learning platform and equip them with the resources that drive business outcomes. Click on a feature below to explore. Trusted content Live online events Courses Interactive learning Certification prep O’Reilly Answers AI Academy Assignments Insights Dashboard Trusted content you can count on More than 60K titles from O’Reilly and nearl
この記事は賞味期限切れです。(更新から1年が経過しています) 外部リソースをプロジェクトにインストールするのに、今まではSublimeText2のNettuts+ Fetchを使用していましたが、 node.jsベースのパッケージマネージャーの「Bower」が大変良さそうだったのでレポートをしたためておきます。 Bower とは BOWER – THE BROWSER PACKAGE MANAGER html, css, and javascript Bower is a package manager for the web. Bower lets you easily install assets such as images, CSS and JavaScript, and manages dependencies for you. BowerはWeb開発向けのパッケージマネージャー
Optimize (Concatenate and Minify) RequireJS Projects by naorye · Published April 19, 2013 · Updated May 19, 2016 This article will demonstrate you how to concatenate and minify projects that are based on RequireJS. In this article I’ll use several tools that require Node.js. So, if you don’t have Node.js yet, install it here. Motivation A lot has been written already about RequireJS. This tool all
Building Large-Scale jQuery Applicationsの 超訳的な要約。 1. 依存関係の管理 必要なスクリプトの分だけ script タグを書く方法もあるが、依存関係の解決に script loader には さらに便利な機能が用意されている (例えば、ブラウザがサポートする機能に応じた読み込むスクリプトを 読み込む、など)。 現在、最も有力な script loader は RequireJS (by James Burke) と LabJS (by Kyle Simpson) で、 それぞれに優れた点がある (RequireJSは構造化されたモジュールをサポートする、一方、より 軽量なものを好むなら JabJS が良い)。この 2 つについてのもう少し詳しく知りたいなら、 この 記事が参考になるが、時間を 節約したい人のために、次にいくつかのオプションを紹介
r.js RequireJS用のmoduleをビルドする際にはr.jsを使います。 build.js この時にビルド設定の記述に使用するのがbuild.jsでこんな感じで書きます。 簡単な例だとこんなの ({ baseUrl:'./src', dir : './build', paths:{ jquery:"../lib/jquery-1.8.2", text:'../lib/plugins/text', underscore:'../lib/underscore-1.3.3' } }) 動的なbuild.js build.jsはJSONではなくてJSです。 JSなので処理を書くことが出来ます。 例えば関数その場実行を含む下記のbuild.jsは、上記のものと同じ設定を表します。 ({ baseUrl:'./src', dir : './build', paths:(function ()
This document discusses module patterns in JavaScript and asynchronous module definition (AMD) using RequireJS. It introduces the module pattern as a way to encapsulate code and expose public APIs. AMD and RequireJS are presented as solutions for asynchronously loading JavaScript modules and managing dependencies. Key advantages of the module pattern, AMD and RequireJS include maintaining encapsul
REQUIRE JS JSの非同期ローディングとモジュール化を行うライブラリ 公式サイト 詳しくは、RequireJS実践編を参照 下記順番で読み込み(config-require.jsは自作。名前はなんでも良い) <script src="config-require.js"> <script data-main="main" src="require.js"> 非同期ローディングについて 下記を参考にconfig-require.jsを作成 設定値の詳細はこちらを参照 var require = { deps: ["some/module1", "my/module2", "a.js", "b.js"], callback: function(module1, module2) { //This function will be called when all the dependen
タイトルは釣りです。まだDartは対応してません。 Introduction to JavaScript Source Maps - HTML5 Rocks 圧縮後のJavaScriptやコンパイル後のCoffeeScriptでも、ブラウザ上で元のソースを参照できる新技術「Source Maps」登場 - Publickey Source MapというJavaScriptのデバッグのための仕様が提案されており、WebKitにこの機能が実装されたようです。これは、実行されるJSとそのオリジナルのソースコード*1をマッピングするデータを用意しておき、Chrome Inspectorなどのデバッガでオリジナルのソースコードを参照できるようにする仕組みです。 この仕組があれば、minifyされたJSはもちろんのこと、CoffeeScriptやDartのような別言語からJSにコンパイルする言語のデバ
Twitter で聞いてみたところ @hasegawayosuke さんいわく、Bookmarklet の文字数制限は最短だと約2,000文字らしいです。 でも、その長さで bookmarklet を書くのって難しいですよね。かといって、別のサーバから JavaScript をダウンロードして実行するとなると、そのダウンロードされたスクリプトが安全か、という問題が出てきます。 ならば、暗号学的ハッシュ関数を2,000文字以下で実装し、ダウンロードしたスクリプトの改ざん検証を行った上で実行すればいいのではないか。そうすれば、文字数の制限に悩むことなく Bookmarklet の開発に勤しめるのではないでしょうか。 ジャジャーン!というわけで、とても短い SHA-1 の JavaScript 実装を作りました*1。 GitHub - kazuho/sha1.min.js: SHA-1 impl
Extensible Code Editor CodeMirror is a code editor component for the web. It can be used in websites to implement a text input field with support for many editing features, and has a rich programming interface to allow further extension. This is a CodeMirror field, configured for editing JavaScript code. Features Accessibility Works well with screen readers and keyboard-only users. Mobile Support
Why use a task runner?In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you've configured it through a Gruntfile, a task runner can do most of that mundane work for you—and your team—with basically zero effort. Why use Grunt?The Grunt ecosystem is huge and it's growin
MENURespond to your user’s browser features.Modernizr tells you what HTML, CSS and JavaScript features the user’s browser has to offer.Add your detects Development build What is Modernizr?It’s a collection of superfast tests – or “detects” as we like to call them – which run as your web page loads, then you can use the results to tailor the experience to the user. Why do I need it?All web develope
node-chromeはnode.jsをバックエンドに、フロントエンドをChromeを使ってローカルアプリケーションを開発します。 node.jsを使っていると何でもJavaScriptで完結したい気分になってきます。そこでターゲットになるのがローカルアプリケーションです。Gtkなどを使うことなく、何とChromeを使ってしまうソフトウェアがnode-chromeです。 デモアプリを立ち上げたところ。 デモのコードです。 node-chromeではGoogle Chromeのパスを指定し、普段使っているプロセスとは別でWebブラウザを立ち上げます。後はnode.jsのサーバとして動くのみです。ローカルでWebアプリケーションを立ち上げて利用するという新しいスタイルが実現しそうです。 node-chromeはnode.js製のソフトウェア(ソースコードは公開されていますがライセンスは明記され
These days it's hard to call yourself a web developer if you do not have at least some jQuery experience. jQuery is very helpful for many many things such as browser compatibility, ajax calls, DOM manipulation, utility, and more. It helps us lazy web developers do these common operations simply - but one thing it does not help us do, is write good code. Not so long ago (ok, maybe a while ago) I wr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く