From ef3369c5b8ec341aefa389b02448727f0c29f3a2 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 1 Dec 2022 17:11:51 +0100 Subject: [PATCH] drop --postcss flag --- src/oxide/cli/index.ts | 26 ++------------------------ src/oxide/cli/init/index.ts | 16 ---------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/src/oxide/cli/index.ts b/src/oxide/cli/index.ts index 14e387250..ca6b9263c 100644 --- a/src/oxide/cli/index.ts +++ b/src/oxide/cli/index.ts @@ -19,15 +19,7 @@ function isESM() { } } -let configs = isESM() - ? { - tailwind: 'tailwind.config.cjs', - postcss: 'postcss.config.cjs', - } - : { - tailwind: 'tailwind.config.js', - postcss: 'postcss.config.js', - } +let configs = isESM() ? { tailwind: 'tailwind.config.cjs' } : { tailwind: 'tailwind.config.js' } // --- @@ -52,9 +44,7 @@ let commands = { run: init, args: { '--full': { type: Boolean, description: `Initialize a full \`${configs.tailwind}\` file` }, - '--postcss': { type: Boolean, description: `Initialize a \`${configs.postcss}\` file` }, '-f': '--full', - '-p': '--postcss', }, }, build: { @@ -74,23 +64,11 @@ let commands = { type: String, description: 'Content paths to use for removing unused classes', }, - '--purge': { - type: String, - deprecated: true, - }, - '--postcss': { - type: oneOf(String, Boolean), - description: 'Load custom PostCSS configuration', - }, '--minify': { type: Boolean, description: 'Minify the output' }, '--config': { type: String, description: 'Path to a custom config file', }, - '--no-autoprefixer': { - type: Boolean, - description: 'Disable autoprefixer', - }, '-c': '--config', '-i': '--input', '-o': '--output', @@ -114,7 +92,7 @@ if ( help({ usage: [ 'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]', - 'tailwindcss init [--full] [--postcss] [options...]', + 'tailwindcss init [--full] [options...]', ], commands: Object.keys(commands) .filter((command) => command !== 'build') diff --git a/src/oxide/cli/init/index.ts b/src/oxide/cli/init/index.ts index 560caaa0f..5bf8af270 100644 --- a/src/oxide/cli/init/index.ts +++ b/src/oxide/cli/init/index.ts @@ -23,22 +23,6 @@ export function init(args, configs) { messages.push(`Created Tailwind CSS config file: ${path.basename(tailwindConfigLocation)}`) } - if (args['--postcss']) { - let postcssConfigLocation = path.resolve(`./${configs.postcss}`) - if (fs.existsSync(postcssConfigLocation)) { - messages.push(`${path.basename(postcssConfigLocation)} already exists.`) - } else { - let stubFile = fs.readFileSync( - path.resolve(__dirname, '../../../../stubs/defaultPostCssConfig.stub.js'), - 'utf8' - ) - - fs.writeFileSync(postcssConfigLocation, stubFile, 'utf8') - - messages.push(`Created PostCSS config file: ${path.basename(postcssConfigLocation)}`) - } - } - if (messages.length > 0) { console.log() for (let message of messages) {