dev
List of commits:
Subject Hash Author Date (UTC)
compile function 26b9d9676e0d689f5ef111e4f61ecf52ed47048b mucbuc 2020-08-25 00:09:15
move res in tblueprint 7dc2bb8462a6db28751fc572f796bf57e1710b89 mucbuc 2020-08-24 04:11:04
remove spaces 1e768ad122da007e4e5402303ff945620254d4b5 mucbuc 2020-08-23 21:15:40
remove spaces 18859697c3895df15e2e8d022209f892350025c5 mucbuc 2020-08-23 21:14:58
remove spaces f97eb53fdc3c1801b9e863b4e6b1fba5b11d8040 mucbuc 2020-08-23 21:14:06
write template cfb6e2b732d01190dd8a786742bb6bf00292225e mucbuc 2020-08-23 21:05:51
remove space 12ab455e7786c20019679edba5107a7f579dc126 mucbuc 2020-08-23 20:06:40
working on example 82a1df4d3f6c5e5405eae35f277572fc51b9a947 mucbuc 2020-08-23 20:02:57
remove spaces 3085884efad6701037ead5fafc816e1e061f4f3e mucbuc 2020-08-23 19:47:11
template f8b6264b7697735f0aaf9b5b7de16390c8388fb2 mucbuc 2020-08-23 17:05:05
wtf 570de7c742cf9b3ec5518499fcbf87cd32902ebe mucbuc 2020-08-23 00:48:47
wtf dfdd90a77db18e6c9778d88d7a167e5999ac81b7 mucbuc 2020-08-23 00:47:50
wtf 8d1b6e0c8ec4d2363e1984941718ebd30bdecfcf mucbuc 2020-08-23 00:47:24
wtf 0beeddd90c2545f4f66e26acdfc444d3f359c56a mucbuc 2020-08-23 00:46:43
what 40e6ec7d104098b0e673be8f81c945c93f6ee13e mucbuc 2020-08-23 00:45:16
installJrnl linted 99a721a40295ec2aa555e7ee27cd808b5d44a2c3 mucbuc 2020-08-23 00:42:33
config 8d0e58c52406c09c861d376bba353467837edf4a mucbuc 2020-08-22 00:04:25
cleanup 6db42918c86196075fe0b4047b3af6bdea98bde9 mucbuc 2020-08-21 19:20:23
test 6c086247500a2158a41a5d9cbe037d0b3933e99e mucbuc 2020-08-21 18:59:40
fixes for zsh adf6eae26569cac8c0487c0d7d62549ee2ac3df4 mucbuc 2020-08-19 04:54:15
Commit 26b9d9676e0d689f5ef111e4f61ecf52ed47048b - compile function
Author: mucbuc
Author date (UTC): 2020-08-25 00:09
Committer name: mucbuc
Committer date (UTC): 2020-08-25 00:09
Parent(s): 7dc2bb8462a6db28751fc572f796bf57e1710b89
Signing key:
Tree: 5985650b12ff50a0a48f2031fa35e10e414d016c
File Lines added Lines deleted
templates.js 12 7
File templates.js changed (mode: 100755) (index edc5993..470fddf)
... ... const { exec, pushd, popd } = require( 'shelljs' ),
8 8 makeTestDirs(); makeTestDirs();
9 9 generateExample("sample"); generateExample("sample");
10 10
11 function generateExample(name) {
12 const exampleTemplate = 'var result = `' + fs.readFileSync('./res/example.cpp.bp', 'utf8' ) + '`;';
13 const context = { name };
14
11 function compile(template, context) {
12 const source = 'var result = `' + template + '`;';
15 13 vm.createContext(context); vm.createContext(context);
16 vm.runInContext(exampleTemplate, context);
14 vm.runInContext(source, context);
15 return context.result;
16 }
17 17
18 exec('mkdir -p test/src' );
19 fs.writeFileSync( 'test/src/example.cpp', context.result );
18 function generateExample(name) {
19 const template = fs.readFileSync('./blueprint/test/src/example.cpp', 'utf8' );
20 const context = { name };
21 const result = compile(template, context);
22 const dest = 'build/test/src';
23 exec(`mkdir -p ${dest}`);
24 fs.writeFileSync( `${dest}/example.cpp`, result );
20 25 } }
21 26
22 27
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/configs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/configs

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/configs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main