Use imbapack and simplify
This commit is contained in:
parent
d93ab1e484
commit
2e8e5c183a
|
@ -25,3 +25,5 @@ build/Release
|
||||||
# Dependency directory
|
# Dependency directory
|
||||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||||
node_modules
|
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
|
## Getting started
|
||||||
|
|
||||||
### Install Imba
|
### Install imba & webpack
|
||||||
```bash
|
```bash
|
||||||
npm install -g imba
|
npm install -g imba
|
||||||
|
npm install -g webpack
|
||||||
```
|
```
|
||||||
|
|
||||||
### Clone repository
|
### Clone repository
|
||||||
|
@ -19,14 +20,9 @@ git clone https://github.com/somebee/hello-world-imba.git
|
||||||
cd hello-world-imba
|
cd hello-world-imba
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install dependencies
|
### Continously build project
|
||||||
```bash
|
```bash
|
||||||
npm install
|
imbapack -w
|
||||||
```
|
|
||||||
|
|
||||||
### Watch to recompile
|
|
||||||
```bash
|
|
||||||
npm run watch
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run
|
## 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>
|
<head>
|
||||||
<title>Hello World</title>
|
<title>Hello World</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<!-- include the imba library -->
|
|
||||||
<script src="imba.dev.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- your script -->
|
<!-- include your compiled bundle -->
|
||||||
<script src="lib/app.js"></script>
|
<script src="bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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",
|
"name": "hello-world-imba",
|
||||||
"description": "Hello World for Imba",
|
"description": "Hello World for Imba",
|
||||||
"keywords": [
|
"keywords": ["imba"],
|
||||||
"imba",
|
|
||||||
"website"
|
|
||||||
],
|
|
||||||
"author": "Sindre Aarsaether",
|
"author": "Sindre Aarsaether",
|
||||||
"bugs": "https://github.com/somebee/hello-world-imba/issues",
|
"bugs": "https://github.com/somebee/hello-world-imba/issues",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"build": "imba compile src/",
|
|
||||||
"watch": "imba watch src/"
|
|
||||||
},
|
|
||||||
"files": [],
|
"files": [],
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"homepage": "http://imba.io",
|
"homepage": "http://imba.io",
|
||||||
|
@ -23,6 +16,6 @@
|
||||||
"url": "git://github.com/somebee/hello-world-imba.git"
|
"url": "git://github.com/somebee/hello-world-imba.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"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