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.2k
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.4k
The Enemy Within: Running untrusted code with gVisor
ianlewis
4
1.3k
KubeCon EU Runtime Track Recap
ianlewis
3
1.7k
コンテナによるNoOpsオートメーション
ianlewis
2
190
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
970
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.4k
Other Decks in Technology
See All in Technology
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
940
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
370
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
770
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.5k
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
150
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
240
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
66
Technical Leadership for Architectural Decision Making
baasie
1
240
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
4 Signs Your Business is Dying
shpigford
187
22k
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>
お幸せに