LoginSignup
3
2

More than 5 years have passed since last update.

rubyでcssのminifyする

Last updated at Posted at 2013-12-15

構築手順

rubyの環境は作成済みとします
1. Gemfileを作成

source 'https://rubygems.org'

gem 'sass'

2.インストール

bundle install

3.スクリプト作成

css_minify.rb
#!/bin/ruby
require "sass"
puts Sass::Engine.new(ARGF.read, :syntax => :scss, :style => :compressed).render

4.使い方

bundle exec ruby css_minify.rb sample.css > sample_minify.css

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2