Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Add autoprefixer and cssnano support #419

Merged
merged 2 commits into from
Aug 8, 2017

Conversation

pdehaan
Copy link
Collaborator

@pdehaan pdehaan commented Aug 4, 2017

Adds autoprefixer support and cssnano minification.

Fixes #143

@@ -8,3 +8,4 @@ public/polyfill.min.js
static/*
!static/info.txt
test/frontend/bundle.js
public/main.css
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved the public/main.css file to frontend/src/main.css. Then npm run build:css does the whole autoprefixer, media query combining, minification and source map magic and copies the processed file back into the old public/main.css location.

browserslist Outdated
not last 2 Opera versions
not last 2 OperaMini versions
not last 2 OperaMobile versions
not last 2 UCAndroid versions
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I totally made all this up. LOLOLOL.

};

if (conf.env === 'development') {
options.map = { inline: true };
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I only enabled sourcemaps in dev mode. We can adjust this as much as anybody cares... like maybe we dont want minification on the dev server, etc.

@dannycoates
Copy link
Contributor

@pdehaan can you rebase? LGTM, but what do I know about css 🤷‍♂️

@pdehaan
Copy link
Collaborator Author

pdehaan commented Aug 7, 2017

Hey @bwinton, mind taking a 👁 as the highest ranking CSS Czar?

@pdehaan
Copy link
Collaborator Author

pdehaan commented Aug 7, 2017

Alternatively, we could convert the source to Sass and run scss-lint against the frontend/src/*.scss, and run the stylelint compatibility check only against the compiled autoprefixer vendored output in public/*css.

Copy link

@bwinton bwinton left a comment

Choose a reason for hiding this comment

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

Seems fine to me, although there aren't a lot of CSS changes… 🙂 I say ship it.

@dannycoates dannycoates merged commit 9dab748 into mozilla:master Aug 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add autoprefixer support?
3 participants