seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Split sublevel theme types into new file #71

Closed jonseitz closed 4 years ago

jonseitz commented 4 years ago

The existing method of declaring all the theme types as part of the styled-components namespace was breaking when the library was published, since none of those themes were being exported and thus were missing when Theme/utils.ts tried to import them. This moves those sub-levels into the ThemeTypes.ts file (which will be compiled/exported), then declares the ValidThemeValues as part of the utils module itself.

As a quick and dirty way to test the compiled mark-one with course planner:

In local version of mark-one:

  1. Remove any existing lib directory: rm -rf ./lib
  2. compile the code: npm run prepublishOnly

In course-planner:

  1. run npm install
  2. remove the existing lib directory from the installed version of mark-one: rm -rf node_modules/mark-one/lib
  3. copy the built version of mark-one into node_modules: cp -r /path/to/mark-one/lib node_modules/mark-one/lib

Related to seas-computing/course-planner#242