new MetaScript(sourceOrProgram, filenameopt)
-Constructs a new MetaScript instance.
-new MetaScript(sourceOrProgram, filenameopt)
- + +Constructs a new MetaScript instance.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -183,20 +197,21 @@
Parameters:
Parameters:
- +Members
--
+
-
-
-
(static, constant) VERSION :string
+(static, constant) VERSION :string
- -
- -
-
- -- - -
MetaScript version.
-Type:
--
-
-
-
+
+
+++ + + +
MetaScript version.
+Type:
+-
+
- + string - -
+
-
+
-
-
+
+
+
@@ -277,39 +299,45 @@
Type:
+
+
- -
-
+
+
+
-
-
filename :string
+filename :string
- -
- -
-
- -- - -
Original source file name.
-Type:
--
-
-
-
+
+
+++ + + +
Original source file name.
+Type:
+-
+
- + string - -
+
-
+
-
-
+
+
+
@@ -343,39 +371,45 @@
Type:
+
+
- -
-
+
+
+
-
-
program :string
+program :string
- -
- -
-
- -- - -
The compiled meta program's source.
-Type:
--
-
-
-
+
+
+++ + + +
The compiled meta program's source.
+Type:
+-
+
- + string - -
+
-
+
-
-
+
+
+
@@ -409,39 +443,45 @@
Type:
+
+
- -
-
+
+
+
-
-
(nullable) source :string
+(nullable) source :string
- -
- -
-
- -- - -
Original source.
-Type:
--
-
-
-
+
+
+++ + + +
Original source.
+Type:
+-
+
- + string - -
+
-
+
-
-
+
+
+
@@ -475,39 +515,43 @@
Type:
- -
-
+
+
+
Methods
--
+
-
-
-
(static) compile(source) → {string}
-
- -
- -+
Compiles the specified source to a meta program and returns its source.
-(static) compile(source) → {string}
- + +++ + + + + + + + + +Compiles the specified source to a meta program and returns its source.
+Parameters:
-Parameters:
-@@ -553,10 +597,20 @@
+ + + + + + +Parameters:
-
+
-
-
+
+
+
@@ -590,20 +644,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Meta program
Returns:
(static) transform(source, filenameopt, scopenon-null) → {string}
-Compiles the source to a meta program and transforms it using the specified scope in a new VM context.
-(static) transform(source, filenameopt, scopenon-null) → {string}
- + +Compiles the source to a meta program and transforms it using the specified scope in a new VM context.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -805,20 +875,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Transformed source
Returns:
transform(scope) → {string}
-Runs the meta program with the specified scope in the current context and returns the final document. This method - should always be invoked in a fresh or otherwise safe context, so if you do not know exactly what you are doing, - use MetaScript.transform instead, which always creates a fresh VM context before calling this method.
-transform(scope) → {string}
- + +Runs the meta program with the specified scope in the current context and returns the final document. This method + should always be invoked in a fresh or otherwise safe context, so if you do not know exactly what you are doing, + use MetaScript.transform instead, which always creates a fresh VM context before calling this method.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -948,20 +1034,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Transformed source
Returns:
Returns:
-+
diff --git a/docs/MetaScript.js.html b/docs/MetaScript.js.html index 85f9788..53bad8b 100644 --- a/docs/MetaScript.js.html +++ b/docs/MetaScript.js.html @@ -22,6 +22,7 @@
Source: MetaScript.js
+Source: MetaScript.js
-+
diff --git a/docs/fonts/OpenSans-Bold-webfont.eot b/docs/fonts/OpenSans-Bold-webfont.eot new file mode 100644 index 0000000..5d20d91 Binary files /dev/null and b/docs/fonts/OpenSans-Bold-webfont.eot differ diff --git a/docs/fonts/OpenSans-Bold-webfont.svg b/docs/fonts/OpenSans-Bold-webfont.svg new file mode 100644 index 0000000..3ed7be4 --- /dev/null +++ b/docs/fonts/OpenSans-Bold-webfont.svg @@ -0,0 +1,1830 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Bold-webfont.woff b/docs/fonts/OpenSans-Bold-webfont.woff new file mode 100644 index 0000000..1205787 Binary files /dev/null and b/docs/fonts/OpenSans-Bold-webfont.woff differ diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.eot b/docs/fonts/OpenSans-BoldItalic-webfont.eot new file mode 100644 index 0000000..1f639a1 Binary files /dev/null and b/docs/fonts/OpenSans-BoldItalic-webfont.eot differ diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.svg b/docs/fonts/OpenSans-BoldItalic-webfont.svg new file mode 100644 index 0000000..6a2607b --- /dev/null +++ b/docs/fonts/OpenSans-BoldItalic-webfont.svg @@ -0,0 +1,1830 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.woff b/docs/fonts/OpenSans-BoldItalic-webfont.woff new file mode 100644 index 0000000..ed760c0 Binary files /dev/null and b/docs/fonts/OpenSans-BoldItalic-webfont.woff differ diff --git a/docs/fonts/OpenSans-Italic-webfont.eot b/docs/fonts/OpenSans-Italic-webfont.eot new file mode 100644 index 0000000..0c8a0ae Binary files /dev/null and b/docs/fonts/OpenSans-Italic-webfont.eot differ diff --git a/docs/fonts/OpenSans-Italic-webfont.svg b/docs/fonts/OpenSans-Italic-webfont.svg new file mode 100644 index 0000000..e1075dc --- /dev/null +++ b/docs/fonts/OpenSans-Italic-webfont.svg @@ -0,0 +1,1830 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Italic-webfont.woff b/docs/fonts/OpenSans-Italic-webfont.woff new file mode 100644 index 0000000..ff652e6 Binary files /dev/null and b/docs/fonts/OpenSans-Italic-webfont.woff differ diff --git a/docs/fonts/OpenSans-Light-webfont.eot b/docs/fonts/OpenSans-Light-webfont.eot new file mode 100644 index 0000000..1486840 Binary files /dev/null and b/docs/fonts/OpenSans-Light-webfont.eot differ diff --git a/docs/fonts/OpenSans-Light-webfont.svg b/docs/fonts/OpenSans-Light-webfont.svg new file mode 100644 index 0000000..11a472c --- /dev/null +++ b/docs/fonts/OpenSans-Light-webfont.svg @@ -0,0 +1,1831 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Light-webfont.woff b/docs/fonts/OpenSans-Light-webfont.woff new file mode 100644 index 0000000..e786074 Binary files /dev/null and b/docs/fonts/OpenSans-Light-webfont.woff differ diff --git a/docs/fonts/OpenSans-LightItalic-webfont.eot b/docs/fonts/OpenSans-LightItalic-webfont.eot new file mode 100644 index 0000000..8f44592 Binary files /dev/null and b/docs/fonts/OpenSans-LightItalic-webfont.eot differ diff --git a/docs/fonts/OpenSans-LightItalic-webfont.svg b/docs/fonts/OpenSans-LightItalic-webfont.svg new file mode 100644 index 0000000..431d7e3 --- /dev/null +++ b/docs/fonts/OpenSans-LightItalic-webfont.svg @@ -0,0 +1,1835 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-LightItalic-webfont.woff b/docs/fonts/OpenSans-LightItalic-webfont.woff new file mode 100644 index 0000000..43e8b9e Binary files /dev/null and b/docs/fonts/OpenSans-LightItalic-webfont.woff differ diff --git a/docs/fonts/OpenSans-Regular-webfont.eot b/docs/fonts/OpenSans-Regular-webfont.eot new file mode 100644 index 0000000..6bbc3cf Binary files /dev/null and b/docs/fonts/OpenSans-Regular-webfont.eot differ diff --git a/docs/fonts/OpenSans-Regular-webfont.svg b/docs/fonts/OpenSans-Regular-webfont.svg new file mode 100644 index 0000000..25a3952 --- /dev/null +++ b/docs/fonts/OpenSans-Regular-webfont.svg @@ -0,0 +1,1831 @@ + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Regular-webfont.woff b/docs/fonts/OpenSans-Regular-webfont.woff new file mode 100644 index 0000000..e231183 Binary files /dev/null and b/docs/fonts/OpenSans-Regular-webfont.woff differ diff --git a/docs/global.html b/docs/global.html index 8e7d6e6..a6bca5d 100644 --- a/docs/global.html +++ b/docs/global.html @@ -23,24 +23,32 @@
Global
+-
+ +-
+
+
+
+
+
+
+
@@ -81,7 +89,7 @@
-
-
dirname(filename) → {string}
-
- -
- -+
Extracts the directory name from a file name.
-dirname(filename) → {string}
- + +++ + + + + + + + + +Extracts the directory name from a file name.
+Parameters:
-Parameters:
-@@ -157,10 +170,20 @@
+ + + + + + +Parameters:
-
+
-
-
+
+
+
@@ -194,20 +217,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Directory name
Returns:
-
-
escapestr(s) → {string}
-
- -
- -+
Escaoes a string to be used inside of a single or double quote enclosed JavaScript string.
-escapestr(s) → {string}
- + +++ + + + + + + + + +Escaoes a string to be used inside of a single or double quote enclosed JavaScript string.
+Parameters:
-Parameters:
-@@ -298,10 +327,20 @@
+ + + + + + +Parameters:
-
+
-
-
+
+
+
@@ -335,20 +374,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Escaped string
Returns:
-
+
@@ -90,28 +98,33 @@
Methods
-
+
-
-
-
-
+
+
+
+
-
Methods
--
+
-
include(filename, absolute)
-Includes another source file.
-include(filename, absolute)
- + +Includes another source file.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -499,43 +554,49 @@
Parameters:
indent(str, indent) → {string}
-Indents a block of text.
-indent(str, indent) → {string}
- + +Indents a block of text.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -644,20 +715,20 @@
Parameters:
Returns:
- - + + + + + + +Returns:
+ +Indented text
Returns:
write(s)
-Writes some contents to the document (no indentation).
-write(s)
- + +Writes some contents to the document (no indentation).
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -785,43 +872,49 @@
Parameters:
writeln(s)
-Writes some contents to the document, followed by a new line.
-writeln(s)
- + +Writes some contents to the document, followed by a new line.
+Parameters:
-Parameters:
--
+
-
-
+
+
+
@@ -904,22 +1007,23 @@
Parameters:
Parameters:
+
diff --git a/docs/index.html b/docs/index.html index 4b6221b..fbd09e4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,7 +2,7 @@ -
Index
+Home
+ @@ -35,6 +36,7 @@+ @@ -48,13 +50,13 @@
+
diff --git a/docs/styles/jsdoc-default.css b/docs/styles/jsdoc-default.css index 124ef6c..9207bc8 100644 --- a/docs/styles/jsdoc-default.css +++ b/docs/styles/jsdoc-default.css @@ -1,57 +1,94 @@ +@font-face { + font-family: 'Open Sans'; + font-weight: normal; + font-style: normal; + src: url('../fonts/OpenSans-Regular-webfont.eot'); + src: + local('Open Sans'), + local('OpenSans'), + url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/OpenSans-Regular-webfont.woff') format('woff'), + url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg'); +} + +@font-face { + font-family: 'Open Sans Light'; + font-weight: normal; + font-style: normal; + src: url('../fonts/OpenSans-Light-webfont.eot'); + src: + local('Open Sans Light'), + local('OpenSans Light'), + url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/OpenSans-Light-webfont.woff') format('woff'), + url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg'); +} + html { overflow: auto; background-color: #fff; + font-size: 14px; } body { - font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; - line-height: 130%; - color: #000; - background-color: #fff; + font-family: 'Open Sans', sans-serif; + line-height: 1.5; + color: #4d4e53; + background-color: white; } -a { - color: #444; -} - -a:visited { - color: #444; +a, a:visited, a:active { + color: #0095dd; + text-decoration: none; } -a:active { - color: #444; +a:hover { + text-decoration: underline; } header { display: block; - padding: 6px 4px; + padding: 0px 4px; +} + +tt, code, kbd, samp { + font-family: Consolas, Monaco, 'Andale Mono', monospace; } .class-description { - font-style: italic; - font-family: Palatino, 'Palatino Linotype', serif; font-size: 130%; line-height: 140%; margin-bottom: 1em; margin-top: 1em; } +.class-description:empty { + margin: 0; +} + #main { float: left; - width: 100%; + width: 70%; +} + +article dl { + margin-bottom: 40px; +} + +article img { + max-width: 100%; } section { display: block; - background-color: #fff; padding: 12px 24px; border-bottom: 1px solid #ccc; - margin-right: 240px; + margin-right: 30px; } .variation { @@ -68,26 +105,27 @@ section nav { display: block; - float: left; - margin-left: -230px; + float: right; margin-top: 28px; - width: 220px; + width: 30%; + box-sizing: border-box; border-left: 1px solid #ccc; - padding-left: 9px; + padding-left: 16px; } nav ul { font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; font-size: 100%; line-height: 17px; - padding:0; - margin:0; - list-style-type:none; + padding: 0; + margin: 0; + list-style-type: none; } -nav h2 a, nav h2 a:visited { - color: #A35A00; - text-decoration: none; +nav ul a, nav ul a:visited, nav ul a:active { + font-family: Consolas, Monaco, 'Andale Mono', monospace; + line-height: 18px; + color: #4D4E53; } nav h3 { @@ -98,18 +136,6 @@ nav li { margin-top: 6px; } -nav a { - color: #5C5954; -} - -nav a:visited { - color: #5C5954; -} - -nav a:active { - color: #5C5954; -} - footer { display: block; padding: 6px; @@ -118,39 +144,40 @@ footer { font-size: 90%; } +h1, h2, h3, h4 { + font-weight: 200; + margin: 0; +} + h1 { - font-size: 200%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 6px 0 9px 0; + font-family: 'Open Sans Light', sans-serif; + font-size: 48px; + letter-spacing: -2px; + margin: 12px 24px 20px; } -h2 +h2, h3.subsection-title { - font-size: 170%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 6px 0 3px 0; + font-size: 30px; + font-weight: 700; + letter-spacing: -1px; + margin-bottom: 12px; } h3 { - font-size: 150%; - font-weight: bold; - letter-spacing: -0.01em; - margin-top: 16px; - margin: 6px 0 3px 0; + font-size: 24px; + letter-spacing: -0.5px; + margin-bottom: 12px; } h4 { - font-size: 130%; - font-weight: bold; - letter-spacing: -0.01em; - margin-top: 16px; - margin: 18px 0 3px 0; - color: #A35A00; + font-size: 18px; + letter-spacing: -0.33px; + margin-bottom: 12px; + color: #4d4e53; } h5, .container-overview .subsection-title @@ -158,7 +185,7 @@ h5, .container-overview .subsection-title font-size: 120%; font-weight: bold; letter-spacing: -0.01em; - margin: 8px 0 3px -16px; + margin: 8px 0 3px 0; } h6 @@ -169,13 +196,44 @@ h6 font-style: italic; } -.ancestors { color: #999; } -.ancestors a +table +{ + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +td, th +{ + border: 1px solid #ddd; + margin: 0px; + text-align: left; + vertical-align: top; + padding: 4px 6px; + display: table-cell; +} + +thead tr +{ + background-color: #ddd; + font-weight: bold; +} + +th { border-right: 1px solid #aaa; } +tr > th:last-child { border-right: 1px solid #ddd; } + +.ancestors, .attribs { color: #999; } +.ancestors a, .attribs a { color: #999 !important; text-decoration: none; } +.clear +{ + clear: both; +} + .important { font-weight: bold; @@ -191,12 +249,12 @@ h6 } .name, .signature { - font-family: Consolas, "Lucida Console", Monaco, monospace; + font-family: Consolas, Monaco, 'Andale Mono', monospace; } .details { margin-top: 14px; border-left: 2px solid #DDD; } -.details dt { width:100px; float:left; padding-left: 10px; padding-top: 6px; } -.details dd { margin-left: 50px; } +.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } +.details dd { margin-left: 70px; } .details ul { margin: 0; } .details ul { list-style-type: none; } .details li { margin-left: 30px; padding-top: 6px; } @@ -205,14 +263,12 @@ h6 .description { margin-bottom: 1em; - margin-left: -16px; margin-top: 1em; } .code-caption { font-style: italic; - font-family: Palatino, 'Palatino Linotype', serif; font-size: 107%; margin: 0; } @@ -230,14 +286,13 @@ h6 .prettyprint code { - font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 100%; line-height: 18px; display: block; padding: 4px 12px; margin: 0; background-color: #fff; - color: #000; + color: #4D4E53; } .prettyprint code span.line @@ -278,51 +333,21 @@ h6 user-select: text; } -.params, .props -{ - border-spacing: 0; - border: 0; - border-collapse: collapse; -} - .params .name, .props .name, .name code { - color: #A35A00; - font-family: Consolas, 'Lucida Console', Monaco, monospace; + color: #4D4E53; + font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 100%; } -.params td, .params th, .props td, .props th -{ - border: 1px solid #ddd; - margin: 0px; - text-align: left; - vertical-align: top; - padding: 4px 6px; - display: table-cell; -} - -.params thead tr, .props thead tr -{ - background-color: #ddd; - font-weight: bold; -} - -.params .params thead tr, .props .props thead tr -{ - background-color: #fff; - font-weight: bold; -} - -.params th, .props th { border-right: 1px solid #aaa; } -.params thead .last, .props thead .last { border-right: 1px solid #ddd; } - -.params td.description > p:first-child +.params td.description > p:first-child, +.props td.description > p:first-child { margin-top: 0; padding-top: 0; } -.params td.description > p:last-child +.params td.description > p:last-child, +.props td.description > p:last-child { margin-bottom: 0; padding-bottom: 0; diff --git a/docs/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css index aa2908c..b6f92a7 100644 --- a/docs/styles/prettify-tomorrow.css +++ b/docs/styles/prettify-tomorrow.css @@ -98,7 +98,7 @@ /* pre.prettyprint { background: white; - font-family: Menlo, Monaco, Consolas, monospace; + font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 12px; line-height: 1.5; border: 1px solid #ccc; diff --git a/package.json b/package.json index 84b058c..4b6f070 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metascript", - "version": "1.0.0", + "version": "1.0.1", "author": "Daniel Wirtz