Skip to content
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

Clean up the public API file and improve a few other things #550

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/encore.js
Expand Up @@ -12,7 +12,7 @@

const parseRuntime = require('../lib/config/parse-runtime');
const context = require('../lib/context');
const chalk = require('chalk');
const chalk = require('chalk').default;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... it doesn't change anything at runtime since require('chalk') is the same thing than require('chalk').default but it seems that due to how chalk is typed, VSCode (which uses TypeScript to resolve things) doesn't find its properties if you don't specify the .default:

image

image

const logger = require('../lib/logger');

const runtimeConfig = parseRuntime(
Expand Down Expand Up @@ -40,7 +40,7 @@ if (!runtimeConfig.isValidCommand) {
}
showUsageInstructions();

process.exit(1);
process.exit(1); // eslint-disable-line no-process-exit
}

if (runtimeConfig.helpRequested) {
Expand Down