-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add manifest.json in third-party folders (#1325)
- Loading branch information
Conrad Chan
authored
Feb 10, 2021
1 parent
2fcae6a
commit b2e64d8
Showing
3 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-console */ | ||
const fs = require('fs'); | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const [node, script, assetsVersion, libName, libVersion, manifestPath] = process.argv; | ||
|
||
if (!(assetsVersion && libName && libVersion && manifestPath)) { | ||
console.log('Missing required arguments'); | ||
process.exit(1); | ||
} | ||
|
||
const manifestStr = fs.readFileSync(manifestPath); | ||
const parsedManifest = JSON.parse(manifestStr); | ||
parsedManifest.version = assetsVersion; | ||
parsedManifest.dependencies[libName] = libVersion; | ||
|
||
fs.writeFileSync(manifestPath, JSON.stringify(parsedManifest, null, 4)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "text", | ||
"description": "Third-party static assets used for the Preview text viewers", | ||
"version": "0.114.0", | ||
"dependencies": { | ||
"highlightjs": "9.7.0", | ||
"papaparse": "4.1.2", | ||
"remarkable": "1.7.1" | ||
} | ||
} |