Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Is it dead? #139

Open
SanichKotikov opened this issue May 10, 2021 · 12 comments
Open

Is it dead? #139

SanichKotikov opened this issue May 10, 2021 · 12 comments

Comments

@SanichKotikov
Copy link

Last update 2 year ago... Doesn't work with PostCSS v8 correctly.

Is there any other way to compile scss in PostCSS?

@Alexufo
Copy link

Alexufo commented May 16, 2021

When I start to move project to to postcss it become with dead plugins. Nice.

@paulshryock
Copy link

paulshryock commented Aug 19, 2021

@jonathantneal, is this project abandoned?

@Antmatveev
Copy link

When I start to move project to to postcss it become with dead plugins. Nice.

i have the same

@paulshryock
Copy link

This plugin is no longer recommended by PostCSS as it appears to be no longer maintained.

@AntonioRedondo
Copy link

AntonioRedondo commented Dec 23, 2021

There is this 3rd-party pull request #142 to update PreCSS to the latest version of PostCSS. Not approved or merged yet.

If this pull request isn't merged and PreCSS definitively dies, recreating the functionality of it is pretty easy. PreCSS is no more than 6 PostCSS plugins bundled together with no extra functionality.

Check PreCSS's index.js:

// tooling
import postcss from 'postcss';
import postcssAdvancedVariables from 'postcss-advanced-variables';
import postcssAtroot from 'postcss-atroot';
import postcssExtendRule from 'postcss-extend-rule';
import postcssNested from 'postcss-nested';
import postcssPresetEnv from 'postcss-preset-env';
import postcssPropertyLookup from 'postcss-property-lookup';

// plugin chain
const plugins = [
	postcssExtendRule,
	postcssAdvancedVariables,
	postcssPresetEnv,
	postcssAtroot,
	postcssPropertyLookup,
	postcssNested
];

// plugin
export default postcss.plugin('precss', rawopts => {
	// initialize options, defaulting preset-env to stage 0 features
	const opts = Object.assign({ stage: 0 }, rawopts);

	// initialize all plugins
	const initializedPlugins = plugins.map(
		plugin => plugin(opts)
	);

	// process css with all plugins
	return (root, result) => initializedPlugins.reduce(
		(promise, plugin) => promise.then(
			() => plugin(result.root, result)
		),
		Promise.resolve()
	);
});

Adding these plugins to your own PostCSS configuration without PreCSS is pretty easy:

// In some webpack.config.js or gulpfile.js:

const postcss = require('postcss');
const postcssAdvancedVariables = require('postcss-advanced-variables');
const postcssAtroot = require('postcss-atroot');
const postcssExtendRule = require('postcss-extend-rule');
const postcssNested = require('postcss-nested');
const postcssPresetEnv = require('postcss-preset-env');
const postcssPropertyLookup = require('postcss-property-lookup');

postcss([
	postcssAdvancedVariables(),
	postcssAtroot(),
	postcssExtendRule(),
	postcssNested(),
	postcssPresetEnv(),
	postcssPropertyLookup(),
]));

@Antonio-Laguna
Copy link
Member

The answer to this question is no, it's not dead. Maintenance on these projects was a bit halted in general for over 2 years. There are many things to be doing and we're doing our best.

Thanks for your patience and your help with PRs 😄

Estaba tomando cañas (▶️)

@lelukas
Copy link

lelukas commented Mar 19, 2022

What about now? is it dead?

@Vheissu
Copy link

Vheissu commented May 24, 2022

This project is dead for sure. Thank you to @AntonioRedondo for a viable replacement.

@toFrankie
Copy link

Are there other options?

@toFrankie
Copy link

Oh, precss

@cage1618
Copy link

cage1618 commented Jan 31, 2023

https://www.npmjs.com/package/precsss

fork from precss, insted it.

@romainmenke
Copy link
Member

Yes, it is dead :)
Archiving this to make it clearer

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

No branches or pull requests