diff --git a/metapackages/sass/gulp.js b/metapackages/sass/gulp.js index e41704100..1e7aa7fa8 100644 --- a/metapackages/sass/gulp.js +++ b/metapackages/sass/gulp.js @@ -1,3 +1,5 @@ +#!/usr/bin/env node + const gulp = require('gulp'); const gulpfile = require('./gulpfile'); const yargs = require('yargs'); diff --git a/tasks/sass.yml b/tasks/sass.yml index 37ec3a051..61e2121d1 100644 --- a/tasks/sass.yml +++ b/tasks/sass.yml @@ -23,17 +23,12 @@ tasks: usage: task sass:compile DRAINPIPE_SASS="web/themes/custom/mytheme/style.scss:web/themes/custom/mytheme/style.css web/themes/custom/myothertheme/style.scss:web/themes/custom/myothertheme/style.css" cmds: - - | - COMMAND="node" - if [ -f "yarn.lock" ]; then - COMMAND="yarn node" - fi - | if [ "{{.DRAINPIPE_SASS}}" == "" ]; then echo "🪠 Nothing provided for Sass to compile"; exit 0; fi FILES="{{if .DRAINPIPE_SASS}}{{.DRAINPIPE_SASS | catLines | trim}}{{end}}" - COMMAND="./node_modules/.bin/drainpipe-sass" + COMMAND="node ./node_modules/.bin/drainpipe-sass" if [ -f "yarn.lock" ]; then - COMMAND="yarn drainpipe-sass" + COMMAND="yarn $COMMAND" fi $COMMAND --files="$FILES"{{.args}} watch: