Sha256: 71cf0d80b778d22914611cdbea25e11c5c369fc268f6018803feacffdbd8c8df
Contents?: true
Size: 823 Bytes
Versions: 9
Compression:
Stored size: 823 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 ovewrite your existing #{"postcss.config.js".bold.white}. Would you like to continue? [Yn]" return unless confirm.casecmp?("Y") plugins = %w(postcss-easy-import postcss-mixins postcss-color-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
9 entries across 9 versions & 1 rubygems