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

Don't compile .css files in directories to themselves #862

Merged
merged 2 commits into from
Oct 29, 2019
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Oct 25, 2019

This also adds support for compiling .css files in directories at
all
, which had previously only worked in --watch mode.

Closes #853

This also adds support for compiling .css files in directories *at
all*, which had previously only worked in --watch mode.

Closes #853
@nex3 nex3 requested a review from Awjin October 25, 2019 22:08
Copy link
Contributor

@Awjin Awjin left a comment

Choose a reason for hiding this comment

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

LGTM

if (_isEntrypoint(path))
if (_isEntrypoint(path) &&
// Don't compile a CSS file to its own location.
(source != destination || p.extension(path) != '.css'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Total nit: might be clearer deMorgans'ed:

!(source == destination && p.extension(path) == '.css')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@nex3 nex3 merged commit 3392db0 into master Oct 29, 2019
@nex3 nex3 deleted the watch-loop branch October 29, 2019 23:48
@jakeparis
Copy link

What is the advantage of compiling a .css file?

@nex3
Copy link
Contributor Author

nex3 commented Oct 30, 2019

Some people use Sass as a way of minifying their plain CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--watch infinite loop
3 participants