Add document data model and validation
Define the sections/records/items schema with secret-flagged fields and a validator with tests. build.js bundles model.js. The PDF-derived seed lives in the gitignored data/ directory. Closes #3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2
build.js
2
build.js
@@ -10,7 +10,7 @@ const read = (p) => readFileSync(join(root, 'src', p), 'utf8');
|
||||
const out = read('index.html')
|
||||
.replace('/*__CSS__*/', () => read('style.css'))
|
||||
// Plain-script bundle: drop ES `export` so modules concatenate into one scope.
|
||||
.replace('/*__JS__*/', () => [read('crypto.js').replace(/^export /gm, ''), read('app.js')].join('\n'))
|
||||
.replace('/*__JS__*/', () => ['crypto.js', 'model.js'].map((f) => read(f).replace(/^export /gm, '')).concat(read('app.js')).join('\n'))
|
||||
.replace('/*__PAYLOAD__*/', () => '');
|
||||
|
||||
mkdirSync(join(root, 'dist'), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user