You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**koala** is a CLI that join separate files generating only one file as a bundler. Nowadays already exists others bundlers more complete like the [Webpack](https://github.com/webpack/webpack) but the idea of **koala** is to be most simple and generic.
5
+
6
+
### Get started
7
+
**koala** need that you input an entrypoint to itself work and the entrypoint is just a file that **koala** will be to read like a hub to call others files, follow the sample of one entry file named as `./entry.js`.
8
+
```js
9
+
'use strict';
10
+
11
+
include lib/hello.js
12
+
13
+
hello("Koala");
14
+
```
15
+
16
+
The entry file above is used to find out the targets that is just the line of entry file prefixed with a tag, see the example below where the tag is named as `include`.
17
+
```js
18
+
include lib/hello.js
19
+
```
20
+
Now look the external file at `./lib/hello` where the koala named it as library, follow the sample below.
21
+
22
+
```js
23
+
functionhello(name) {
24
+
console.log(`Hello, ${name}`);
25
+
}
26
+
```
27
+
Now look the output file at `./bin/out.js` and execute, this example execute the **koala** and [node.js](https://github.com/nodejs/node) together.
28
+
```js
29
+
'use strict';
30
+
31
+
functionhello(name) {
32
+
console.log(`Hello, ${name}`);
33
+
}
34
+
35
+
hello("Koala")
36
+
```
37
+
38
+
```sh
39
+
> koala ./entry.js ./bin/out.js include && node ./bin/out.js
40
+
41
+
2018/10/08 15:53:13 spelled successfully 104 bytes at /Users/user/remote/username/repo/bin/out.js
0 commit comments