Permalink
Browse files

compile scss - gulpfile

  • Loading branch information...
aaroniker committed Feb 3, 2018
1 parent 7864380 commit 0093c80c11769bf35505a73b997185b4872ca306
@@ -9,3 +9,4 @@ node_modules
package-lock.json
composer.lock
**/scripts/dist/**/*.js
**/styles/dist/**/*.css
@@ -14,6 +14,7 @@ module.exports = {
methods: {
check() {
this.test = 'Test';
console.log(this.$http);
}
}
}
@@ -6,6 +6,7 @@
'run' => function($app) {
$app->assets->addJS('/gear/assets/vue/dist/vue.js');
$app->assets->addCSS('~/styles/dist/style.css');
},
'filter' => [
@@ -0,0 +1,3 @@
body {
font-family: Arial;
}
@@ -1,23 +1,18 @@
var gulp = require('gulp');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');

var errorHandler = function(error) {
this.emit('end');
return console.error(error.toString());
};

gulp.task('default', ['styles']);

gulp.task('styles', function(){
gulp.src('**/modules/**/style.scss')
.pipe(plumber(errorHandler))
.pipe(sass({outputStyle: 'compressed'}))
gulp.task('styles', function() {
gulp.src(['**/modules/**/style.scss'])
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(rename(function(file) {
file.dirname = file.dirname.replace('scss', 'css');
file.dirname += "/dist";
}))
.pipe(gulp.dest('./dist'));
.pipe(gulp.dest('.'))
});

gulp.task('watch', function(cb) {
@@ -13,7 +13,6 @@
"cross-env": "^3.0.0",
"glob": "^7.1.2",
"gulp": "^3.9.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.0",
"gulp-sass": "^3.1.0",
"json-loader": "^0.5.7",

0 comments on commit 0093c80

Please sign in to comment.