use libsass (#22)

Avoid ruby dependency
This commit is contained in:
Xaver Maierhofer 2016-05-19 17:47:13 +02:00 committed by PetaByteBoy // Milan Pässler
parent ce8853c0fa
commit e1e510c308
4 changed files with 26 additions and 11 deletions

View File

@ -17,7 +17,7 @@ module.exports = function (grunt) {
grunt.loadTasks("tasks")
grunt.registerTask("default", ["bower-install-simple", "lint", "saveRevision", "copy", "sass", "requirejs"])
grunt.registerTask("default", ["bower-install-simple", "lint", "saveRevision", "copy", "sass", "postcss", "requirejs"])
grunt.registerTask("lint", ["eslint"])
grunt.registerTask("dev", ["default", "connect:server", "watch"])
}

View File

@ -21,18 +21,16 @@ HopGlass is a frontend for the [HopGlass Server](https://github.com/plumpudding/
# Installing dependencies
Install npm and Sass with your package-manager. On Debian-like systems run:
Install npm package-manager. On Debian-like systems run:
sudo apt-get install npm ruby-sass
or if you have bundler you can install ruby-sass simply via `bundle install`
sudo apt-get install npm
On Mac you have to install only npm via brew and sass
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
sudo gem install sass
Execute these commands on your server as a normal user to prepare the dependencies:
git clone https://github.com/plumpudding/hopglass

View File

@ -4,6 +4,7 @@
"test": "node -e \"require('grunt').cli()\" '' clean lint"
},
"devDependencies": {
"autoprefixer": "^6.3.3",
"grunt": "^0.4.5",
"grunt-check-dependencies": "^0.6.0",
"grunt-contrib-clean": "^0.6.0",
@ -11,7 +12,8 @@
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.12.2",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-sass": "^0.9.2",
"grunt-sass": "^1.1.0",
"grunt-postcss": "^0.7.2",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-eslint": "^10.0.0",

View File

@ -56,15 +56,29 @@ module.exports = function(grunt) {
}
},
sass: {
options: {
sourceMap: true,
outputStyle: "compressed"
},
dist: {
options: {
style: "compressed"
},
files: {
"build/style.css": "scss/main.scss"
}
}
},
postcss: {
options: {
map: true,
processors: [
require("autoprefixer")({
browsers: ["last 2 versions"]
})
]
},
dist: {
src: "build/style.css"
}
},
cssmin: {
target: {
files: {
@ -106,5 +120,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-bower-install-simple")
grunt.loadNpmTasks("grunt-contrib-copy")
grunt.loadNpmTasks("grunt-contrib-requirejs")
grunt.loadNpmTasks("grunt-contrib-sass")
grunt.loadNpmTasks("grunt-sass")
grunt.loadNpmTasks("grunt-postcss")
}