Open havietduc91 opened 9 years ago
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
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
- Import các file css cần minify ở edx
- Import các file (cả js và css ) cần minify ở core
Cài đặt môi trường
- 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
sudo npm install --no-bin-links
Bước 1: Cài đặt dự án node
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server
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
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
https://gist.github.com/chiraggude/11128087
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
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
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
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.