dev
List of commits:
Subject Hash Author Date (UTC)
print commands 054c9efa2ae06a16f05a080b111cb3b1b27f3287 mucbuc 2020-07-05 04:17:28
use green instead of yellow ce503ff8ef3dba2761179ccb56e629542b3e27cd mucbuc 2020-07-04 20:31:01
color output 3d198cf7d4e657ab8ba8d798174116b8336ef258 mucbuc 2020-07-04 20:17:24
explict mode ffc586960df26c70adba18de1ed30616e3057edf mucbuc 2020-07-04 18:11:36
test this 27b7953902d0e3d7a6c3ed73c911690a5e814954 mucbuc 2020-07-04 18:09:59
moreshit 592c64abc5f14a08c094be44f7d19ae6264e36b8 mucbuc 2020-07-04 18:08:56
fix merge conflict ab4ee2b9ebbaa6379bdb83664efae5d45c428e5d mucbuc 2020-07-04 18:01:40
cleanup e363a09bd4cf01d773d3725db73f3465c89bb4e7 mucbuc 2020-07-04 17:58:30
wtf f0af08ef01ec498b6d8be8c6ce5704aa616338d4 mucbuc 2020-07-04 17:56:30
tewst 01ae9b15d3a0af828ba5d43c9c76247a7e94d06c mucbuc 2020-07-04 17:53:45
anoter test fc42db84f208b381ccff11305bb8d81aafe6c2e7 mucbuc 2020-07-04 17:10:17
try it abd7fa98a8b10d1ab31c727b4e5cda32779acd43 mucbuc 2020-07-04 17:06:34
test 9f7ddc555012d5a566580179263acd1803935bee mucbuc 2020-07-04 16:20:14
fix 95efd43ca494e81d3f61c0e17d05935f9a89e85a mucbuc 2020-07-04 16:19:20
fix b7e34312fd89e80bfcabd677fac6a84b03b9db11 mucbuc 2020-07-04 16:18:37
trim fe82d46c140168484164e7e0ca8bbde2679af57e mucbuc 2020-07-04 16:17:41
lint ac97ec59ea764b0f61064b368bcfa4bec570f2af mucbuc 2020-07-04 16:16:09
add edge case 5c6d8754ac762d6006ad0adcd95116d0aac25c92 mucbuc 2020-07-04 16:15:37
format ing 402d250add0d4af976751873d41f97c9212d55b7 mucbuc 2020-07-04 16:14:29
format b4b1830c9bda86af70a7094098377073a571e16c mucbuc 2020-07-04 15:50:55
Commit 054c9efa2ae06a16f05a080b111cb3b1b27f3287 - print commands
Author: mucbuc
Author date (UTC): 2020-07-05 04:17
Committer name: mucbuc
Committer date (UTC): 2020-07-05 04:17
Parent(s): ce503ff8ef3dba2761179ccb56e629542b3e27cd
Signer:
Signing key:
Signing status: N
Tree: 98a365a1872195d0fd90d6dfeb08fed9ad474c3b
File Lines added Lines deleted
base.js 1 1
lint.js 8 2
pre-commit.js 2 2
File base.js changed (mode: 100644) (index 58d4024..ed258b3)
... ... module.exports = {
18 18 }, },
19 19 print: function (message) { print: function (message) {
20 20 cursor.green().write(message).reset().write("\n"); cursor.green().write(message).reset().write("\n");
21 },
21 }
22 22 }; };
File lint.js changed (mode: 100755) (index eb3d00a..0a010ee)
1 1 #!/usr/bin/env node #!/usr/bin/env node
2 2 const { exec } = require("shelljs"), const { exec } = require("shelljs"),
3 { print } = require("./base"),
3 4 files = exec(`git diff --staged --name-only | grep \.js$`).stdout.split("\n"); files = exec(`git diff --staged --name-only | grep \.js$`).stdout.split("\n");
5
6 print(__filename);
7
4 8 if (files.length > 1) { if (files.length > 1) {
5 const params = files.join(" ");
6 exec(`npx prettier --write ${params}`);
9 const params = files.join(" "),
10 command = `npx prettier --write ${params}`;
11 print(command);
12 exec(command);
7 13 } }
File pre-commit.js changed (mode: 100755) (index 2ebea47..821ef42)
... ... const shellExec = require("shelljs").exec,
8 8 return shellExec(cmd); return shellExec(cmd);
9 9 }; };
10 10
11 print("pre-commit");
12 const stagedFiles = exec(`git diff --staged --name-only`,{silent:true}).stdout.split("\n"),
11 print(__filename);
12 const stagedFiles = shellExec(`git diff --staged --name-only`,{silent:true}).stdout.split("\n"),
13 13 hasChanges = stagedFiles.length > 1; hasChanges = stagedFiles.length > 1;
14 14 if (hasChanges) { if (hasChanges) {
15 15 exec("git stash --keep-index -q"); exec("git stash --keep-index -q");
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