Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
fix(browser): use autoprefixer to enable flexbox on safari
Browse files Browse the repository at this point in the history
 - probably helps other older browsers too.
  • Loading branch information
justindujardin committed Dec 20, 2015
1 parent 9e65de0 commit 9ae1a42
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
34 changes: 30 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ module.exports = function (grunt) {
{expand: true, src: 'config.js', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{expand: true, src: 'ng2-material/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{expand: true, src: 'dist/*.*', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{expand: true, cwd: 'public/font/', flatten: true, src: ['*.*'], dest: '<%- sitePath %>/<%- pkg.version %>/dist/'},
{
expand: true,
cwd: 'public/font/',
flatten: true,
src: ['*.*'],
dest: '<%- sitePath %>/<%- pkg.version %>/dist/'
},
{expand: true, src: 'public/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{expand: true, src: 'examples/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'}
]
Expand Down Expand Up @@ -111,6 +117,25 @@ module.exports = function (grunt) {
}]
}
},
postcss: {
options: {
map: true,
processors: [
require('autoprefixer')({
remove: false
})
]
},
dist: {
src: [
"examples/*.css",
"examples/**/*.css",
"public/font/*.css",
"<%- sourceRoot %>/all.css",
"<%- sourceRoot %>/components/**/*.css"
]
}
},
watch: {
sass: {
files: [
Expand All @@ -119,7 +144,7 @@ module.exports = function (grunt) {
'examples/**/*.scss',
'app.scss'
],
tasks: ['sass', 'copy:styles', 'notify:styles']
tasks: ['sass', 'postcss:dist', 'copy:styles', 'notify:styles']
},
meta: {
files: [
Expand Down Expand Up @@ -204,11 +229,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('dts-generator');
grunt.loadNpmTasks('remap-istanbul');
grunt.registerTask('default', ['dtsGenerator', 'site-meta', 'ts:source', 'sass', 'copy:styles']);
grunt.registerTask('default', ['dtsGenerator', 'site-meta', 'ts:source', 'sass', 'postcss', 'copy:styles']);
grunt.registerTask('develop', ['default', 'watch']);
grunt.registerTask('site', ['build', 'copy:site']);
grunt.registerTask('build', ['default', 'ts:release', 'dist-bundle', 'copy:release']);
Expand Down Expand Up @@ -290,7 +316,7 @@ module.exports = function (grunt) {
var util = require('util');
var meta = {};

fs.writeFileSync('public/version.json',JSON.stringify({
fs.writeFileSync('public/version.json', JSON.stringify({
version: require('./package.json').version
}));

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"typings": "dist/ng2-material.d.ts",
"devDependencies": {
"autoprefixer": "6.2.0",
"coveralls": "2.11.6",
"dts-generator": "1.6.3",
"es6-module-loader": "^0.17.4",
Expand All @@ -39,6 +40,7 @@
"grunt-conventional-changelog": "5.0.0",
"grunt-notify": "0.4.3",
"grunt-npm": "0.0.2",
"grunt-postcss": "0.7.1",
"grunt-ts": "5.2.0",
"highlightjs": "8.7.0",
"istanbul": "1.0.0-alpha.2",
Expand Down

0 comments on commit 9ae1a42

Please sign in to comment.