Skip to content

Commit 24ea9ce

Browse files
committed
Checkout git branch optimized
1 parent 6c1c3bf commit 24ea9ce

File tree

5 files changed

+286
-283
lines changed

5 files changed

+286
-283
lines changed

extras/sync-version.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import NpmPackageHelper from '@lenne.tech/npm-package-helper';
2+
import { join } from 'path';
3+
4+
// Sync version of package.json and package-lock.json
5+
const run = () => {
6+
// Init
7+
const nph = NpmPackageHelper;
8+
const dir = process.cwd();
9+
10+
// Set highest version
11+
nph
12+
.setHighestVersion([
13+
nph.getFileData(join(dir, 'package-lock.json')),
14+
nph.getFileData(join(dir, 'package.json'))
15+
])
16+
.then(version => {
17+
// Log version
18+
console.log(version);
19+
});
20+
};
21+
run();

0 commit comments

Comments
 (0)