Skip to content

Commit

Permalink
Merge branch 'bugfix/LF-3098/remove-npm-ci-in-demo' into 'master'
Browse files Browse the repository at this point in the history
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
yuriy-sedinkin committed Aug 30, 2024
2 parents c057867 + f0cbc95 commit c50b820
Show file tree
Hide file tree
Showing 5 changed files with 743 additions and 753 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This log documents significant changes for each release. This project follows
[Semantic Versioning](http://semver.org/).

## [3.15.2] - 2024-08-30
### Fixed
- Removed the need to run `(cd demo && npm ci)`.
- Excluded unnecessary files from the npm package.

## [3.15.1] - 2024-08-06
### Fixed
- Return data type for `evaluate` and `compile` in TypeScript type declarations.
Expand Down
18 changes: 18 additions & 0 deletions bin/install-demo.js
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'
});
}
Loading

0 comments on commit c50b820

Please sign in to comment.