|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
757 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 3 | Author Florent Cailhol @ooflorent
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | "use strict";
|
|---|
| 7 |
|
|---|
| 8 | const RuntimeGlobals = require("../RuntimeGlobals");
|
|---|
| 9 | const RuntimeModule = require("../RuntimeModule");
|
|---|
| 10 | const Template = require("../Template");
|
|---|
| 11 |
|
|---|
| 12 | class SystemRuntimeModule extends RuntimeModule {
|
|---|
| 13 | constructor() {
|
|---|
| 14 | super("system");
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | /**
|
|---|
| 18 | * Generates runtime code for this runtime module.
|
|---|
| 19 | * @returns {string | null} runtime code
|
|---|
| 20 | */
|
|---|
| 21 | generate() {
|
|---|
| 22 | return Template.asString([
|
|---|
| 23 | `${RuntimeGlobals.system} = {`,
|
|---|
| 24 | Template.indent([
|
|---|
| 25 | "import: function () {",
|
|---|
| 26 | Template.indent(
|
|---|
| 27 | "throw new Error('System.import cannot be used indirectly');"
|
|---|
| 28 | ),
|
|---|
| 29 | "}"
|
|---|
| 30 | ]),
|
|---|
| 31 | "};"
|
|---|
| 32 | ]);
|
|---|
| 33 | }
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | module.exports = SystemRuntimeModule;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.