Compare commits
No commits in common. "68fb504899541ba26838378bbc092324a1feddb4" and "cd70fa7a5d66ad94ef0408386a4e2ee4d6d3fc7c" have entirely different histories.
68fb504899
...
cd70fa7a5d
34
r3.php
34
r3.php
|
@ -428,34 +428,6 @@ function generateInherited($file, $restoreTokens)
|
|||
updateSection($file, 'GENERATED_INHERITED' , $updates);
|
||||
}
|
||||
|
||||
function generateConstructors($file, $command)
|
||||
{
|
||||
echo $file;
|
||||
|
||||
$token = 'GENERATED_CONSTRUCTOR';
|
||||
|
||||
if (preg_match('/system_base/', $command)) {
|
||||
$constructor = file_get_contents('src/templates/system_base_constructor.template');
|
||||
}
|
||||
|
||||
if (preg_match('/\bsystem\b/', $command)) {
|
||||
$constructor = file_get_contents('src/templates/system_extends_constructor.template');
|
||||
$token = 'GENERATED_CONSTRUCTOR_EXTENDS';
|
||||
}
|
||||
|
||||
if (preg_match('/\bnormal\b/', $command)) {
|
||||
$constructor = file_get_contents('src/templates/constructor.template');
|
||||
}
|
||||
|
||||
if (preg_match('/\bextends\b/', $command)) {
|
||||
$constructor = file_get_contents('src/templates/constructor_extends.template');
|
||||
$token = 'GENERATED_CONSTRUCTOR_EXTENDS';
|
||||
}
|
||||
|
||||
updateSection($file, $token , $constructor);
|
||||
|
||||
}
|
||||
|
||||
function generateInitOptions($file, $tokens)
|
||||
{
|
||||
$token = 'CUSTOM_OPTIONS';
|
||||
|
@ -1196,7 +1168,7 @@ function generateR3($nodes, $graph)
|
|||
|
||||
$tokens = loadSaved($r3File, getTokens('CUSTOM'));
|
||||
|
||||
$template = file_get_contents('src/templates/r3_base.template');
|
||||
$template = file_get_contents('src/templates/r3-base.template');
|
||||
|
||||
$version = file_get_contents('version');
|
||||
|
||||
|
@ -1330,7 +1302,7 @@ function generateR3Dist($nodes)
|
|||
{
|
||||
$r3jsFile = 'dist/r3.js';
|
||||
$r3jsSource = 'src/r3/r3-r3.js';
|
||||
$r3jsBaseTemplate = 'src/templates/r3_base.template';
|
||||
$r3jsBaseTemplate = 'src/templates/r3-base.template';
|
||||
$r3js = fopen($r3jsFile, "w");
|
||||
|
||||
ftruncate($r3js, 0);
|
||||
|
@ -1643,8 +1615,6 @@ foreach ($files as $file) {
|
|||
}
|
||||
}
|
||||
|
||||
generateConstructors($file, $argv[3]);
|
||||
|
||||
generateMethods($file, $tokens);
|
||||
|
||||
generateStaticMethods($file, $tokens);
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
class R3 {
|
||||
static version = 'VERSION';
|
||||
static compileDate = 'DATE';
|
||||
}
|
||||
|
||||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//GENERATED_DEFINES_START
|
||||
//GENERATED_DEFINES_END
|
||||
|
||||
//CUSTOM_CONVENIENT_DEFINES_START
|
||||
//CUSTOM_CONVENIENT_DEFINES_END
|
||||
|
||||
module.exports = R3;
|
|
@ -1,57 +0,0 @@
|
|||
const Event = require('INCLUDE_PATH/r3-event');
|
||||
const Utils = require('INCLUDE_PATH/r3-utils');
|
||||
|
||||
/**
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_EVENT_LISTENERS_START
|
||||
CUSTOM_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_START
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
||||
class CLASS_NAME {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = CLASS_NAME;
|
|
@ -1,20 +0,0 @@
|
|||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
const Event = require('INCLUDE_PATH/r3-event');
|
||||
const Utils = require('INCLUDE_PATH/r3-utils');
|
||||
const EXTEND_CLASS = require('./EXTEND_CLASS_FILE_NAME');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
Started=false
|
||||
Subscriptions={}
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_EVENT_LISTENERS_START
|
||||
CUSTOM_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_START
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
Start(options) - Starts the system by registering subscriptions to events
|
||||
Stop(options) - Stops the system by removing these subscriptions to events
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
||||
class CLASS_NAME extends EXTEND_CLASS {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_EXTENDS_START
|
||||
//GENERATED_CONSTRUCTOR_EXTENDS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = CLASS_NAME;
|
|
@ -1,22 +0,0 @@
|
|||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
|
@ -57,7 +57,6 @@ CUSTOM_ASYNC_METHOD
|
|||
CUSTOM_BEFORE_INIT
|
||||
CUSTOM_BEFORE_STATIC_SYSTEM_START
|
||||
CUSTOM_BEFORE_STATIC_SYSTEM_STOP
|
||||
CUSTOM_BEFORE_SYSTEM
|
||||
CUSTOM_BEFORE_SYSTEM_START
|
||||
CUSTOM_BEFORE_SYSTEM_STOP
|
||||
CUSTOM_CONVENIENT_DEFINES
|
||||
|
|
Loading…
Reference in New Issue