Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
require.js + CoffeeScriptでお幸せに
Search
Ian Lewis
June 08, 2014
Technology
1
5.1k
require.js + CoffeeScriptでお幸せに
Ian Lewis
June 08, 2014
Tweet
Share
More Decks by Ian Lewis
See All by Ian Lewis
Kubernetes Security Best Practices
ianlewis
38
26k
The Enemy Within: Running untrusted code in Kubernetes
ianlewis
0
1.3k
The Enemy Within: Running untrusted code with gVisor
ianlewis
4
1.3k
KubeCon EU Runtime Track Recap
ianlewis
3
1.6k
コンテナによるNoOpsオートメーション
ianlewis
2
170
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
950
Extending Kubernetes with Custom Resources and Operator Frameworks
ianlewis
10
3.8k
Kubernetesのセキュリティのベストプラクティス
ianlewis
12
17k
Scheduling and Resource Management in Kubernetes
ianlewis
2
1.4k
Other Decks in Technology
See All in Technology
シークレット管理だけじゃない!HashiCorp Vault でデータ暗号化をしよう / Beyond Secret Management! Let's Encrypt Data with HashiCorp Vault
nnstt1
2
120
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.6k
DeNA での思い出 / Memories at DeNA
orgachem
PRO
5
1.8k
アジャイルテストで高品質のスプリントレビューを
takesection
0
140
Devinを使ったモバイルアプリ開発 / Mobile app development with Devin
yanzm
0
210
認知戦の理解と、市民としての対抗策
hogehuga
0
410
衝突して強くなる! BLUE GIANTと アジャイルチームの共通点とは ― いきいきと活気に満ちたグルーヴあるチームを作るコツ ― / BLUE GIANT and Agile Teams
naitosatoshi
0
230
AIエージェントの活用に重要な「MCP (Model Context Protocol)」とは何か
masayamoriofficial
0
210
異業種出身エンジニアが気づいた、転向して十数年経っても変わらない自分の武器とは
macnekoayu
0
220
JuniorからSeniorまで: DevOpsエンジニアの成長ロードマップ
yuriemori
2
320
ドキュメントはAIの味方!スタートアップのアジャイルを加速するADR
kawauso
3
460
DuckDB-Wasmを使って ブラウザ上でRDBMSを動かす
hacusk
1
130
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
73
5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Music & Morning Musume
bryan
46
6.8k
BBQ
matthewcrist
89
9.8k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Bash Introduction
62gerente
614
210k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Building an army of robots
kneath
306
46k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
490
Transcript
Script
お前だれよ
@IanMLewis
None
None
None
None
I like Python
I hate JavaScript
Why?
this
No classes
prototypes don't count
No comprehensions
Namespaces
Environment
Config
<script> var myconfig = “HOGE”; </script> <script src=”file1.js”></script> <script src=”file2.js”></script>
やめろ!
Testing
サーバーに持っていきたいの?
JS以外は知らないの?
他の言語勉強しましょう
None
Require.js + cs.js + CoffeeScript = ❤
class MyModule.MyClass ### My class ### hoge: -> console.log(“hoge”)
x = [fun(y) for y in lst if y ==
“hoge”]
define [“jquery”, “underscore”], ($, _) -> ### My module ###
MyModule = {} class MyModule.MyClass ### My class ### return MyModule
require [“cs!mymodule”], (MyModule) -> ### New Module ### NewModule =
{} class NewModule.SubClass extends MyModule.MyClass ### New sub-class ### return NewModule
<script> require([“cs!newmodule”], function(NewModule) { var instance = new NewModule.NewClass(); //
... }); </script>
define [“cs!newmodule”]
({ appDir: "../static/js", baseUrl: ".", dir: "../tmp/static/js", stubModules: ['cs'], modules:
[ { name: "app.js", exclude: ["coffee-script"] } ] })
node r.js -o build_profile.json
<script src=”require.js”></script> <script src=”app.js”></script> <script> require([“cs!newmodule”], function(NewModule) { var instance
= new NewModule.NewClass(); // ... }); </script>
お幸せに