ref: 919238c356c24142457b236307dbcdb4a1b59ab3
parent: 8c27b1260d418feff94b033db3f721c8d7ee4e01
author: Tor Andersson <[email protected]>
date: Tue Sep 19 09:39:54 EDT 2017
Update docs.
--- a/docs/examples.html
+++ b/docs/examples.html
@@ -12,12 +12,13 @@
</header>
<nav>
-<a href="index.html">ABOUT</a>
-<a href="reference.html">REFERENCE</a>
-<a href="examples.html">EXAMPLES</a>
-<a href="http://dev.mujs.com/downloads/">DOWNLOAD</a>
-<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
-<a href="https://bugs.ghostscript.com/">BUGS</a>
+<a href="introduction.html">Introduction</a>
+<a href="reference.html">Reference</a>
+<a href="examples.html">Examples</a>
+<a href="license.html">License</a>
+<a href="http://dev.mujs.com/downloads/">Downloads</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">Source</a>
+<a href="https://bugs.ghostscript.com/">Bugs</a>
</nav>
<article>
--- a/docs/index.html
+++ b/docs/index.html
@@ -2,31 +2,38 @@
<html>
<head>
<link href="style.css" rel="stylesheet">
-<title>About MuJS</title>
+<title>MuJS</title>
</head>
<body>
<header>
-<h1>About MuJS</h1>
+<h1>MuJS</h1>
</header>
<nav>
-<a href="index.html">ABOUT</a>
-<a href="reference.html">REFERENCE</a>
-<a href="examples.html">EXAMPLES</a>
-<a href="http://dev.mujs.com/downloads/">DOWNLOAD</a>
-<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
-<a href="https://bugs.ghostscript.com/">BUGS</a>
+<a href="introduction.html">Introduction</a>
+<a href="reference.html">Reference</a>
+<a href="examples.html">Examples</a>
+<a href="license.html">License</a>
+<a href="http://dev.mujs.com/downloads/">Downloads</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">Source</a>
+<a href="https://bugs.ghostscript.com/">Bugs</a>
</nav>
<article>
-<h2>What is MuJS?</h2>
+<p>
+MuJS is a lightweight Javascript interpreter designed for embedding in other
+software to extend them with scripting capabilities.
<p>
-MuJS is a lightweight implementation of the Javascript language in a library.
-Its primary purpose is to add scripting capability to other programs, but can also be used as an extensible scripting language.
+MuJS was designed with a focus on small size, correctness, and simplicity.
+It is written in portable C and implements ECMAScript as specified by ECMA-262.
+The interface for binding with native code is designed to be as simple as
+possible to use, and is very similar to Lua. There is no need to interact with
+byzantine C++ template mechanisms, or worry about marking and unmarking garbage
+collection roots, or wrestle with obscure build systems.
<p>
MuJS is developed and maintained by Artifex Software.
@@ -36,65 +43,6 @@
The primary meeting place for the MuJS community is the
<a href="http://webchat.freenode.net/?channels=mupdf">#mupdf</a>
IRC channel on freenode.
-
-<h2>Why choose MuJS?</h2>
-
-<h3>Javascript</h3>
-
-<p>
-Javascript is one of the most popular programming languages in the world.
-It is a powerful extension language, used everywhere on the web — both as
-a way to add interactivity to web pages in the browser, and on the server side
-with platforms like node.js.
-
-<p>
-With MuJS you can bring this power to your application as well!
-
-<h3>Standards compliant</h3>
-
-<p>
-MuJS implements ES5.
-There are no non-standard extensions, so you can remain confident that
-Javascript code that runs on MuJS will also run on any other standards
-compliant Javascript implementation.
-
-<h3>Portable</h3>
-
-<p>
-MuJS is written in portable C and can be built by compiling a single C file using any standard C compiler.
-There is no need for configuration or fancy build systems.
-MuJS runs on all flavors of Unix and Windows, on mobile devices (such as Android and iOS),
-embedded microprocessors (such as the Beagle board and Raspberry Pi), etc.
-
-<h3>Embeddable</h3>
-
-<p>
-MuJS is a simple language engine with a small footprint that you can easily embed into your application.
-The API is simple and well documented and allows strong integration with code written in other languages.
-You don't need to work with byzantine C++ templating mechanisms, or manually manage garbage collection roots.
-It is easy to extend MuJS with libraries written in other languages.
-It is also easy to extend programs written in other languages with MuJS.
-
-<h3>Small</h3>
-
-<p>
-Adding MuJS to an application does not bloat it.
-The source contains around 15'000 lines of C.
-Under 64-bit Linux, the compiled library takes 180kB if optimized for size,
-and 260kB if optimized for speed.
-
-Compare this with V8, SpiderMonkey or JavaScriptCore,
-which are all several hundred thousand lines of code,
-take several megabytes of space,
-and require the C++ runtime.
-
-<h3>Reasonably fast and secure</h3>
-
-<p>
-It is a bytecode interpreter with a very fast mechanism to call-out to C.
-The default build is sandboxed with very restricted access to resources.
-
-<h3>Free software</h3>
<p>
MuJS is free open source software distributed under the
--- /dev/null
+++ b/docs/introduction.html
@@ -1,0 +1,109 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="style.css" rel="stylesheet">
+<title>MuJS Introduction</title>
+</head>
+
+<body>
+
+<header>
+<h1>MuJS Introduction</h1>
+</header>
+
+<nav>
+<a href="introduction.html">Introduction</a>
+<a href="reference.html">Reference</a>
+<a href="examples.html">Examples</a>
+<a href="license.html">License</a>
+<a href="http://dev.mujs.com/downloads/">Downloads</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">Source</a>
+<a href="https://bugs.ghostscript.com/">Bugs</a>
+</nav>
+
+<article>
+
+<h2>Why choose MuJS?</h2>
+
+<h3>Javascript is a proven scripting language</h3>
+
+<p>
+Javascript is one of the most popular programming languages in the world.
+It is a powerful extension language, used everywhere on the web — both as
+a way to add interactivity to web pages in the browser, and on the server side
+with platforms like node.js.
+
+<p>
+With MuJS you can bring this power to your application as well!
+
+<h3>MuJS is standards compliant</h3>
+
+<p>
+MuJS implements ES5.
+There are no non-standard extensions, so you can remain confident that
+Javascript code that runs on MuJS will also run on any other standards
+compliant Javascript implementation.
+
+<h3>MuJS is portable</h3>
+
+<p>
+MuJS is written in portable C and can be built by compiling a single C file using any standard C compiler.
+There is no need for configuration or fancy build systems.
+MuJS runs on all flavors of Unix and Windows, on mobile devices (such as Android and iOS),
+embedded microprocessors (such as the Beagle board and Raspberry Pi), etc.
+
+<h3>MuJS is embeddable</h3>
+
+<p>
+MuJS is a simple language engine with a small footprint that you can easily embed into your application.
+The API is simple and well documented and allows strong integration with code written in other languages.
+You don't need to work with byzantine C++ templating mechanisms, or manually manage garbage collection roots.
+It is easy to extend MuJS with libraries written in other languages.
+It is also easy to extend programs written in other languages with MuJS.
+
+<h3>MuJS is small</h3>
+
+<p>
+Adding MuJS to an application does not bloat it.
+The source contains around 15'000 lines of C.
+Under 64-bit Linux, the compiled library takes 180kB if optimized for size,
+and 260kB if optimized for speed.
+
+Compare this with V8, SpiderMonkey or JavaScriptCore,
+which are all several hundred thousand lines of code,
+take several megabytes of space,
+and require the C++ runtime.
+
+<h3>MuJS is reasonably fast and secure</h3>
+
+<p>
+It is a bytecode interpreter with a very fast mechanism to call-out to C.
+The default build is sandboxed with very restricted access to resources.
+Due to the nature of bytecode, MuJS is not as fast as JIT compiling
+implementations but starts up faster and uses fewer resources.
+If you implement heavy lifting in C code, controlled by Javascript,
+you can get the best of both worlds.
+
+<h3>MuJS is free software</h3>
+
+<p>
+MuJS is free open source software distributed under the
+<a href="https://opensource.org/licenses/ISC">ISC license</a>.
+
+<h3>MuJS is developed by a stable company</h3>
+
+<p>
+<a href="http://artifex.com/">Artifex Software</a> has long experience in
+interpreters and page description languages, and has a history with open source
+that goes back to 1993 when it was created to facilitate licensing Ghostscript
+to OEMs.
+
+</article>
+
+<footer>
+<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
+Copyright © 2013-2017 Artifex Software Inc.
+</footer>
+
+</body>
+</html>
--- /dev/null
+++ b/docs/license.html
@@ -1,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="style.css" rel="stylesheet">
+<title>MuJS License</title>
+</head>
+
+<body>
+
+<header>
+<h1>MuJS License</h1>
+</header>
+
+<nav>
+<a href="introduction.html">Introduction</a>
+<a href="reference.html">Reference</a>
+<a href="examples.html">Examples</a>
+<a href="license.html">License</a>
+<a href="http://dev.mujs.com/downloads/">Downloads</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">Source</a>
+<a href="https://bugs.ghostscript.com/">Bugs</a>
+</nav>
+
+<article>
+
+<p>
+MuJS is Copyright © 2013-2017 Artifex Software, Inc.
+
+<p>
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+<p>
+The software is provided "as is" and the author disclaims all warranties with
+regard to this software including all implied warranties of merchantability and
+fitness. In no event shall the author be liable for any special, direct,
+indirect, or consequential damages or any damages whatsoever resulting from
+loss of use, data or profits, whether in an action of contract, negligence or
+other tortious action, arising out of or in connection with the use or
+performance of this software.
+
+</article>
+
+<footer>
+<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
+Copyright © 2013-2017 Artifex Software Inc.
+</footer>
+
+</body>
+</html>
--- a/docs/reference.html
+++ b/docs/reference.html
@@ -2,22 +2,23 @@
<html>
<head>
<link href="style.css" rel="stylesheet">
-<title>MuJS Reference Manual</title>
+<title>MuJS Reference</title>
</head>
<body>
<header>
-<h1>MuJS Reference Manual</h1>
+<h1>MuJS Reference</h1>
</header>
<nav>
-<a href="index.html">ABOUT</a>
-<a href="reference.html">REFERENCE</a>
-<a href="examples.html">EXAMPLES</a>
-<a href="http://dev.mujs.com/downloads/">DOWNLOAD</a>
-<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
-<a href="https://bugs.ghostscript.com/">BUGS</a>
+<a href="introduction.html">Introduction</a>
+<a href="reference.html">Reference</a>
+<a href="examples.html">Examples</a>
+<a href="license.html">License</a>
+<a href="http://dev.mujs.com/downloads/">Downloads</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">Source</a>
+<a href="https://bugs.ghostscript.com/">Bugs</a>
</nav>
<article>
--- a/docs/style.css
+++ b/docs/style.css
@@ -25,6 +25,7 @@
nav {
padding: 1rem 2rem;
background-color: #ddd;
+ no-text-transform: uppercase;
}
nav a { color: #303030; padding-right: 2rem; }
article {