meteor-postcss
meteor-postcss copied to clipboard
Release 3.0
This PR removes the Fibers dependency and uses async/await instead.
Also fixes package dependency conflicts.
Note: I could have rewritten a lot to ES6 and bump NPM dependencies but I would rather do that in the next PRs.
Am I crazy, or does Meteor itself already support postcss? AFAIK it's already supported without external packages, see this PR from zodern.
:dizzy_face: why didn't I know this... is this mentioned in the docs? Anyway I just did it as a sideeffect for a migration article (which you will see soon :laughing:) but I think for the sake of support we should make this package at least compatible with 3.0.
Maybe adding a warning or something with hint to the respective docs page?
Ok, good that I'm not crazy hehe
I think this package is no longer necessary so it should display a warning about that fact so people can use the standard one. I don't think we should have a version of it for Meteor 3.
I just tested with the tailwind example that I updated to 3.0 Alpha 19 - you can't simply remove this and add minifier-css-postcss
as it throws
* [email protected] <- minifier-css 2.0.0-alpha300.19 <- minifier-css-postcss 1.0.0-beta261.1
Conflict: Constraint [email protected] is not satisfied by minifier-css 2.0.0-alpha300.19.
Constraints on package "minifier-css":
* minifier-css@~2.0.0-alpha300.19 <- top level
* [email protected] <- minifier-css-postcss 1.0.0-beta261.1
=> Your application has errors. Waiting for file change.
CodeFTW uses tailwind and it's working.
Packages:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
react-meteor-data
[email protected]
[email protected]
quave:collections
quave:email-postmark
quave:accounts-passwordless-react
quave:logged-user-react
quave:react-data
quave:admin
quave:synced-cron
quave:slingshot
quave:migrations
release: [email protected]
Tailwind.config.js
/** @type {import('tailwindcss').Config} */
/* eslint-disable */
module.exports = {
content: [
'./imports/**/*.{js,jsx,ts,tsx}',
'./client/**/*.{js,jsx,ts,tsx}',
'./client/*.html',
],
theme: {
extend: {
colors: {
primary: {
50: '#F2F8ED',
100: '#E5F0DB',
200: '#CBE1B7',
300: '#B1D293',
400: '#98C36F',
500: '#80B54D',
600: '#65903C',
700: '#4B6C2D',
800: '#32481E',
900: '#182111',
},
neutral: {
100: '#F8F9FA',
150: '#F0F1F3',
200: '#E1E3E8',
300: '#CBCFD6',
500: '#4B5563',
600: '#424B58', // T
},
},
},
},
plugins: [
require('@tailwindcss/typography'),
require('@tailwindcss/line-clamp'),
require('@tailwindcss/forms'),
],
};
.postcssrc.js
module.exports = (ctx) => {
// This flag is set when loading configuration by this package.
if (ctx.meteor) {
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
if (ctx.env === 'production') {
// "autoprefixer" is reported to be slow,
// so we use it only in production.
config.plugins.autoprefixer = {
overrideBrowserslist: ['defaults'],
};
}
return config;
} else {
return {};
}
};
Quave's meteor-template as well https://github.com/quavedev/meteor-template/tree/meteor-3
@jankapunkt were you able to find the problem in your example project?
Are there any blockers to merge this and release a new version?
@jankapunkt what is the status here? If everything is fine on your end I'm happy to release.
cc @jankapunkt @StorytellerCZ Can we a beta release that's compatible with the latest RC?
So i cannot publish due to an error I don't understand:
=> Errors while initializing project:
While loading plugin `minifier-postcss` from package `juliancwirko:postcss`:
packages/modules-runtime.js:222:12: Cannot find module 'postcss'
at makeMissingError (packages/modules-runtime.js:222:12)
at Module.require (packages/modules-runtime.js:241:17)
at Module.moduleLink
(/home/jankapunkt/.meteor/packages/modules/.0.20.0.17ptybp.ylkxi++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
at packages/minifier-postcss/plugin/minify-css.js:1:21
at module (packages/minifier-postcss/plugin/minify-css.js:260:2)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at <runJavaScript-21>:301:1
at <runJavaScript-21>:306:3
Seems to be related to #15 but I don't know how to get around this
Ok, good that I'm not crazy hehe
I think this package is no longer necessary so it should display a warning about that fact so people can use the standard one. I don't think we should have a version of it for Meteor 3.
We moved our tailwind project from meteor 2 with juliancwirko:postcss to meteor 3.0rc0 with standard-minifier-css successfully.
So instead, I think this package should be removed from Meteor-Community-Packages to avoid even more confusion or at least in tell in the doc that it's not needed with meteor 3 with a link to the doc