Skip to content

peterwmwong/cell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cell encapsulates your UI components (HTML, JS, and CSS).

Getting Started

1. Create (and compile) your cell

# App.coffee
define (require)->
  App = require('cell/defineView!')
    render: (__)-> [
      __ '.greeting', 'Hello World'
    ]

  document.body.appendChild new App()
/* App.css */
.App > .greeting {
  color: #BADA55;
}

2. Add dependencies and load cell

<script src='cell/require.js'></script>
<script>
require.config({
  paths:{
    cell: 'cell/cell',
    dom: 'cell/dom'
  },
  deps: [
    'App'
  ]
});
</script>

3. Sit back and relax