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

Make Sass missing message friendlier #4514

Merged
merged 5 commits into from
Sep 26, 2018
Merged

Conversation

Timer
Copy link
Contributor

@Timer Timer commented May 24, 2018

Before:

After:

Copy link
Contributor

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

See above. Seems better overall.

lines[1] = 'You need to install `node-sass` to compile Sass files.\n';
lines[1] +=
'Please run `npm i node-sass` or `yarn add node-sass` inside your workspace.';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does npm command need save? What if they use an older npm?

@@ -101,6 +101,12 @@ function formatMessage(message, isError) {
);
}

if (lines[1].match(/sass-loader.+node-sass.+install/)) {
lines[1] = 'You need to install `node-sass` to compile Sass files.\n';
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe “To import Sass files in this project, you [...]”

@Timer Timer merged commit 1448b24 into facebook:next Sep 26, 2018
@Timer Timer deleted the sass-message branch September 26, 2018 15:22
- [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign).
- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise).
- [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch).
Note that **this project includes no [polyfills](https://en.wikipedia.org/wiki/Polyfill)** by default.

If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this section link to our polyfill instructions?

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants