List of commits:
Subject Hash Author Date (UTC)
consolidate 7e829f7e8ed6a7e5f783c0b0819643575f12a466 mucbuc 2020-01-27 13:57:24
objective ba898495090457a37d56b7d6398c2951a3e7b85b mucbuc 2020-01-27 13:47:44
usage example 7b04228abbef46e4821429dcaaee7f279cc81024 mucbuc 2020-01-27 13:35:59
cleanup 444da418ea31cbead2c41ce85d5acfb468faee79 mucbuc 2020-01-27 13:17:10
reading from prjetect dir 9b8e0802d9549e52041ffadeb085dae7f2b186b1 mucbuc 2020-01-27 06:12:39
formt script f991001a06fa70aed0c656635cf5d1c22b896652 mucbuc 2020-01-27 06:07:22
format 820f8f81267baf5de99a0115ff6e79efcc361f7a mucbuc 2020-01-27 06:06:19
first pass 0d21989109ebba5aa9ce330612da271998b7a441 mucbuc 2020-01-27 06:06:00
Commit 7e829f7e8ed6a7e5f783c0b0819643575f12a466 - consolidate
Author: mucbuc
Author date (UTC): 2020-01-27 13:57
Committer name: mucbuc
Committer date (UTC): 2020-01-27 13:57
Parent(s): ba898495090457a37d56b7d6398c2951a3e7b85b
Signing key:
Tree: fdc1d6c7269e86caaf609e31f9986c71cbc87deb
File Lines added Lines deleted
index.js 10 6
File index.js changed (mode: 100755) (index 7197327..0f44c5f)
... ... const fs = require("fs"),
7 7 const [, , templatePath, projectPath] = process.argv; const [, , templatePath, projectPath] = process.argv;
8 8
9 9 if (templatePath && projectPath) { if (templatePath && projectPath) {
10 const script = "result = `" + fs.readFileSync(templatePath, "utf8") + "`;",
11 interface = fs.readFileSync(path.join(projectPath, "src", "interface.h")),
12 package = getPackage(projectPath);
10 const script = "result = `" + readFile(templatePath) + "`;",
11 interface = readFile(path.join(projectPath, "src", "interface.h")),
12 package = readJSON(path.join(projectPath, "package.json"));
13 13
14 14 let context = { let context = {
15 15 title: package.name, title: package.name,
16 16 interface, interface,
17 17 objective: package.objective objective: package.objective
18 18 }; };
19
19 20 vm.createContext(context); vm.createContext(context);
20 21 vm.runInContext(script, context); vm.runInContext(script, context);
21 22
22 23 console.log(context.result); console.log(context.result);
23 24 } }
24 25
25 function getPackage(projectPath) {
26 let package = fs.readFileSync(path.join(projectPath, "package.json"), "utf8");
27 return JSON.parse(package);
26 function readJSON(projectPath) {
27 return JSON.parse(readFile(projectPath));
28 }
29
30 function readFile(path) {
31 return fs.readFileSync(path, "utf8");
28 32 } }
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/doc-tool

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

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/doc-tool

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