Fixed Jekyll support for uncompiled PCjs apps
This commit is contained in:
parent
41e198f378
commit
7271046b1b
10 changed files with 119 additions and 89 deletions
92
Gruntfile.js
92
Gruntfile.js
|
|
@ -30,14 +30,14 @@
|
|||
|
||||
/*
|
||||
* Overview
|
||||
* ---
|
||||
* --------
|
||||
* Based on the specified version in package.json, we build a matching version folder in /versions
|
||||
* for each of the machine simulations; each of those folders in turn receives compiled versions of
|
||||
* the corresponding machine simulation scripts (c1p*.js and pc*.js), along with copies of both the
|
||||
* shared and machine-specific CSS and XSL stylesheets that the scripts rely on.
|
||||
*
|
||||
* Usage
|
||||
* ---
|
||||
* -----
|
||||
* grunt [task[:target] ...] [--rebuild]
|
||||
*
|
||||
* If no tasks are specified, the "default" task alias will be run. If --rebuild is present,
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
* it's also possible I didn't have it configured properly at the time.
|
||||
*
|
||||
* Utility Tasks
|
||||
* ---
|
||||
* -------------
|
||||
* grunt compile: runs "closureCompiler" to produce compiled c1p*.js and pc*.js scripts
|
||||
* grunt nocompile: runs "concat" to produce uncompiled c1p*.js and pc*.js scripts
|
||||
* grunt promote: runs "replace" to promote all machine XML files to the current version
|
||||
|
|
@ -62,13 +62,13 @@
|
|||
* a final "grunt compile" (or "grunt --rebuild") and retest before pushing out a new release.
|
||||
*
|
||||
* The "manifester" Task
|
||||
* ---
|
||||
* ---------------------
|
||||
* I added the "manifester" task to process manifest.xml files, which I use to record the existence
|
||||
* application archives. "manifester" walks all the manifests and verifies that they're still valid,
|
||||
* and optionally fetches local copies of everything described.
|
||||
*
|
||||
* The "prepjs" Task
|
||||
* ---
|
||||
* -----------------
|
||||
* I added the "prepjs" task to perform the same constant inlining that my old PHP script "inline.php"
|
||||
* used to do as part of the old "jsmachines.net" build process. Unfortunately, Grunt appears to be
|
||||
* a real memory hog, and so "prepjs" had to be disabled until I could resolve that issue (see my notes
|
||||
|
|
@ -120,11 +120,11 @@ module.exports = function(grunt) {
|
|||
*/
|
||||
var pkg = grunt.file.readJSON("package.json");
|
||||
|
||||
var tmpC1Pjs = "./tmp/c1pjs/" + pkg.version + "/c1p.js";
|
||||
var tmpPCx86 = "./tmp/pcx86/" + pkg.version + "/pcx86.js";
|
||||
var tmpPC8080 = "./tmp/pc8080/" + pkg.version + "/pc8080.js";
|
||||
var tmpPDP10 = "./tmp/pdpjs/" + pkg.version + "/pdp10.js";
|
||||
var tmpPDP11 = "./tmp/pdpjs/" + pkg.version + "/pdp11.js";
|
||||
var tmpC1Pjs = "./versions/c1pjs/" + pkg.version + "/c1p-uncompiled.js";
|
||||
var tmpPCx86 = "./versions/pcx86/" + pkg.version + "/pcx86-uncompiled.js";
|
||||
var tmpPC8080 = "./versions/pc8080/" + pkg.version + "/pc8080-uncompiled.js";
|
||||
var tmpPDP10 = "./versions/pdpjs/" + pkg.version + "/pdp10-uncompiled.js";
|
||||
var tmpPDP11 = "./versions/pdpjs/" + pkg.version + "/pdp11-uncompiled.js";
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: pkg, // pass the "package.json" object to initConfig() as a property, too
|
||||
|
|
@ -380,11 +380,11 @@ module.exports = function(grunt) {
|
|||
* If/when that issue is fixed, this feature may be removed.
|
||||
*/
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p.map",
|
||||
create_source_map: "./versions/c1pjs/" + pkg.version + "/c1p.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/c1pjs/" + pkg.version + "/c1p.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.c1pJSFiles,
|
||||
src: tmpC1Pjs,
|
||||
|
|
@ -392,11 +392,11 @@ module.exports = function(grunt) {
|
|||
},
|
||||
"c1p-dbg.js": {
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p-dbg.map",
|
||||
create_source_map: "./versions/c1pjs/" + pkg.version + "/c1p-dbg.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p-dbg.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/c1pjs/" + pkg.version + "/c1p-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.c1pJSFiles,
|
||||
src: tmpC1Pjs,
|
||||
|
|
@ -404,11 +404,11 @@ module.exports = function(grunt) {
|
|||
},
|
||||
"pcx86.js": {
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86.map",
|
||||
create_source_map: "./versions/pcx86/" + pkg.version + "/pcx86.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pcx86/" + pkg.version + "/pcx86.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pcX86Files,
|
||||
src: tmpPCx86,
|
||||
|
|
@ -419,11 +419,11 @@ module.exports = function(grunt) {
|
|||
* Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit.
|
||||
*/
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86-dbg.map",
|
||||
create_source_map: "./versions/pcx86/" + pkg.version + "/pcx86-dbg.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86-dbg.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pcx86/" + pkg.version + "/pcx86-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pcX86Files,
|
||||
src: tmpPCx86,
|
||||
|
|
@ -431,11 +431,11 @@ module.exports = function(grunt) {
|
|||
},
|
||||
"pc8080.js": {
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080.map",
|
||||
create_source_map: "./versions/pc8080/" + pkg.version + "/pc8080.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pc8080/" + pkg.version + "/pc8080.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pc8080Files,
|
||||
src: tmpPC8080,
|
||||
|
|
@ -446,11 +446,11 @@ module.exports = function(grunt) {
|
|||
* Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit.
|
||||
*/
|
||||
TEMPcompilerOpts: {
|
||||
// create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080-dbg.map",
|
||||
create_source_map: "./versions/pc8080/" + pkg.version + "/pc8080-dbg.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"],
|
||||
// output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080-dbg.map\""
|
||||
output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pc8080/" + pkg.version + "/pc8080-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pc8080Files,
|
||||
src: tmpPC8080,
|
||||
|
|
@ -458,11 +458,11 @@ module.exports = function(grunt) {
|
|||
},
|
||||
"pdp10.js": {
|
||||
TEMPcompilerOpts: {
|
||||
create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp10.map",
|
||||
create_source_map: "./versions/pdpjs/" + pkg.version + "/pdp10.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"],
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp10.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pdpjs/" + pkg.version + "/pdp10.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pdp10Files,
|
||||
src: tmpPDP10,
|
||||
|
|
@ -473,11 +473,11 @@ module.exports = function(grunt) {
|
|||
* Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit.
|
||||
*/
|
||||
TEMPcompilerOpts: {
|
||||
create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp10-dbg.map",
|
||||
create_source_map: "./versions/pdpjs/" + pkg.version + "/pdp10-dbg.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"],
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp10-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pdpjs/" + pkg.version + "/pdp10-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pdp10Files,
|
||||
src: tmpPDP10,
|
||||
|
|
@ -485,11 +485,11 @@ module.exports = function(grunt) {
|
|||
},
|
||||
"pdp11.js": {
|
||||
TEMPcompilerOpts: {
|
||||
create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11.map",
|
||||
create_source_map: "./versions/pdpjs/" + pkg.version + "/pdp11.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"],
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pdpjs/" + pkg.version + "/pdp11.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pdp11Files,
|
||||
src: tmpPDP11,
|
||||
|
|
@ -500,11 +500,11 @@ module.exports = function(grunt) {
|
|||
* Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit.
|
||||
*/
|
||||
TEMPcompilerOpts: {
|
||||
create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map",
|
||||
create_source_map: "./versions/pdpjs/" + pkg.version + "/pdp11-dbg.map",
|
||||
define: ["\"APPVERSION='" + pkg.version + "'\"",
|
||||
"\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"],
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/versions/pdpjs/" + pkg.version + "/pdp11-dbg.map\""
|
||||
// output_wrapper: "\"(function(){%output%})();\""
|
||||
},
|
||||
// src: pkg.pdp11Files,
|
||||
src: tmpPDP11,
|
||||
|
|
@ -713,16 +713,16 @@ module.exports = function(grunt) {
|
|||
replace: {
|
||||
"fix-source-maps": {
|
||||
src: [
|
||||
"./tmp/c1pjs/" + pkg.version + "/c1p*.map",
|
||||
"./tmp/pcx86/" + pkg.version + "/pc*.map",
|
||||
"./tmp/pcx8008/" + pkg.version + "/pc*.map",
|
||||
"./tmp/pdpjs/" + pkg.version + "/pdp*.map"
|
||||
"./versions/c1pjs/" + pkg.version + "/c1p*.map",
|
||||
"./versions/pcx86/" + pkg.version + "/pc*.map",
|
||||
"./versions/pcx8008/" + pkg.version + "/pc*.map",
|
||||
"./versions/pdpjs/" + pkg.version + "/pdp*.map"
|
||||
],
|
||||
overwrite: true,
|
||||
replacements: [
|
||||
{
|
||||
from: /"sources":\s*\["\.\/tmp\//g,
|
||||
to: '"sources":["/tmp/'
|
||||
from: /"sources":\s*\["\.\/versions\//g,
|
||||
to: '"sources":["/versions/'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||
<meta http-equiv="content-language" content="en-US">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{% if page.title %}PCjs: {{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
<meta name="description" content="{{ site.description }}">
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% assign machine_autoStart = "" %}
|
||||
{% endif %}
|
||||
{% if machine.autotype != nil %}
|
||||
{% capture machine_autoType %},autoType:"{{ machine.autotype }}"{% endcapture %}
|
||||
{% capture machine_autoType %},autoType:"{{ machine.autotype | replace:"\r":"\\\\r" | replace:"\n":"\\\\n" | replace:"\t":"\\\\t" | replace:"\x":"\\\\x" }}"{% endcapture %}
|
||||
{% elsif machine.autoType != nil %}
|
||||
{% capture machine_autoType %},autoType:"{{ machine.autoType }}"{% endcapture %}
|
||||
{% capture machine_autoType %},autoType:"{{ machine.autoType | replace:"\r":"\\\\r" | replace:"\n":"\\\\n" | replace:"\t":"\\\\t" | replace:"\x":"\\\\x" }}"{% endcapture %}
|
||||
{% else %}
|
||||
{% assign machine_autoType = "" %}
|
||||
{% endif %}
|
||||
|
|
@ -122,37 +122,61 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if machine_type == "c1p" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %}
|
||||
{% if machine_type == "pcx86" %}{% assign array_scripts = site.pcjs.pcx86_scripts %}{% endif %}
|
||||
{% if machine_type == "pc8080" %}{% assign array_scripts = site.pcjs.pc8080_scripts %}{% endif %}
|
||||
{% if machine_type == "pdp10" %}{% assign array_scripts = site.pcjs.pdp10_scripts %}{% endif %}
|
||||
{% if machine_type == "pdp11" %}{% assign array_scripts = site.pcjs.pdp11_scripts %}{% endif %}
|
||||
{% for script in array_scripts %}
|
||||
{% if script != "/modules/shared/lib/nodebug.js" or machine.debug != true and site.pcjs.debug != true %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}{{ script }}"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
{{ machine_script }}
|
||||
{% if script contains "shared/lib/defines.js" %}
|
||||
{% if site.pcjs.private %}
|
||||
{{ machine_script | replace:"defines.js","private.js" }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if script contains "js/lib/defines.js" %}
|
||||
{% if machine_debugger != true %}
|
||||
{{ machine_script | replace:"defines.js","nodebugger.js" }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% capture machine_file_uncompiled %}{{ machine_file | remove:"-dbg" | append:"-uncompiled" }}{% endcapture %}
|
||||
{% capture machine_script %}
|
||||
<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/{{ machine_file_uncompiled }}.js"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
{{ machine_script }}
|
||||
{% endunless %}
|
||||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% if machine_template == "" %}
|
||||
{% if machine_app != "c1pjs" %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/shared/templates/components.xsl{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine_app }}/templates/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
|
||||
The following approach worked well before we converted most of the code to ES6 classes. Unfortunately, ES6 classes
|
||||
don't coexist well with the conditional Node require() statements inside the individual scripts. Since we were already
|
||||
stripping all the Node-related code from the scripts to build monolithic scripts that we could feed into the Closure
|
||||
Compiler, we have simply moved those monolithic scripts from the /tmp folder to the /versions folder, with "-uncompiled"
|
||||
suffixes. And since they are now checked in alongside the compiled files, there's the added benefit that we can always
|
||||
reference them from source maps.
|
||||
|
||||
So, the following template code is no longer of any use, but we'll leave it here for historical reference. Note that
|
||||
our Node web server still serves up individual scripts, because it has the ability to strip all Node references from the
|
||||
scripts before delivering them to the web browser. But that's not really feasible in the Jekyll environment.
|
||||
|
||||
{% if machine_type == "c1p" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %}
|
||||
{% if machine_type == "pcx86" %}{% assign array_scripts = site.pcjs.pcx86_scripts %}{% endif %}
|
||||
{% if machine_type == "pc8080" %}{% assign array_scripts = site.pcjs.pc8080_scripts %}{% endif %}
|
||||
{% if machine_type == "pdp10" %}{% assign array_scripts = site.pcjs.pdp10_scripts %}{% endif %}
|
||||
{% if machine_type == "pdp11" %}{% assign array_scripts = site.pcjs.pdp11_scripts %}{% endif %}
|
||||
{% for script in array_scripts %}
|
||||
{% if script != "/modules/shared/lib/nodebug.js" or machine.debug != true and site.pcjs.debug != true %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}{{ script }}"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
{{ machine_script }}
|
||||
{% if script contains "shared/lib/defines.js" %}
|
||||
{% if site.pcjs.private %}
|
||||
{{ machine_script | replace:"defines.js","private.js" }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if script contains "js/lib/defines.js" %}
|
||||
{% if machine_debugger != true %}
|
||||
{{ machine_script | replace:"defines.js","nodebugger.js" }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
{% capture machine_scripts %}{{ machine_scripts }}{{ machine_script }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if machine_template == "" %}
|
||||
{% if machine_app != "c1pjs" %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/shared/templates/components.xsl{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_template %}{{ site.baseurl }}/modules/{{ machine_app }}/templates/components.xsl{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
{% endif %}
|
||||
<script type="text/javascript">{{ machine_embed }}('{{ machine.id }}','{{ machine_config }}','{{ machine_template }}','{{ machine_parms }}');</script>
|
||||
{% if machine.sticky == "top" %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en-US">
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,20 @@ machines:
|
|||
path: /disks/pcx86/dos/ibm/2.00/PCDOS200-DISK1.json
|
||||
B:
|
||||
path: /disks/pcx86/apps/ibm/topview/1.01/TOPVIEW101-PROGRAM.json
|
||||
autoType: \r\rb:\rtv\r
|
||||
---
|
||||
|
||||
TopView 1.01
|
||||
---
|
||||
------------
|
||||
|
||||
NOTE: Even though we've made every effort to mark all PCjs pages as English, Google's Chrome web browser (v59)
|
||||
mistakenly thinks this page is in French and will attempt to translate it to English. That translation process
|
||||
interferes with elements of the machine; for example, it may change the name of the first diskette drive from
|
||||
"A:" to "AT:".
|
||||
|
||||
So, if you notice any rendering problems, check the top of your web browser, and if you see the message *This page
|
||||
has been translated from French to English*, click **Show Original**. Ironically, the addition of these two
|
||||
paragraphs of English text will likely eliminate the problem.
|
||||
|
||||
{% include machine.html id="ibm5160" %}
|
||||
|
||||
|
|
|
|||
|
|
@ -893,4 +893,4 @@ window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==ty
|
|||
function uC(a,b,c,d){if(!c&&b){d.push(b);a=pb[d[0]];b=null;for(var e in a)if(wa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ka(b,null,!0,function(a,b){vC(b,d)}):vC(null,d)}else gb("Error ("+c+") requesting "+a)}
|
||||
function vC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=pb[f],k={},m;for(m in h){var p=h[m],v=va(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=ta(m)}else"xsl"==v&&(e=m=ta(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Wa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",gb(a)):gb("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=lB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Pk:g}))return!0;Ka(b,null,!0,function(c,d,e){uC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=lB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Pk:g}))return!0;Ka(b,null,!0,function(c,d,e){uC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.0/pcx86-dbg.map
|
||||
|
|
|
|||
|
|
@ -696,4 +696,4 @@ window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==ty
|
|||
function pv(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ra(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ba(b,null,!0,function(a,b){qv(b,d)}):qv(null,d)}else r("Error ("+c+") requesting "+a)}
|
||||
function qv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=Wa[f],l={},m;for(m in h){var q=h[m],y=qa(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var w=d[2];w&&(h[w]||(q=q.replace(d[0],"")))}d=m=pa(m)}else"xsl"==y&&(e=m=pa(m));l[m]=q}a&&(l[m="css"]=a);b[2]&&(l[m="parms"]=b[2]);b[3]&&(l[m="state"]=b[3]);d&&e?(a=JSON.stringify(l),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",r(a)):r("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=bv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ij:g}))return!0;Ba(b,null,!0,function(c,d,e){pv(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=bv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ij:g}))return!0;Ba(b,null,!0,function(c,d,e){pv(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.0/pcx86.map
|
||||
|
|
|
|||
|
|
@ -455,12 +455,7 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
if (sName == 'automount') sName = 'autoMount'; // for backward compatibility
|
||||
if (sName == 'autotype') {
|
||||
sName = 'autoType';
|
||||
/*
|
||||
* To maintain parity with Jekyll, autoType sequences must continue to use double backslashes,
|
||||
* so my attempt to automatically "double" any backslashes in autoType sequences was for naught.
|
||||
*
|
||||
* sValue = sValue.replace(/\\/g, "\");
|
||||
*/
|
||||
sValue = sValue.replace(/\\/g, "\"); // automatically "double" any backslashes
|
||||
}
|
||||
if (!id && sName == 'id') {
|
||||
id = sValue;
|
||||
|
|
|
|||
|
|
@ -192,4 +192,4 @@ a=a.replace(d[0],h);Sb(a,b,c)}})}else c(a,null)}
|
|||
function Tb(a,b,c){function d(a){if(void 0===h){var b=g&&G(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ja(a))}function e(a){d("Error: "+a);l&&(--Ob||B(!0));l=!1}var g,h,l=!0;Ob++;L[a]={};try{if(g=document.getElementById(a)){var k;if("object"==typeof resources&&(k=resources.css)){var m=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=k:n.appendChild(document.createTextNode(k));m.appendChild(n)}c||(c=
|
||||
"/versions/c1pjs/1.35.0/components.xsl");k=function(h,k){k?Pb(c,null,null,!1,d,function(h,l){l?(L[a]&&c&&(L[a][c]=h),d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Ob||B(!0)):e("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(h=new XSLTProcessor,h.importStylesheet(l),(l=h.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ob||B(!0)):e("invalid machine element: "+
|
||||
a):e("transformToFragment failed")):e("unable to transform XML: unsupported browser")):e(h)}):e(h)};"<"!=b.charAt(0)?Pb(b,a,void 0,!0,d,k):Rb(b,null,a,void 0,!1,d,k)}else e("missing machine element: "+a)}catch(r){e(r.message)}return l}window.embedC1P=function(a,b,c){B(!1);return Tb(a,b,c)};window.findMachineComponent=function(a,b){return wa(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!ya[a]){for(var c=!0,d=ya,e=a,g=b.length,h=[],l=[],k="",m=null,n=0;n<g;n++){var r=b[n];if('"'==r||"'"==r)m&&r!=m?k+=r:(m?m=null:m=r,k&&(l.push(k),k=""));else{if(!m){if("\r"==r||"\n"==r)r=";";if(" "==r||"\t"==r||";"==r){k&&(l.push(k),k="");";"==r&&l.length&&(h.push(l),l=[]);continue}}k+=r}}k&&l.push(k);l.length&&h.push(l);d[e]=h;xa(a)||(c=!1)}return c};window.enableEvents=B;window.sendEvent=sa;})();
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!ya[a]){for(var c=!0,d=ya,e=a,g=b.length,h=[],l=[],k="",m=null,n=0;n<g;n++){var r=b[n];if('"'==r||"'"==r)m&&r!=m?k+=r:(m?m=null:m=r,k&&(l.push(k),k=""));else{if(!m){if("\r"==r||"\n"==r)r=";";if(" "==r||"\t"==r||";"==r){k&&(l.push(k),k="");";"==r&&l.length&&(h.push(l),l=[]);continue}}k+=r}}k&&l.push(k);l.length&&h.push(l);d[e]=h;xa(a)||(c=!1)}return c};window.enableEvents=B;window.sendEvent=sa;})();//# sourceMappingURL=/versions/c1pjs/1.35.0/c1p-dbg.map
|
||||
|
|
|
|||
|
|
@ -155,4 +155,4 @@ a=a.replace(d[0],h);rb(a,b,c)}})}else c(a,null)}
|
|||
function tb(a,b,c){function d(a){if(void 0===h){var b=g&&I(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ia(a))}function f(a){d("Error: "+a);l&&(--ob||C(!0));l=!1}var g,h,l=!0;ob++;L[a]={};try{if(g=document.getElementById(a)){var k;if("object"==typeof resources&&(k=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");m.type="text/css";m.styleSheet?m.styleSheet.cssText=k:m.appendChild(document.createTextNode(k));n.appendChild(m)}c||(c=
|
||||
"/versions/c1pjs/1.35.0/components.xsl");k=function(h,k){k?pb(c,null,null,!1,d,function(h,l){l?(L[a]&&c&&(L[a][c]=h),d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--ob||C(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(h=new XSLTProcessor,h.importStylesheet(l),(l=h.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--ob||C(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(h)}):f(h)};"<"!=b.charAt(0)?pb(b,a,void 0,!0,d,k):qb(b,null,a,void 0,!1,d,k)}else f("missing machine element: "+a)}catch(p){f(p.message)}return l}window.embedC1P=function(a,b,c){C(!1);return tb(a,b,c)};window.findMachineComponent=function(a,b){return qa(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!J[a]){for(var c=!0,d=J,f=a,g=b.length,h=[],l=[],k="",n=null,m=0;m<g;m++){var p=b[m];if('"'==p||"'"==p)n&&p!=n?k+=p:(n?n=null:n=p,k&&(l.push(k),k=""));else{if(!n){if("\r"==p||"\n"==p)p=";";if(" "==p||"\t"==p||";"==p){k&&(l.push(k),k="");";"==p&&l.length&&(h.push(l),l=[]);continue}}k+=p}}k&&l.push(k);l.length&&h.push(l);d[f]=h;ra(a)||(c=!1)}return c};window.enableEvents=C;window.sendEvent=na;})();
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!J[a]){for(var c=!0,d=J,f=a,g=b.length,h=[],l=[],k="",n=null,m=0;m<g;m++){var p=b[m];if('"'==p||"'"==p)n&&p!=n?k+=p:(n?n=null:n=p,k&&(l.push(k),k=""));else{if(!n){if("\r"==p||"\n"==p)p=";";if(" "==p||"\t"==p||";"==p){k&&(l.push(k),k="");";"==p&&l.length&&(h.push(l),l=[]);continue}}k+=p}}k&&l.push(k);l.length&&h.push(l);d[f]=h;ra(a)||(c=!1)}return c};window.enableEvents=C;window.sendEvent=na;})();//# sourceMappingURL=/versions/c1pjs/1.35.0/c1p.map
|
||||
|
|
|
|||
Loading…
Reference in a new issue