Use imbapack and simplify
This commit is contained in:
parent
d93ab1e484
commit
2e8e5c183a
|
@ -25,3 +25,5 @@ build/Release
|
|||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
bundle.js
|
12
README.md
12
README.md
|
@ -4,9 +4,10 @@ Tiny template for testing out Imba in the browser.
|
|||
|
||||
## Getting started
|
||||
|
||||
### Install Imba
|
||||
### Install imba & webpack
|
||||
```bash
|
||||
npm install -g imba
|
||||
npm install -g webpack
|
||||
```
|
||||
|
||||
### Clone repository
|
||||
|
@ -19,14 +20,9 @@ git clone https://github.com/somebee/hello-world-imba.git
|
|||
cd hello-world-imba
|
||||
```
|
||||
|
||||
### Install dependencies
|
||||
### Continously build project
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
### Watch to recompile
|
||||
```bash
|
||||
npm run watch
|
||||
imbapack -w
|
||||
```
|
||||
|
||||
## Run
|
||||
|
|
4057
imba.dev.js
4057
imba.dev.js
File diff suppressed because one or more lines are too long
|
@ -3,11 +3,9 @@
|
|||
<head>
|
||||
<title>Hello World</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- include the imba library -->
|
||||
<script src="imba.dev.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- your script -->
|
||||
<script src="lib/app.js"></script>
|
||||
<!-- include your compiled bundle -->
|
||||
<script src="bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
# require the imba stdlib
|
||||
require 'imba'
|
||||
|
||||
# log to the console
|
||||
console.log "hello world!"
|
||||
|
||||
# mount a single h1 tag in document body
|
||||
Imba.mount <h1> "Hello world!"
|
|
@ -1,7 +0,0 @@
|
|||
(function(){
|
||||
|
||||
console.log("hello world");
|
||||
|
||||
return q$$('body').append(tag$.$h1().setText("Hello world").end());
|
||||
|
||||
})()
|
11
package.json
11
package.json
|
@ -1,20 +1,13 @@
|
|||
{
|
||||
"name": "hello-world-imba",
|
||||
"description": "Hello World for Imba",
|
||||
"keywords": [
|
||||
"imba",
|
||||
"website"
|
||||
],
|
||||
"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": "imba compile src/",
|
||||
"watch": "imba watch src/"
|
||||
},
|
||||
"files": [],
|
||||
"directories": {},
|
||||
"homepage": "http://imba.io",
|
||||
|
@ -23,6 +16,6 @@
|
|||
"url": "git://github.com/somebee/hello-world-imba.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"imba": "^0.14.3"
|
||||
"imba": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
console.log "hello world"
|
||||
|
||||
$$(body).append <h1> "Hello world"
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = [{
|
||||
entry: "./index.imba",
|
||||
output: { filename: "./bundle.js" }
|
||||
}]
|
Loading…
Reference in New Issue