{"id":27951987,"url":"https://github.com/matt-d-webb/javascript-quiz-using-json","last_synced_at":"2025-12-12T04:21:53.879Z","repository":{"id":28881203,"uuid":"32405719","full_name":"matt-d-webb/javascript-quiz-using-json","owner":"matt-d-webb","description":"A jquery quiz for scoring multiple choice questions","archived":false,"fork":false,"pushed_at":"2017-04-29T22:54:37.000Z","size":1043,"stargazers_count":16,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-27T09:05:55.821Z","etag":null,"topics":["javascript","json","quiz"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kkos/oniguruma","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matt-d-webb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-17T16:30:44.000Z","updated_at":"2023-02-13T16:24:06.000Z","dependencies_parsed_at":"2022-08-29T20:51:04.879Z","dependency_job_id":null,"html_url":"https://github.com/matt-d-webb/javascript-quiz-using-json","commit_stats":null,"previous_names":["matt-webb/jquery-quiz-using-json"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/matt-d-webb/javascript-quiz-using-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-d-webb%2Fjavascript-quiz-using-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-d-webb%2Fjavascript-quiz-using-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-d-webb%2Fjavascript-quiz-using-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-d-webb%2Fjavascript-quiz-using-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matt-d-webb","download_url":"https://codeload.github.com/matt-d-webb/javascript-quiz-using-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-d-webb%2Fjavascript-quiz-using-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262234612,"owners_count":23279521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","json","quiz"],"created_at":"2025-05-07T16:27:12.893Z","updated_at":"2025-10-03T13:17:24.388Z","avatar_url":"https://github.com/matt-d-webb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Javascript quiz using JSON :star:\n\n[![Code Climate](https://codeclimate.com/github/Matt-Webb/javascript-quiz-using-json/badges/gpa.svg?style=flat-square)](https://codeclimate.com/github/Matt-Webb/javascript-quiz-using-json)\n[![Build Status](https://travis-ci.org/Matt-Webb/javascript-quiz-using-json.svg?branch=master\u0026style=flat-square)](https://travis-ci.org/Matt-Webb/javascript-quiz-using-json)\n[![codecov](https://codecov.io/gh/Matt-Webb/javascript-quiz-using-json/branch/master/graph/badge.svg)](https://codecov.io/gh/Matt-Webb/javascript-quiz-using-json)\n[![devDependencies Status](https://david-dm.org/Matt-Webb/javascript-quiz-using-json/dev-status.svg)](https://david-dm.org/Matt-Webb/javascript-quiz-using-json?type=dev)\n\nThis simple project provides a clean API for rendering quiz questions with multiple choice answers. The data is supplied using [valid JSON](http://jsonlint.com/) and can be retrieved from any url end point which returns the data in the desirable format (see sample data).\n\nEach question is assigned a score, this allows for a range of scores for each question or a specific answer.\n\n###[v0.5.1](https://github.com/Matt-Webb/javascript-quiz-using-json/tree/v0.5.1-alpha)-Alpha\n\nThis project is currently in [ALPHA](https://github.com/Matt-Webb/javascript-quiz-using-json/tree/v0.5.1-alpha) and activity being worked on. [Contributions](./CONTRIBUTE.md) are welcome!\n\n#### Via NPM\n\n`npm i javascript-quiz-using-json`\n\n#### How to use:\n\nAdd the following HTML into your page:\n\n**HTML**\n\n    \u003c!-- dom reference --\u003e\n    \u003cdiv id=\"quizName\"\u003e\u003c/div\u003e\n\n    \u003c!-- quiz package --\u003e\n    \u003cscript src=\"./javascript-quiz-using-json/dist/quiz.umd.min.js\"\u003e\u003c/script\u003e\n\n**JAVASCRIPT**\n\nBasic initialisation.\n\n    Quiz.init({ id: \"quizName\" });  \n\n_Note: this needs to be done after referencing the script shown above._\n\n**Sample JSON**\n\nHere is a sample of the quiz question data:\n\n      {\n          \"question\": \"What year was the film The Terminator released?\",\n          \"info\": \"The Terminator is a 1984 American science fiction action film directed by James Cameron. It stars Arnold Schwarzenegger as the Terminator, a cyborg assassin sent back in time from 2029 to 1984 to kill Sarah Connor (Linda Hamilton), whose son will one day become a savior against machines in a post-apocalyptic future.\",\n          \"options\":\n            [\n              \"1982\",\n              \"1983\",\n              \"1984\",\n              \"1984\"\n            ],\n          \"scores\":\n            [0,3,1,2]\n      }\n\n## CONFIGURATIONS\n\n    var configurations = {\n      id: 'quizName',                  // the element reference within the DOM\n      dataSource: './data.json',       // the json quiz data location\n      randomise: 'false',              // randomise the order of the questions to the user\n      loadingGif: './img/loading.gif', // loading image between rendering\n    };\n\n    Quiz.init(configurations);\n\n\n**HOW TO INSTALL**\n\nPull the package from npm:\n\n`$ npm i javascript-quiz-using-json --save`\n\nInstall dev dependancies:\n\n`$ npm install`\n\nBuild the package:\n\n`$ npm run build`\n\nThis will generate the files in the the `dist` folder, i.e. `dist/quiz.umd.min.js`\n\n### [CONTRIBUTING](./CONTRIBUTE.md)\n\n`$ git clone`\n\n`$ npm install`\n\n`$ npm test`\n\n`$ npm start`\n\n### TO DO\n\n* [ ] Add optional style sheets / using material design / bootstrap\n* [ ] Add charts to result rendering\n* [ ] Add Automated Acceptance Tests\n* [ ] Set up semvar\n* [ ] Abstract the rendered html question into templates for better customisation\n* [ ] Add as npm package\n* [x] Add webpack bundler\n* [x] Remove jquery dependency\n* [x] Move TODOs to issues with need-help flag\n* [x] Update Travis Build\n* [x] Add module bundler\n* [x] Add test coverage badge\n* [x] Refactor json data for better clarity e.g \"answers\" should be \"options\" etc.\n* [x] Configurate as bower package\n* [x] Remove Bower, Switch to npm\n* [x] Add Unit Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt-d-webb%2Fjavascript-quiz-using-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatt-d-webb%2Fjavascript-quiz-using-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt-d-webb%2Fjavascript-quiz-using-json/lists"}