From f67f37a4635b1ae1682b8084085a8409cfbaef68 Mon Sep 17 00:00:00 2001 From: Eric Groom Date: Tue, 6 Mar 2018 08:46:21 -0800 Subject: [PATCH] update grunt-sass to latest version (#1544) * update grunt-sass * add to contributors * update gulp deps * update grunt deps * add convenience run script to grunt and gulp configurations --- CONTRIBUTORS.rst | 1 + docs/live-reloading-and-sass-compilation.rst | 2 +- {{cookiecutter.project_slug}}/Gruntfile.js | 2 +- {{cookiecutter.project_slug}}/package.json | 34 ++++++++++++-------- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 96c05d042..e1c3cad4e 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -89,6 +89,7 @@ Listed in alphabetical order. Dong Huynh `@trungdong`_ Emanuel Calso `@bloodpet`_ @bloodpet Eraldo Energy `@eraldo`_ + Eric Groom `@ericgroom`_ Eyad Al Sibai `@eyadsibai`_ Felipe Arruda `@arruda`_ Garry Cairns `@garry-cairns`_ diff --git a/docs/live-reloading-and-sass-compilation.rst b/docs/live-reloading-and-sass-compilation.rst index 7f978ede5..a456b81af 100644 --- a/docs/live-reloading-and-sass-compilation.rst +++ b/docs/live-reloading-and-sass-compilation.rst @@ -15,7 +15,7 @@ If you don't already have it, install `compass` (doesn't hurt if you run this co Now you just need:: - $ grunt serve + $ npm run dev The base app will now run as it would with the usual ``manage.py runserver`` but with live reloading and Sass compilation enabled. diff --git a/{{cookiecutter.project_slug}}/Gruntfile.js b/{{cookiecutter.project_slug}}/Gruntfile.js index 15384c67b..b225266c3 100644 --- a/{{cookiecutter.project_slug}}/Gruntfile.js +++ b/{{cookiecutter.project_slug}}/Gruntfile.js @@ -92,7 +92,7 @@ module.exports = function (grunt) { processors: [ require('pixrem')(), // add fallbacks for rem units - require('autoprefixer-core')({browsers: [ + require('autoprefixer')({browsers: [ 'Android 2.3', 'Android >= 4', 'Chrome >= 20', diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index a37d73bf5..acaae12ab 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -4,22 +4,22 @@ "dependencies": {}, "devDependencies": { {% if cookiecutter.js_task_runner == 'Grunt' %} - "autoprefixer-core": "~5.2.1", + "autoprefixer": "~8.1.0", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} "bootstrap": "^4.0.0", {% endif %} - "connect-livereload": "~0.3.2", - "cssnano": "~2.1.0", - "grunt": "~0.4.5", + "connect-livereload": "~0.6.0", + "cssnano": "~3.10.0", + "grunt": "~1.0.2", "grunt-bg-shell": "~2.3.1", - "grunt-contrib-watch": "~0.6.1", - "grunt-postcss": "~0.5.5", - "grunt-sass": "~1.0.0", + "grunt-contrib-watch": "~1.0.0", + "grunt-postcss": "~0.9.0", + "grunt-sass": "~2.1.0", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} "jquery": "^3.2.1-slim", {% endif %} "load-grunt-tasks": "~3.2.0", - "pixrem": "~1.3.1", + "pixrem": "~4.0.1", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} "popper.js": "^1.12.3", {% endif %} @@ -31,26 +31,34 @@ "browser-sync": "^2.14.0", "del": "^2.2.2", "gulp": "^3.9.1", - "gulp-autoprefixer": "^3.1.1", + "gulp-autoprefixer": "^5.0.0", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} "gulp-concat": "^2.6.1", {% endif %} "gulp-cssnano": "^2.1.2", - "gulp-imagemin": "^3.0.3", + "gulp-imagemin": "^4.1.0", "gulp-pixrem": "^1.0.0", "gulp-plumber": "^1.1.0", "gulp-rename": "^1.2.2", - "gulp-sass": "^2.3.2", - "gulp-uglify": "^2.0.0", + "gulp-sass": "^3.1.0", + "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.7", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} "jquery": "^3.2.1-slim", "popper.js": "^1.12.3", {% endif %} - "run-sequence": "^1.2.2" + "run-sequence": "^2.1.1" {% endif %} }, "engines": { "node": ">=0.8.0" + }, + "scripts": { + {% if cookiecutter.js_task_runner == 'Grunt' %} + "dev": "grunt serve" + {% elif cookiecutter.js_task_runner == 'Gulp' %} + "dev": "gulp" + {% endif %} + } }