14 lines
1001 B
Markdown
14 lines
1001 B
Markdown
# Module System
|
|
|
|
ES6 Modules just dont work *well* with `RiotJS <=3`. You cannot import them in your web componets script tag, you could include them at the top of the page, but that requries a build-*watch*-proccess that goes against my goal -- **zero-build** develop process!
|
|
|
|
**Mixins** is Riots answer to shared / resultable componet logic, but I needed another level to easily compose larger bits of logic before they were injected into `riot.mixin`, that is where `require1k` comes in. It is a **zero-build** CommonJS/NodeJS version of `require` that lended to my love of NodeJS server-sed development, but on the client.
|
|
|
|
**Require1k** While nearly perfect, there is a couple grips I do have:
|
|
|
|
- `.js` implied. I like to be specific and include `.js` when requiring files
|
|
- defaults to `node_module` lookup. I just want to require a path to my file
|
|
|
|
So, in the future I will probally look at forking `require1k`, but for now, for 1k dependency this is pretty awesome!
|
|
|