Sha256: 741bdb20104426eb9fda2293be8bc801623ace7207e24e863a1376cab9e7a1c2
Contents?: true
Size: 808 Bytes
Versions: 11
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true # rubocop:disable all unless File.exist?("postcss.config.js") error_message = "#{"postcss.config.js".bold} not found. Please configure postcss in your project." @logger.error "\nError:".red, "🚨 #{error_message}" @logger.info "\nRun #{"bridgetown webpack enable-postcss".bold.blue} to set it up.\n" return end confirm = ask "This configuration will overwrite your existing #{"postcss.config.js".bold.white}. Would you like to continue? [Yn]" return unless confirm.casecmp?("Y") plugins = %w(postcss-mixins postcss-color-mod-function cssnano) say "Adding the following PostCSS plugins: #{plugins.join(' | ')}", :green run "yarn add -D #{plugins.join(' ')}" copy_file in_templates_dir("postcss.config.js"), "postcss.config.js", force: true # rubocop:enable all
Version data entries
11 entries across 11 versions & 1 rubygems