npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

whjr-quiz-sdk

v5.10.46

Published

This library available at [quiz-sdk](https://github.com/WHJR2-0/quiz-sdk/pkgs/npm/quiz-sdk/versions)

Downloads

211

Readme

quiz-sdk

This library available at quiz-sdk

Brief:

Quiz is a common feature used across Byju ecosystem companies like Whitehat, Byju, Toppr. So there was a need to unify the effort to make a World class Quiz Platform to be consumed by each company.

Important Instruction

  1. if any operationId in swagger-doc is added or updated, please update the serverhandler in mock to avoid UT failing.
  2. if you add any new type of question, please add max-attempt-limit in utils/getValidAttemptsNoForQuestion file.
  3. Please use the svg for icon, if icon can be used in many place by just changing the color. see step in shared/icons/index file.

Installation / requirements

  1. nvm (node package manager)
  2. yarn (npm i yarn -g)

Installing quiz-sdk package

  • create .npmrc file in the root of the project repo
  • add below line of code to .npmrc file.
  • @WHJR2-0:registry=https://npm.pkg.github.com
  • Create your personal Token on github (profile -> settings -> developer setting -> personal token ). This is one time job. https://github.com/settings/apps
  • Run below command
  • npm login --registry=https://npm.pkg.github.com
  • password = Personal token
  • Try npm install
  • NOTE: DON'T PUSH .npmrc file (keep it local to your machine)
  • Lastly, npm i @WHJR2-0/quiz-sdk

Tech Stack

  • Package Manager: Yarn
  • UI Library: React
  • Scripting Language: Typescript
  • Unit test case library: React-testing-library and Jest
  • CICD integration: github
  • i18n: react-intl
  • Error, alerts and Monitoring: Datadog
  • API lib for rest: Swagger client
  • CSS framework: Tailwind CSS

available scripts

In the project directory, you can run

nvm use && yarn start

Runs the app in the development mode Open http://localhost:3006 to view it in the browser.

nvm use && yarn test

Launches the test runner in the interactive watch mode.

nvm use && yarn twc-build

To create the css file with all available classes before start of development.
It is also in-build with start and 'babel-build` script

nvm use && yarn babel-build

it is for final package build which create dist folder.

Important file and folders

  1. src/lib main folder for our code
    • apis : contain swagger and apollo client and responsible for API call
    • assets : for images and svgs
    • components : contains all component for all pages
    • constants : contain constants for testing role-label, data-testid, app
    • lang : have all language files for internationlization
    • pages : contain all pages
    • themes : conatin theme like default, dark
    • typings: have configuration for typescript type for packages
    • utils: conatin important helper function like get, coookie, timeWorker ...
    • index.css : main glocal css file with all classes while dev mode and used classes for production mode
    • index.ts : entry point for our package
  2. src/condig/key file for client custom variable like theme, apollo-client url, quiz-id, tenantid
  3. src/index/tsx file that is Entry point for our library
  4. src/tailwind.css file for all tailwindcss in-build and custom classes
  5. src/setupTests.ts file to setup environment for test, mocking for browser API like web-worker, localStorage
  6. tailwind.config.js very important file to add custom color, variant

License

All rights reserved under WhiteHatjr.