Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ you don't accidentally add something that we are also working on.
- Run `npm run build` to build the project and generate a production version of
the js files, which are much smaller than the development version. It
generates an ES2017 version of the js files under dist/lforms. For details on
the files to load, see ["Usng the LHC-Forms Web Component"](#using).
the files to load, see ["Using the LHC-Forms Web Component"](#using).
The `dist` directory is deleted and recreated during the process.

The build also concatenates all the js files (except for zone.min.js and the
Expand Down
7 changes: 7 additions & 0 deletions bin/build-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const fs = require('fs');
const packageJson = require('../package.json');

fs.writeFileSync('src/version.json', JSON.stringify({
lformsVersion: packageJson.version
}));

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"build:init": "npm run build:clean && shx mkdir -p dist/$npm_package_name && shx cp src/index.js dist && npm run build:version && npm run build:language",
"build:prepare-zip": "node prepare-zip.js",
"build:zip": "cd dist; shx mv $npm_package_name $npm_package_name-$npm_package_version; bestzip $npm_package_name-$npm_package_version.zip $npm_package_name-$npm_package_version/*; shx mv $npm_package_name-$npm_package_version $npm_package_name",
"build:version": "node -e 'require(\"fs\").writeFileSync(\"src/version.json\", JSON.stringify({lformsVersion: require(\"./package.json\").version}))'",
"build:version": "node bin/build-version.js",
"build:language": "node bin/build-locale.js $npm_package_config_localeID",
"test:fhir-unit": "karma start test/karma.conf.js",
"test:ng-unit": "ng test --watch=false",
Expand Down