File: install.rb

package info (click to toggle)
ruby-cssbundling-rails 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: ruby: 184; javascript: 15; sh: 6; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 548 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
require_relative "../helpers"
self.extend Helpers

apply "#{__dir__}/../install.rb"

say "Install PostCSS w/ nesting and autoprefixer"
copy_file "#{__dir__}/postcss.config.js", "postcss.config.js"
copy_file "#{__dir__}/application.postcss.css", "app/assets/stylesheets/application.postcss.css"
run "#{bundler_cmd} add postcss postcss-cli postcss-import postcss-nesting autoprefixer"

say "Add build:css script"
add_package_json_script "build:css",
  "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css"