Subject | Hash | Author | Date (UTC) |
---|---|---|---|
lint script | 2dbb52ebe6853b3e79c49ceab9e9201776910c30 | mucbuc | 2020-07-04 04:38:28 |
wtf | 90500373a23c05b472a816733904b900e0e20e79 | mucbuc | 2020-07-04 04:36:07 |
working on pre-commit | afd729a52c43696c5fdd70c447284e0725f2b6f4 | mucbuc | 2020-07-04 02:07:03 |
--keep-index | a28f4552baea3b98bd383f02c992746d2977084e | mucbuc | 2020-07-04 01:58:26 |
working on git stash | f44be88386cd5df0a978939e7f61a42ddd3a571a | mucbuc | 2020-07-04 01:53:49 |
package.json | 577110fa840e9fc6898d686187d238303c1572f5 | mucbuc | 2020-07-04 01:46:18 |
package.json | f2145b49657d8f6d4f10e270626b4278cf91795d | mucbuc | 2020-07-04 01:46:12 |
.gitignore | 2797eaf7a12411681bd380bb1f5a021337c5eb79 | mucbuc | 2020-07-04 01:46:00 |
pre-commit | 40f40138789c46d1e3343da52f80a5ce137e568a | mucbuc | 2020-07-04 01:45:29 |
File | Lines added | Lines deleted |
---|---|---|
pre-commit.js | 3 | 8 |
File pre-commit.js changed (mode: 100755) (index 9df797b..29a0fd7) | |||
1 | 1 | #!/usr/bin/env node | #!/usr/bin/env node |
2 | 2 | ||
3 | 3 | const shell = require('shelljs'), | const shell = require('shelljs'), |
4 | fs = require( 'fs' ); | ||
4 | fs = require( 'fs' ), | ||
5 | { tryAndRunScript } = require( './base' ); | ||
5 | 6 | ||
6 | 7 | console.log('pre-commit'); | console.log('pre-commit'); |
7 | 8 | shell.exec( 'git stash --keep-index' ); | shell.exec( 'git stash --keep-index' ); |
8 | 9 | //shell.exec( 'git status' ); | //shell.exec( 'git status' ); |
9 | try { | ||
10 | fs.accessSync('./lint.js' ); | ||
11 | shell.exec( './lint.js' ); | ||
12 | } catch (err) { | ||
13 | console.log( "Skippking lint step" ); | ||
14 | } | ||
15 | |||
10 | tryAndRunScript('lint'); | ||
16 | 11 | shell.exec( 'git stash pop' ); | shell.exec( 'git stash pop' ); |
17 | 12 |