-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore/script to module #960
base: main
Are you sure you want to change the base?
chore/script to module #960
Conversation
|
Thank you @carlosallexandre , will take a look. Any reason |
This makes the path to it into Now, the tsup configuration build to const __filename = fileURLToPath(import.meta.url);
const rootPkg = path.resolve(
path.dirname(__filename),
process.env.NODE_ENV === 'test' ? '../' : '../../'
);
const defaultCollectionFilesDir = path.join(rootPkg, 'default-files-for-collections'); otherwise, if we keep the
const __filename = fileURLToPath(import.meta.url); // `bin/dist/eventcatalog.?(c)js`
const scriptsDir = path.resolve(
path.dirname(__filename),
process.env.NODE_ENV === 'test' ? '.' : '../../scripts/'
);
const defaultCollectionFilesDir = path.join(scripts, 'default-files-for-collections'); I chose not specify the
What I see with futures PR is
|
Motivation
It turns the following scripts into modules:
generate
,log-build
,watcher
andhydrate
.This way, we execute the modules inside the respectively cli commands instead of executing them with
node
defined intopackage.json
. Doing that brings us the possibility to measure the time spent with each function and post to the analytics in future improvements.