Move to node-sass and gulp for SCSS file management, replacing ruby.

This commit is contained in:
Buster Silver 2015-03-05 15:17:23 -06:00
parent 1cdfd3ccf7
commit 0fb375ab6a
7 changed files with 63 additions and 5 deletions

2
.gitignore vendored
View File

@ -259,6 +259,8 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
# Others
web/test.php
app/modules/default/controllers/UtilController.php
node_modules/

33
Gulpfile.js Normal file
View File

@ -0,0 +1,33 @@
var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
concat = require('gulp-concat'),
sass = require('gulp-sass'),
del = require('del');
var paths = {
sass: [
'web/static/sass/*.scss'
]
};
gulp.task('build', [
'sass'
]);
gulp.task('clean', function(cb) {
del(['compiled'], cb);
});
gulp.task('watch', function() {
for(var task in paths) {
gulp.watch(paths[task], [task]);
}
});
gulp.task('sass', function() {
return gulp.src(paths.sass)
.pipe(sourcemaps.init())
.pipe(sass({ outputStyle: 'compressed' }))
.pipe(sourcemaps.write())
.pipe(gulp.dest('web/static/compiled'));
});

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"repository": {
"type": "git",
"url": "git@github.com:BravelyBlue/PVLive.git"
},
"dependencies": {
"del": "~0.1.3",
"gulp": "~3.8.10",
"gulp-concat": "~2.4.2",
"gulp-jshint": "~1.9.0",
"gulp-sass": "~1.1.0",
"gulp-sourcemaps": "~1.2.8",
"gulp-traceur": "~0.14.1",
"jshint-stylish": "~1.0.0",
"traceur": "0.0.78"
},
"private": true
}

View File

@ -20,7 +20,7 @@ then
apt-add-repository ppa:phalcon/stable
apt-get update
apt-get -q -y install vim git nginx mysql-server-5.6 php5-fpm php5-cli php5-gd php5-mysql php5-curl php5-phalcon
apt-get -q -y install vim git nginx mysql-server-5.6 php5-fpm php5-cli php5-gd php5-mysql php5-curl php5-phalcon nodejs npm
apt-get autoremove
mysqladmin -u root password password
@ -93,7 +93,9 @@ then
mv composer.phar /usr/local/bin/composer
# Install Node.js and services
apt-get -q -y install nodejs npm
cd $www_base
sudo npm install -g gulp
npm install --no-bin-links
cd $www_base/live
npm install --no-bin-links

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long