[TASK] Add postcss to grunt serve

This commit is contained in:
Xaver Maierhofer 2016-06-03 19:38:58 +02:00
parent 20a9214a6e
commit e7d74364db
4 changed files with 16 additions and 16 deletions

View File

@ -5,5 +5,5 @@ module.exports = function (grunt) {
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass:dist", "postcss", "requirejs:default", "inlinedata", "cachebreaker", "inline", "clean:release"]);
grunt.registerTask("lint", ["sasslint", "eslint"]);
grunt.registerTask("serve", ["bower-install-simple", "lint", "copy", "sass:dev", "requirejs:dev", "inlinedata", "browserSync", "watch"]);
grunt.registerTask("serve", ["bower-install-simple", "lint", "copy", "sass:dev", "postcss", "requirejs:dev", "inlinedata", "browserSync", "watch"]);
};

View File

@ -29,7 +29,7 @@ module.exports = function (grunt) {
],
expand: true,
dest: "build/fonts/",
filter: 'isFile',
filter: "isFile",
flatten: true,
cwd: "bower_components/roboto-slab-fontface-kit/fonts"
},
@ -71,7 +71,7 @@ module.exports = function (grunt) {
map: true,
processors: [
require("autoprefixer")({
browsers: ["last 2 versions"]
browsers: ["> 1% in DE"]
})
]
},
@ -92,9 +92,9 @@ module.exports = function (grunt) {
inlinedata: {
injs: {
expand: true,
cwd: '.',
src: ['build/*.html'],
ext: '.html'
cwd: ".",
src: ["build/*.html"],
ext: ".html"
}
},
"bower-install-simple": {
@ -137,10 +137,10 @@ module.exports = function (grunt) {
cachebreaker: {
default: {
options: {
match: ['app.js']
match: ["app.js"]
},
files: {
src: ['build/index.html']
src: ["build/index.html"]
}
}
}
@ -152,6 +152,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-postcss");
grunt.loadNpmTasks("grunt-inline");
grunt.loadNpmTasks('grunt-inline-data');
grunt.loadNpmTasks("grunt-inline-data");
grunt.loadNpmTasks("grunt-cache-breaker");
};

View File

@ -6,13 +6,13 @@ module.exports = function (grunt) {
dev: {
bsFiles: {
src: [
'build/*.css',
'build/*.js',
'build/*.html'
"build/*.css",
"build/*.js",
"build/*.html"
]
},
options: {
open: 'local',
open: "local",
watchTask: true,
injectChanges: true,
server: {
@ -29,7 +29,7 @@ module.exports = function (grunt) {
},
sass: {
files: ["scss/**/*.scss"],
tasks: ["sasslint", "sass"]
tasks: ["sasslint", "sass", "postcss"]
},
js: {
files: ["app.js", "lib/**/*.js"],

View File

@ -15,13 +15,13 @@ module.exports = function (grunt) {
},
sasslint: {
options: {
configFile: '.sass-lint.yml'
configFile: ".sass-lint.yml"
},
target: ['scss/main.scss', 'scss/*/*.scss']
},
eslint: {
sources: {
src: ["app.js", "!Gruntfile.js", "lib/**/*.js"]
src: ["app.js", "!Gruntfile.js", "lib/**/*.js", "tasks/**/*.js"]
},
grunt: {
src: ["Gruntfile.js", "tasks/*.js"]