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

View File

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

View File

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