Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Reworked `stylelint` and `autoprefix` grunt tasks - Renamed `autoprefix` task back to `postcss` - Created `grunt:autoprefix` subtask & registered as task `autoprefix` - Created `grunt:stylelint` subtask & registered task `stylelint` - Removed unneeded grunt-stylelint npm module

ZachTRice7e4400ff8486
diff --git a/Gruntfile.js b/Gruntfile.js
index f201cc071..48c2e0194 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -84,12 +84,27 @@ module.exports = function(grunt) {
opt: options,
apache_version: grunt.option("apache-version") || "22",
- autoprefix: {
- options: {
- map: false,
- processors: [require('autoprefixer')]
+ postcss: {
+ stylelint: {
+ options: {
+ map: false,
+ processors: [require('stylelint')({
+ configFile: '.stylelintrc',
+ formatter: 'string',
+ ignoreDisables: false,
+ failOnError: true,
+ outputFile: '',
+ reportNeedlessDisables: false,
+ syntax: ''
+ })]
+ },
+ src: 'web/css/*.css'
},
- dist: {
+ autoprefix: {
+ options: {
+ map: false,
+ processors: [require('autoprefixer')]
+ },
src: 'web/css/*.css'
}
},
@@ -634,19 +649,6 @@ module.exports = function(grunt) {
}
},
- stylelint: {
- options: {
- configFile: '.stylelintrc',
- formatter: 'string',
- ignoreDisables: false,
- failOnError: true,
- outputFile: '',
- reportNeedlessDisables: false,
- syntax: ''
- },
- src: 'web/css/*.css'
- },
-
stylefmt: {
format: {
files:[
@@ -707,7 +709,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-minjson");
grunt.loadNpmTasks("grunt-mkdir");
grunt.loadNpmTasks("grunt-postcss");
- grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-stylefmt");
grunt.loadNpmTasks("grunt-text-replace");
grunt.loadNpmTasks("grunt-rename");
@@ -715,7 +716,6 @@ module.exports = function(grunt) {
// Lets use "clean" as a target instead of the name of the task
grunt.renameTask("clean", "remove");
- grunt.renameTask("postcss", "autoprefix");
grunt.registerTask("load_branding", "Load branding", function() {
var brand = grunt.file.readJSON("build/options/brand.json");
@@ -736,6 +736,8 @@ module.exports = function(grunt) {
grunt.option("email", brand.email);
});
+ grunt.registerTask("autoprefix", ["postcss:autoprefix"]);
+
grunt.registerTask("build", [
"coffee",
"remove:build_source",
@@ -782,6 +784,8 @@ module.exports = function(grunt) {
"copy:dist_site_release_versioned"
]);
+ grunt.registerTask("stylelint", ["postcss:stylelint"]);
+
grunt.registerTask("rpm-only", [
"load_branding",
"git-rev-parse:source",
diff --git a/package.json b/package.json
index ea18fd616..37924b873 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,6 @@
"grunt-postcss": "^0.8.0",
"grunt-rename": "0.1.x",
"grunt-stylefmt": "^3.0.0",
- "grunt-stylelint": "^0.8.0",
"grunt-text-replace": "0.4.x",
"gruntify-eslint": "^4.0.0",
"lodash": "4.15.0",