-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/LF-3098/remove-npm-ci-in-demo' into 'master'
Fixed package.json so we don't need to remember to run (cd demo && npm ci) See merge request lfor/fhirpath.js!19
- Loading branch information
Showing
5 changed files
with
743 additions
and
753 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
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 @@ | ||
/** | ||
* This file contains code to run "npm ci" in the demo directory if it exists. | ||
* The demo directory has been excluded from the npm package, and the presence | ||
* of the demo directory is a signal that we are working with the source code. | ||
*/ | ||
const { spawn } = require('child_process'); | ||
const path = require('path'); | ||
const fs = require("fs"); // Or `import fs from "fs";` with ESM | ||
|
||
const demoDir = path.join(__dirname, '../demo'); | ||
|
||
if (fs.existsSync(demoDir)) { | ||
console.log('Installing node modules in the demo directory...'); | ||
spawn('npm', ['ci'], { | ||
cwd: demoDir, | ||
stdio: 'inherit' | ||
}); | ||
} |
Oops, something went wrong.