Skip to content

Commit 5ca8fae

Browse files
committed
changing build dir
1 parent 67b5f12 commit 5ca8fae

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"node": ">=20"
88
},
99
"scripts": {
10+
"setup": "./scripts/setup.sh",
1011
"lint": "eslint .",
1112
"build": "node src/build.js",
1213
"lint:fix": "eslint . --fix",

scripts/setup.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
3+
# This script sets up the data-model-draft build environment
4+
5+
# working dir fix
6+
scriptsFolder=$(cd $(dirname "$0"); pwd)
7+
cd $scriptsFolder/..
8+
9+
# check for well known prereqs that might be missing
10+
hash git 2>&- || { echo >&2 "I require git."; exit 1; }
11+
hash npm 2>&- || { echo >&2 "I require node and npm."; exit 1; }
12+
13+
echo "
14+
Installing Node modules from 'package.json' if necessary...
15+
"
16+
npm install
17+
18+
if [ ! -d dist ]
19+
then
20+
echo "
21+
Setting up 'dist' folder for publishing to GitHub pages...
22+
"
23+
git clone -b gh-pages git@github.com:healthdatasafe/data-model-draft.git dist
24+
fi
25+
26+
echo "
27+
28+
29+
If no errors were listed above, the setup is complete.
30+
See the README for more info on writing and publishing.
31+
"

src/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require('fs');
22
const path = require('path');
33

4-
const basePath = path.resolve(__dirname, '../docs');
4+
const basePath = path.resolve(__dirname, '../dist');
55

66
const { itemsById } = require('./items');
77

0 commit comments

Comments
 (0)