@mojojs/core 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -20,26 +20,21 @@ If you want to stay up to date on the
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
+
* 3x faster than Express.js.
|
|
23
24
|
* A **real-time web framework**, allowing you to easily grow single file prototypes into well-structured MVC web
|
|
24
25
|
applications.
|
|
25
|
-
* 3x faster than Express.js.
|
|
26
26
|
* Powerful out of the box with RESTful routes, WebSockets, plugins, commands, logging, templates, content negotiation,
|
|
27
27
|
session management, form and JSON validation, testing framework, static file server, cluster mode, CGI detection,
|
|
28
28
|
first class Unicode support and much more for you to discover.
|
|
29
|
-
|
|
30
29
|
* A powerful **web development toolkit**, that you can use for all kinds of applications, independently of the web
|
|
31
30
|
framework.
|
|
32
31
|
* High performance HTTP and WebSocket client/server implementation with support for HTTPS/WSS, cookies, redirects,
|
|
33
32
|
urlencoded/multi-part forms, file uploads, JSON/YAML, HTML/XML, mocking, API testing, HTTP/SOCKS proxies, UNIX
|
|
34
33
|
domain sockets and gzip compression.
|
|
35
34
|
* HTML/XML parser with CSS selector support.
|
|
36
|
-
|
|
37
35
|
* No frontend framework, mojo.js is for the **backend**.
|
|
38
|
-
|
|
39
36
|
* Written in [TypeScript](https://www.typescriptlang.org), with very clean `class` and `async`/`await` based APIs.
|
|
40
|
-
|
|
41
37
|
* Very few dependencies, to avoid supply chain attacks and allow for "Perl-grade" **long term support**.
|
|
42
|
-
|
|
43
38
|
* Fresh code based upon decades of experience developing [Mojolicious](https://mojolicious.org) and
|
|
44
39
|
[Catalyst](http://catalyst.perl.org), free and open source.
|
|
45
40
|
|
|
@@ -139,7 +139,7 @@ const tmplView = `%% view.layout = 'default';
|
|
|
139
139
|
<p>
|
|
140
140
|
This page was generated from the template "views/example/welcome.html.tmpl" and the layout
|
|
141
141
|
"views/layouts/default.html.tmpl", <a href="<%%= ctx.urlFor() %>">click here</a> to reload the page or
|
|
142
|
-
<a href="<%%= ctx.urlForFile('
|
|
142
|
+
<a href="<%%= ctx.urlForFile('index.html') %>">here</a> to move forward to a static page.
|
|
143
143
|
</p>
|
|
144
144
|
`;
|
|
145
145
|
const staticFile = `<!DOCTYPE html>
|
package/package.json
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<title>Debug</title>
|
|
6
6
|
%= ctx.faviconTag()
|
|
7
|
-
%= ctx.scriptTag('
|
|
8
|
-
%= ctx.scriptTag('
|
|
9
|
-
%= ctx.styleTag('
|
|
10
|
-
%= ctx.styleTag('
|
|
7
|
+
%= ctx.scriptTag('mojo/bootstrap/bootstrap.bundle.min.js')
|
|
8
|
+
%= ctx.scriptTag('mojo/highlight.js/highlight.pack.js')
|
|
9
|
+
%= ctx.styleTag('mojo/bootstrap/bootstrap.min.css')
|
|
10
|
+
%= ctx.styleTag('mojo/highlight.js/highlight-mojo-dark.css')
|
|
11
11
|
%= ctx.styleTag('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css')
|
|
12
|
-
%= ctx.styleTag('
|
|
12
|
+
%= ctx.styleTag('mojo/mojo.css')
|
|
13
13
|
<script>
|
|
14
14
|
hljs.initHighlightingOnLoad();
|
|
15
15
|
window.onload = function() {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
<div class="container-fluid">
|
|
27
27
|
<a href="https://mojojs.org" id="mojobar-brand" class="navbar-brand">
|
|
28
28
|
<picture>
|
|
29
|
-
<img src="<%= ctx.urlForFile('
|
|
30
|
-
srcset="<%= ctx.urlForFile('
|
|
29
|
+
<img src="<%= ctx.urlForFile('mojo/logo-white.png') %>"
|
|
30
|
+
srcset="<%= ctx.urlForFile('mojo/logo-white-2x.png') %> 2x">
|
|
31
31
|
</picture>
|
|
32
32
|
</a>
|
|
33
33
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
top: 60%;
|
|
18
18
|
}
|
|
19
19
|
#not-found {
|
|
20
|
-
background: url(<%= ctx.urlForFile('
|
|
20
|
+
background: url(<%= ctx.urlForFile('mojo/not-found.png') %>);
|
|
21
21
|
height: 62px;
|
|
22
22
|
left: 50%;
|
|
23
23
|
margin-left: -153px;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</head>
|
|
31
31
|
<body>
|
|
32
32
|
<a href="<%= ctx.req.baseURL %>">
|
|
33
|
-
<img src="<%= ctx.urlForFile('
|
|
33
|
+
<img src="<%= ctx.urlForFile('mojo/no-raptor.png') %>" alt="Bye!" id="no-raptor">
|
|
34
34
|
</a>
|
|
35
35
|
<div id="not-found"></div>
|
|
36
36
|
</body>
|