<aside> 💡 Please use Node v14, preferably v14.15.0. Recommend usage of Node Version Manager.

</aside>

Creating & Improving Dynamic Data

For this section, the new data source will be known as ‘Data Source X’

  1. Fork the Dynamic Data repo

  2. Clone the newly forked repo

  3. Yarn install in root repo folder (dynamic-data)

  4. Either duplicate the folders that belong to a specific package (e.g. oura-data and oura-mockups) or import the two folders found at Dylan-Finney/dynamic-data-template and import them into dynamic-data/packages/

  5. Rename the folders to be prefixed by the new data source, e.g. data-source-x-data and data-source-x-mockups

  1. Inside each of the package.json files in both folders,

    1. change the name property to reflect the change
    2. change the description to match the new data source

    c. for the data-source-x-mockups package.json, change the dependency for the test-data to data-source-x-data and change the version to the version of that package

    d.   in the scripts, change the selectProjects argument to be equal to the new package name

  1. Create .js files to capture static anonymised data from the data source either from exports or API documentation

  1. Make the library export the files

  1. Yarn build, fix any errors that arise. if any changes are made to the functions in this package afterwards, make sure to rebuild

  2. In the tests folder in data-source-x-data, create jest functions that test to see if the data is valid. Note the .js uses require, .mjs uses import