Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to make riot.route optional? #1485
We've decided to make
It could be like this:
Another option is loading separately:
<script src="https://cdn.jsdelivr.net/riot/2.4/riot+compiler.min.js"></script> <script src="https://cdn.jsdelivr.net/riot/2.4/route.min.js"></script>
But it feels bit inconsistent.
Should we separate
<script src="https://cdn.jsdelivr.net/riot/2.4/riot.min.js"></script> <script src="https://cdn.jsdelivr.net/riot/2.4/compiler.min.js"></script> <script src="https://cdn.jsdelivr.net/riot/2.4/route.min.js"></script>
Any thoughts? Thanks!
@cognitom , please B. I just was thinking about the parsers.
I think we must remove all the parsers and release riot with a subfolder with these and other optional "core" components, like the router, the compiler, maybe an alternate styleManager, and so on (custom
Example: Include a pre-made default version of riot for browsers only --i.e. unminified, no compiler/commonjs/router.
just an idea.
Agree with @TehShrike as B' seems more appealing. This helps in separating scopes and making Riot more flexible and modular.
And everyone uses task-runners and/or module-loaders nowadays anyways, all those independent files could easily be concatenated or loaded on demand in production. No big deal on performance topic.