Fork repo - https://github.com/Sunbird-inQuiry/editor
git clone git@github.com:rajnishdargan/editor.git cd editor git remote add upstream git@github.com:Sunbird-inQuiry/editor.git git remote -v git fetch upstream git checkout -b release-8.0.0 upstream/release-8.0.0 git fetch upstream git merge upstream/release-8.0.0
You got the latest code of release-8.0.0 by following above steps
Check node version
node -v
Use node 18.19.1 or latest of 18
Install dependencies
npm i // root folder
Open three terminals
Terminal1 (Build the library)
ng test questionset-editor-library --watch=true
Terminal2 (Run Demo app) - Once the terminal 1 execution complete then run the terminal2
npm run start
Terminal3
node server.js
or
nodemon server.js
Set the Base URL and API Key in .env file
If .env file is not present create a .env file and add the API key and Base Url as
BASE_URL="dev.sunbirded.org" AUTH_API_TOKEN="--Replace with Actual API Key--" USER_API_TOKEN="";
Update the questionsetEditor config in data.ts file
Update the server.js file as per the need of proxing the API’s locally
Here is one of the sample that can be used
Unzip mock-api folder in root folder
Go to http://localhost:4200/
It will launch the Demo app
To launch Practise Questionset click on Quetsion Set Editor
Note - The type of Primary category or the editor get stored in localstorage to Launch the editor as per another Primary category config clear the localstore manually then Click on The flow as per need.
Questionset Editor (inQuiry default flow used in ED)
Question Editor ( Samagra use case VDN - change the config in data.ts file and Base_URL + API_KEY in .env file)
Survey , Observation, Rubrics (Sikhalokam Flow - VDN Dev)
Once you click on Question Set Editor it will launch the editor locally
For any proxy related changes make necessary changes in proxy.config.json
and server.js
file.
After all the Testing Related to Editor is completed build the web component and change the package version
npm run build-web-component
Change the version in editor/projects/questionset-editor-library/package.json
for angular library.
Change the version in editor/web-component/package.json
for web component.
0 Comments