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
5.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
require.js + CoffeeScriptでお幸せに
Ian Lewis
June 08, 2014
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.4k
The Enemy Within: Running untrusted code with gVisor
ianlewis
4
1.4k
KubeCon EU Runtime Track Recap
ianlewis
3
1.7k
コンテナによるNoOpsオートメーション
ianlewis
2
200
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
1k
Extending Kubernetes with Custom Resources and Operator Frameworks
ianlewis
10
3.9k
Kubernetesのセキュリティのベストプラクティス
ianlewis
12
17k
Scheduling and Resource Management in Kubernetes
ianlewis
2
1.5k
Other Decks in Technology
See All in Technology
第3回しろおびセキュリティスポンサーセッション
log0417
0
160
変化の早いClaude Codeを 書籍に落とし込む
oikon48
7
1.3k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.1k
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
220
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
630
ラジオの科学
frievea
0
280
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
Digitization部 紹介資料
sansan33
PRO
2
7.7k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
620
[しろおび夏祭り2026] チャットするAIから、作業するAIへ - 使われ方の変化と、その裏側で起きていること
kk0n
0
1.6k
PLATEAU で バーチャル花火大会
tatsuya1970
0
100
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
190
Leo the Paperboy
mayatellez
8
2.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
330
Prompt Engineering for Job Search
mfonobong
0
400
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
470
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
360
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
300
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>
お幸せに