https://github.com/ishafayet/legacy-copolymer
A declarative language that transpiles to HTML5 and CoffeeScript. Purpose made to work with Google's Polymer 0.x.
https://github.com/ishafayet/legacy-copolymer
coffee-script declarative-language html5 polymer polymer-element
Last synced: about 1 year ago
JSON representation
A declarative language that transpiles to HTML5 and CoffeeScript. Purpose made to work with Google's Polymer 0.x.
- Host: GitHub
- URL: https://github.com/ishafayet/legacy-copolymer
- Owner: iShafayet
- License: mit
- Created: 2015-01-14T17:11:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-01-01T19:02:39.000Z (over 5 years ago)
- Last Synced: 2025-02-16T10:19:11.371Z (over 1 year ago)
- Topics: coffee-script, declarative-language, html5, polymer, polymer-element
- Language: CoffeeScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Copolymer
A declarative language that transpiles to HTML5 and CoffeeScript. Purpose made to work with [Google's Polymer 0.x](https://www.polymer-project.org/). However, the Polymer project has shifted direction a lot from the original and so, this project is no longer active.
## Quick example
```coffee
import "../polymer/polymer.html"
import "../polymer/paper-checkbox"
import "../polymer/paper-button"
import "../polymer/paper-input"
define todo-app todoList="[]"
h1 | Todo App
div$todoList vertical layout
for todo, index in todoList
div.todoEntry horizontal layout
paper-checkbox checked="{{todo.isDone}}"
div | {{todo.text}}
paper-button %index="{{index}}" *click="deleteClicked" label="Delete"
div horizontal layout
paper-input label="Type new entry here" value="{{newEntryText}}"
paper-button *click="addClicked" label="Add"
script type="text/coffeescript" `
Copolymer todo-app, {
deleteClicked: (e)->
@todoList.splice (parseInt (e.target.getAttribute 'data-index'), 10), 1
addClicked: (e)->
@todoList.push {isDone: false, text: @newEntryText}
}
`
```
## Notes
It was written on the now almost-retired language [CoffeeScript](https://coffeescript.org/). You will need the CoffeeScript compiler to run the code.