Skip to content

CSS Format/Minify Tool - #29

Merged
dlford merged 9 commits into
developertools-tech:devfrom
nosecreek:css-minify
Oct 6, 2022
Merged

dlford merged 9 commits into
developertools-tech:devfrom
nosecreek:css-minify

Conversation

@nosecreek

@nosecreek nosecreek commented Oct 5, 2022 •

Copy link
Copy Markdown
Contributor

Type of Pull Request

  • Bug fix
  • Enhancement

Related Issue #s or links (if any):
#14

Description of Changes

Added a CSS page which includes a formatter and minifier.

Note: minification is not currently available for SCSS/LESS. SCSS cannot currently be run in the browser (see sass/dart-sass#25).

@dlford dlford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@nosecreek Great job on this! I just have a couple notes if it's not too much trouble.

Comment thread __TESTS__/css.spec.tsx
expect(formattedCss.innerHTML).toContain('background: #ffffff;');
expect(formattedCss.innerHTML).toContain('\n');
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we also test that minify works correctly?

Comment thread __TESTS__/css.spec.tsx Outdated
css,
'body{background:#ffffff;}'.replace(/[{[]/g, '$&$&'),
);
expect(formattedCss.innerHTML).toContain('body {');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather see us match exact output here, like the JSON tests.

@nosecreek

Copy link
Copy Markdown
Contributor Author

I think those are both great suggestions. Should be fixed by the latest commit.

@dlford

dlford commented Oct 6, 2022

Copy link
Copy Markdown
Member

@nosecreek Great, thank you!

@dlford dlford added the hacktoberfest-accepted This PR will be counted for Hacktoberfest label Oct 6, 2022
@dlford
dlford merged commit 60e9c14 into developertools-tech:dev Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted This PR will be counted for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants