From 03d4276e490c8ecdba33ee71952a61058ac7e110 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Wed, 7 Jun 2017 12:51:32 +0200 Subject: [PATCH] Support environment specific scss files --- src/Handler.php | 2 ++ templates/gulpfile.js.twig | 1 + templates/sass/environment/development/_local-settings.scss | 1 + templates/sass/environment/production/_local-settings.scss | 1 + templates/sass/style.scss | 1 + 5 files changed, 6 insertions(+) create mode 100644 templates/sass/environment/development/_local-settings.scss create mode 100644 templates/sass/environment/production/_local-settings.scss diff --git a/src/Handler.php b/src/Handler.php index 714db1f..ecbb462 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -221,6 +221,8 @@ class Handler 'js/{{ project_name }}.js', 'sass/_default-variables.scss', 'sass/style.scss', + 'sass/environment/development/_local-settings.scss', + 'sass/environment/production/_local-settings.scss', '.gitignore', 'favicon.ico', 'logo.svg', diff --git a/templates/gulpfile.js.twig b/templates/gulpfile.js.twig index 2d0fdbc..3e7412f 100644 --- a/templates/gulpfile.js.twig +++ b/templates/gulpfile.js.twig @@ -55,6 +55,7 @@ gulp.task('css', function() { outputStyle:gulpif(options.env !== 'production', 'nested', 'compressed'), includePaths:[ config.sassPath, + config.sassPath + '/environment/' + options.env, {% for name, package in bower_assets %} {% if package.sass is defined %} '{{ package.sass.relative }}', diff --git a/templates/sass/environment/development/_local-settings.scss b/templates/sass/environment/development/_local-settings.scss new file mode 100644 index 0000000..64f4ab4 --- /dev/null +++ b/templates/sass/environment/development/_local-settings.scss @@ -0,0 +1 @@ +// Define your variables for the development environment below diff --git a/templates/sass/environment/production/_local-settings.scss b/templates/sass/environment/production/_local-settings.scss new file mode 100644 index 0000000..f74bfa9 --- /dev/null +++ b/templates/sass/environment/production/_local-settings.scss @@ -0,0 +1 @@ +// Define your variables for the production environment below diff --git a/templates/sass/style.scss b/templates/sass/style.scss index 8d04f4b..7903e39 100644 --- a/templates/sass/style.scss +++ b/templates/sass/style.scss @@ -4,6 +4,7 @@ // // Also, please have a look into default variables. // ============================================================================= +@import 'local-settings'; @import 'settings'; @import 'default-variables'; @import 'bower-assets.scss'; -- GitLab