I have a constant library that has many files such as the following structure:
#1 index.ts
#2 src/
- contact.ts
- const first = [];
- const second = [];
- const third = [];
- location.ts
- const first = '';
- const second = '';
- const third = '';
Is it possible to import and export all of the constants from each file into index.ts such that I can import into a project such as the following:
// Imports: Constants
import { constants } from '@jeff/constants-library';
console.log(constants.contact.first);
console.log(constants.contact.second);
console.log(constants.contact.third);
What is the fastest/most efficient way to dynamically export the constants from my library files so I can import the into my projects?