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.2k
KubeCon EU Runtime Track Recap
ianlewis
3
1.6k
コンテナによるNoOpsオートメーション
ianlewis
2
160
Google Kubernetes Engine 概要 & アップデート @ GCPUG Kansai Summit Day 2018
ianlewis
2
940
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
OPENLOGI Company Profile for engineer
hr01
1
33k
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
220
Should Our Project Join the CNCF? (Japanese Recap)
whywaita
PRO
0
310
生成AI開発案件におけるClineの業務活用事例とTips
shinya337
0
210
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
26k
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
110
Lambda Web Adapterについて自分なりに理解してみた
smt7174
5
150
Flutter向けPDFビューア、pdfrxのpdfium WASM対応について
espresso3389
0
110
AI専用のリンターを作る #yumemi_patch
bengo4com
5
3.8k
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
250
ハッカソン by 生成AIハッカソンvol.05
1ftseabass
PRO
0
170
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
6
4.9k
Featured
See All Featured
A better future with KSS
kneath
239
17k
How STYLIGHT went responsive
nonsquared
100
5.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Writing Fast Ruby
sferik
628
62k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Done Done
chrislema
184
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
A Modern Web Designer's Workflow
chriscoyier
694
190k
Speed Design
sergeychernyshev
32
1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
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>
お幸せに