- Clone this repo -
git clone <repo_url> && cd <repo_name>
- Install dependencies -
npm i
- Start the app -
npm start
- Browse to
localhost.8081
/
- straight from catalog/massaged
- catalog processed and combined with additional json files/massaged/json
- download the massaged and combined json
node compare.js <old.json> <new.json>
- compare two massaged json files semantically, ignoring order of links, contents, and subcontents.
- Add the JSON file (must adhere to the structure) into
data
folder. - In
index.js
, require it.
const extraData = require('./data/extra.json');
- In
index.js
, insideaddAdditionalData()
, concat the data.
const dataToAdd = manualData
.concat(gogsData)
.concat(handmadeData)
.concat(extraData)
.map(...);
[
language,
]
language = {
code: 'en',
name: 'English',
englishName: 'English' || '',
direction: 'ltr' || 'rtl',
contents: [
content,
]
}
// Resource for a language
content = {
code: 'ulb',
name: 'Unlocked Literal Bible',
subject: 'Bible' || 'Bible stories' || 'Some other',
description: 'Some text' || '',
checkingLevel: '1' || '2' || '3' || '',
links: [
link,
],
subcontents: [
subcontent,
]
}
// Book/project of a resource
subcontent = {
code: 'gen',
name: 'Genesis',
sort: 0,
category: 'bible-ot' || 'bible-nt',
links: [
link,
]
}
// Same for both content and subcontent
link = {
url: 'https://google.com',
format: 'any',
zipContent: 'any' || '',
quality: 'any' || null,
}
- Name test files
<fileUnderTest>.test.js
. - Put test files in
__test__
folder. - Run
npm test