# rikkei-module-compiler

> ES6 syntax compiler for VanilarJS

Latest version **0.1.10** (published 2018-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install rikkei-module-compiler
pnpm add rikkei-module-compiler
yarn add rikkei-module-compiler
bun add rikkei-module-compiler
```

Provides the command `rkcompile`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2018-01-23 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dangvh |
| Maintainers | dangvh |
| Keywords | rikkei, es6, module |

## Links

- npm: https://www.npmjs.com/package/rikkei-module-compiler
- Repository: https://github.com/haidangdevhaui/rikkei-module-compiler
- Homepage: https://github.com/haidangdevhaui/rikkei-module-compiler#readme
- Issues: https://github.com/haidangdevhaui/rikkei-module-compiler/issues
- npm.io page: https://npm.io/package/rikkei-module-compiler

## Dependencies (14)

- [webpack](https://npm.io/package/webpack.md) ^3.10.0
- [node-sass](https://npm.io/package/node-sass.md) ^4.7.2
- [babel-core](https://npm.io/package/babel-core.md) ^6.26.0
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.8
- [img-loader](https://npm.io/package/img-loader.md) ^2.0.0
- [url-loader](https://npm.io/package/url-loader.md) ^0.6.2
- [file-loader](https://npm.io/package/file-loader.md) ^1.1.6
- [sass-loader](https://npm.io/package/sass-loader.md) ^6.0.6
- [babel-loader](https://npm.io/package/babel-loader.md) ^7.1.2
- [style-loader](https://npm.io/package/style-loader.md) ^0.19.1
- [node-notifier](https://npm.io/package/node-notifier.md) ^5.1.2
- [resolve-url-loader](https://npm.io/package/resolve-url-loader.md) ^2.2.1
- [babel-minify-webpack-plugin](https://npm.io/package/babel-minify-webpack-plugin.md) ^0.2.0
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^3.0.2

## Recent versions

- 0.1.10 (latest) — 2018-01-23
- 0.1.9 — 2018-01-23
- 0.1.8 — 2018-01-22
- 0.1.7 — 2018-01-17
- 0.1.6 — 2018-01-17
- 0.1.5 — 2018-01-17
- 0.1.4 — 2018-01-16
- 0.1.3 — 2018-01-12
- 0.1.2 — 2018-01-12
- 0.1.1 — 2018-01-12
- 0.1.0 — 2018-01-12

## README

# Rikkei Module Compiler
=========

ES6 syntax compiler for VanilarJS.<br/>
This is a package, not a framework.<br/>
Supported:
- ES6 syntax.
- Babel syntax.
- Async / Await.
- Sass.

## Installation

  `npm install --save rikkei-module-compiler`

## Configuration

   The default config file is `module.config.json`.<br/>
   Full config:
<pre><code>
{
  // root path of compiled files, default is "public"
    "path": "public"<br/>
    // path to
    "publicPath": "/",<br/>
  // array|string file for compiled
    "entry": [
        "resources/assets/js/app.js",
        "resources/assets/sass/app.scss",
    ],<br/>
    // output file, direct without path
    "output": {
        "script": "js/bundle.js",
        "style": "css/styles.css"
    },<br/>
    // notifier enable|disable, default is true
    "notify": true
}
</code></pre>

## Usage
1.Create `resources/assets/js/user/index.js`
<pre><code>
import { Module } from 'rikkei-module-compiler'<br/>
export default class extends Module {
    constructor() {
        super() //required for boot() method
    }<br/>
    /**
     * boot module (required)
     * @return {void}
     */
    boot() {}
}
</code></pre>

2.Create `resources/assets/js/routes.js`
<pre><code>
import UserIndex from './user/index'
import UserDetail from './user/detail'<br/>
export default {
    '/user': UserIndex,
    '/user/:id': UserDetail
}
</code></pre>

3.Create `resources/assets/js/app.js`<br/>
<pre><code>
import Boot from 'rikkei-module-compiler'
import Routes from './routes'<br/>
Boot(Routes)
</code></pre>

4.Run command `node_modules/.bin/rkcompile watch`<br/>
## Api
- `request`: Global variable when module be called.
- `request.params`: Return all params.
- `request.getParam(paramName)`: Return value of paramName.
## Options
- `-f|--config_file`:  Running with other config file.
- `-m|--minifier`: Minimize compiled files.
## Contributing

---
_Source: https://npm.io/package/rikkei-module-compiler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
