Sha256: 8f4cafebd1b73f3934c6adaba76474b4b1b33fd5fc3f5cbdfe96723501938c37
Contents?: true
Size: 723 Bytes
Versions: 3
Compression:
Stored size: 723 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}" 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 add_npm_package "-D #{plugins.join(' ')}" copy_file in_templates_dir("postcss.config.js"), "postcss.config.js", force: true # rubocop:enable all
Version data entries
3 entries across 3 versions & 1 rubygems