# Opal : Ruby to JavaScript 컴파일러

> Clean Markdown view of GeekNews topic #3770. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3770](https://news.hada.io/topic?id=3770)
- GeekNews Markdown: [https://news.hada.io/topic/3770.md](https://news.hada.io/topic/3770.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-02-20T11:22:21+09:00
- Updated: 2021-02-20T11:22:21+09:00
- Original source: [opalrb.com](https://opalrb.com/)
- Points: 3
- Comments: 1

## Topic Body

- Ruby 코드를 JavaScript로 컴파일해서 사용하게 해주는 도구

ㅤ→ CLI 에서 opal --compile app.rb > app.js

ㅤ→ 코드내에서 Opal.compile("루비코드")

ㅤ→ HTML에서 script type="text/ruby" 로 직접 루비코드 사용

- Rails, jQuery, Sprockets, Haml, RSpec 등 지원

## Comments



### Comment 4505

- Author: galadbran
- Created: 2021-02-20T15:01:50+09:00
- Points: 1

정말 JavaScript 는 새로운 시대의 어셈블리군요...
