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:
Remove any existing lib directory: rm -rf ./lib
compile the code: npm run prepublishOnly
In course-planner:
run npm install
remove the existing lib directory from the installed version of mark-one: rm -rf node_modules/mark-one/lib
copy the built version of mark-one into node_modules: cp -r /path/to/mark-one/lib node_modules/mark-one/lib
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:
rm -rf ./lib
npm run prepublishOnly
In course-planner:
npm install
rm -rf node_modules/mark-one/lib
cp -r /path/to/mark-one/lib node_modules/mark-one/lib
Related to seas-computing/course-planner#242