https://github.com/v2e4lisp/rp
a tiny language compiles to html....
https://github.com/v2e4lisp/rp
Last synced: 11 months ago
JSON representation
a tiny language compiles to html....
- Host: GitHub
- URL: https://github.com/v2e4lisp/rp
- Owner: v2e4lisp
- License: mit
- Created: 2013-07-26T16:53:19.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-13T05:03:08.000Z (almost 13 years ago)
- Last Synced: 2025-06-06T13:05:46.694Z (about 1 year ago)
- Language: Ruby
- Size: 199 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rp
TODO: Write a gem description
## Installation
Add this line to your application's Gemfile:
gem 'rp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rp
## Usage
```haml
html!
head
script type: "text/javascript", src: "http://slkdfksja.js"
body
div#content data_para: "hello world"
p.first "first p"
p.second-p#special-p
"special p"
- a = "username"
p
- b = "---------------x--------------"
= b
- a.split("").each do |x|
font x
- end
p
"helloworld"
div.comments.hahaha
p.a-comment#no-comment "no comments yet!"
```
**FIRST, converted to ruby code**
```ruby
html! do
head do
script type: "text/javascript", src: "http://slkdfksja.js"
end
body do
@id = 'content'
div data_para: "hello world" do
@cls = 'first'
p "first p"
@cls = 'second-p'
@id = 'special-p'
p do
"special p"
end
a = "username"
p do
b = "---------------x--------------"
self.== b
a.split("").each do |x|
font x
end
end
p do
"helloworld"
end
@cls = 'comments hahaha'
div do
@cls = 'a-comment'
@id = 'no-comment'
p "no comments yet!"
end
end
end
end
```
**OUTPUT html**
```html
first p
special p
---------------x--------------
u
s
e
r
n
a
m
e
helloworld
```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
no comments yet!