havietduc91 / experience

0 stars 0 forks source link

Experience Minifile JS, CSS #20

Open havietduc91 opened 9 years ago

havietduc91 commented 9 years ago
havietduc91 commented 9 years ago

Lỗi không hiển thị icon do bị cross domain

Thêm

Header set Access-Control-Allow-Origin "*"

Vào trong file edxassets.local

tham khảo chi tiết http://enable-cors.org/server_apache.html

havietduc91 commented 9 years ago
npm install uglify-js -g
+ Trong đó -g là cài đặt trên global

(thư mục edx có 2 file js.sh và css.sh)

- import các file js cần minify ở edx

screenshot from 2015-05-16 11 35 03

     - Import các file  css cần minify ở edx

screenshot from 2015-05-16 11 36 45

  - Import các file (cả js và css ) cần minify ở core
Cài đặt môi trường

screenshot from 2015-05-16 11 09 23

- File này sẽ làm nhiệm vụ 
  + include các thư viện evn.sh
  + Sau đó sẽ chạy các file cần minify css.sh, js.sh, minify-core.js.sh

screenshot from 2015-05-16 11 17 27

havietduc91 commented 9 years ago

sudo npm install --no-bin-links

havietduc91 commented 8 years ago

Cài đặt grunt dự án aj4

havietduc91 commented 8 years ago

Lỗi warning command failed /bin/sh compass command not found

Do chưa cài đặt ruby & compass vậy cần cài đặt ruby sau đó cài gem để cài compass như hướng dẫn ở dưới

havietduc91 commented 8 years ago

You can install it with default yum install -y ruby ruby-devel rubygems

Other way is to compile it by yourself

Ruby

wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz tar -zxvf ruby-1.8.7-p302.tar.gz cd ruby-1.8.7-p302 ./configure --with-openssl-dir=/usr/lib/openssl make make install

Rubygems

wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz tar -zxvf rubygems-1.3.7.tgz cd rubygems-1.3.7 ruby setup.rb config ruby setup.rb setup ruby setup.rb install

Check if installed

ruby -v gem -v

havietduc91 commented 8 years ago

https://gist.github.com/chiraggude/11128087

Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5

Install Ruby

wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz tar xvzf ruby-2.1.1.tar.gz cd ruby-2.1.1 ./configure --prefix=/usr make make install

remove "ruby-2.1.1" folder in /root

Install RubyGems

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.25.tgz tar xvzf rubygems-1.8.25.tgz cd rubygems-1.8.25 ruby setup.rb config ruby setup.rb setup ruby setup.rb install

remove "rubygems-1.8.25" folder in /root

havietduc91 commented 8 years ago

How To Install Ruby on Rails on CentOS 6

https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-centos-6

Step One—Install Ruby The easiest way to install Ruby on your virtual server is through the yum package installer.

sudo yum install ruby

After you say yes to the prompt, Ruby will install.

Then we need some additional Ruby dependancies.

Type the following into terminal:

sudo yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
sudo yum install ruby-rdoc ruby-devel

Step Two—Install Ruby Gems Once you have Ruby installed, you can easily install the ruby gems.

Type this command into terminal:

sudo yum install rubygems
havietduc91 commented 8 years ago
http://stackoverflow.com/questions/21865609/grunt-need-compass-installed-in-system-path-warning

If you're on OS X or Linux you probably already have Ruby installed; test with ruby -v in your terminal. When you've confirmed you have Ruby installed, run gem update --system && gem install compass to install Compass and Sass.