Updated for imba 1.0.0
This commit is contained in:
parent
2e8e5c183a
commit
6b567a6160
19
README.md
19
README.md
|
@ -4,26 +4,11 @@ Tiny template for testing out Imba in the browser.
|
|||
|
||||
## Getting started
|
||||
|
||||
### Install imba & webpack
|
||||
```bash
|
||||
npm install -g imba
|
||||
npm install -g webpack
|
||||
```
|
||||
|
||||
### Clone repository
|
||||
```bash
|
||||
git clone https://github.com/somebee/hello-world-imba.git
|
||||
```
|
||||
|
||||
### Enter repository
|
||||
```bash
|
||||
cd hello-world-imba
|
||||
npm install
|
||||
npm run watch
|
||||
```
|
||||
|
||||
### Continously build project
|
||||
```bash
|
||||
imbapack -w
|
||||
```
|
||||
|
||||
## Run
|
||||
Open `index.html` in your browser (you should not need a webserver).
|
16
index.imba
16
index.imba
|
@ -1,8 +1,12 @@
|
|||
# require the imba stdlib
|
||||
require 'imba'
|
||||
|
||||
# log to the console
|
||||
console.log "hello world!"
|
||||
tag HelloWorld
|
||||
|
||||
# mount a single h1 tag in document body
|
||||
Imba.mount <h1> "Hello world!"
|
||||
def render
|
||||
<self>
|
||||
<header>
|
||||
<h1> "Hello World"
|
||||
<section>
|
||||
<footer>
|
||||
|
||||
# mount an instance of HelloWorld in root
|
||||
Imba.mount <HelloWorld>
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "hello-world-imba",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"imba": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/imba/-/imba-1.0.0.tgz",
|
||||
"integrity": "sha512-qR8/5cfhMyLDpIKZce8kPdyYLTeFkEPPeAmFQtXxrfii87sOqpx7P5oGiTewKdnZ7s5oeU9aHTEFBV5ctsoIIA=="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,19 @@
|
|||
{
|
||||
"name": "hello-world-imba",
|
||||
"description": "Hello World for Imba",
|
||||
"keywords": ["imba"],
|
||||
"keywords": [
|
||||
"imba"
|
||||
],
|
||||
"author": "Sindre Aarsaether",
|
||||
"bugs": "https://github.com/somebee/hello-world-imba/issues",
|
||||
"version": "1.0.0",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "imbapack",
|
||||
"watch": "imbapack -w"
|
||||
},
|
||||
"files": [],
|
||||
"directories": {},
|
||||
"homepage": "http://imba.io",
|
||||
|
@ -15,6 +21,7 @@
|
|||
"type": "git",
|
||||
"url": "git://github.com/somebee/hello-world-imba.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"imba": "^1.0.0"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue