Fix resolution logic & tree-shaking

pull/1/head
Starbeamrainbowlabs 4 years ago
parent 77c7ad2548
commit be37afb750
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 5
      .npmignore
  2. 2
      Client.mjs
  3. 2
      Client/Router.mjs
  4. 4
      README.md
  5. 2
      Server.mjs
  6. BIN
      logo-large.png
  7. BIN
      logo.png

@ -0,0 +1,5 @@
lantern-build-engine/
docs/
.tern-project
logo.piskel
logo-large.png

@ -0,0 +1,2 @@
import ClientRouter from './Client/Router.mjs';
export default ClientRouter;

@ -58,7 +58,7 @@ class ClientRouter extends EventEmitter {
add_page(routespec, callback) {
this.routes.push({
spec: routespec,
match: pathspec instanceof RegExp ? { regex: routespec, tokens: [] } : pathspec_to_regex(routespec),
match: routespec instanceof RegExp ? { regex: routespec, tokens: [] } : pathspec_to_regex(routespec),
callback
});
}

@ -36,7 +36,7 @@ Syntax | Meaning
Initialise a new router like this:
```js
import { ClientRouter } from 'powahroot';
import ClientRouter from 'powahroot/Client.mjs';
// ....
@ -51,7 +51,7 @@ const router = new ClientRouter({
The server router works slightly differently, to account for the different environment it's designed for. Here's how to use it:
```js
import { ServerRouter } from 'powahroot';
import ServerRouter from 'powahroot/Server.mjs';
// ....

@ -0,0 +1,2 @@
import ServerRouter from './Server/Router.mjs';
export default ServerRouter;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 234 B

Loading…
Cancel
Save