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

Commit

Permalink
fix(build): issue where dist css file had bad source mapping
Browse files Browse the repository at this point in the history
 - closes #8
  • Loading branch information
justindujardin committed Jan 5, 2016
1 parent 93b2fda commit 2cc8a74
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ module.exports = function (grunt) {
"test/**/*.js.map"
],
copy: {
styles: {
files: [{src: ['<%- sourceRoot %>/all.css'], dest: 'dist/ng2-material.css'}]
},
release: {
files: [
{src: 'package.json', dest: '<%- outPath %>/'},
Expand All @@ -34,6 +31,7 @@ module.exports = function (grunt) {
// Individual style and html files
// NOTE: Individual js/d.ts outputs are handled by the build task for release
{expand: true, cwd: 'ng2-material/', src: ['**/*.css'], dest: '<%- outPath %>/'},
{expand: true, cwd: 'ng2-material/', src: ['**/*.css.map'], dest: '<%- outPath %>/'},
{expand: true, cwd: 'ng2-material/', src: ['**/*.html'], dest: '<%- outPath %>/'},

// Source .ts/.scss files for people that prefer to build.
Expand Down Expand Up @@ -104,19 +102,24 @@ module.exports = function (grunt) {
},
sass: {
dist: {
files: [{
expand: true,
cwd: './',
dest: '.',
src: [
"examples/*.scss",
"examples/**/*.scss",
"public/font/*.scss",
"<%- sourceRoot %>/all.scss",
"<%- sourceRoot %>/components/**/*.scss"
],
ext: '.css'
}]
files: [
{
expand: true,
cwd: './',
dest: '.',
ext: '.css',
src: [
"examples/*.scss",
"examples/**/*.scss",
"public/font/*.scss",
"<%- sourceRoot %>/all.scss",
"<%- sourceRoot %>/components/**/*.scss"
]
},
{
'dist/ng2-material.css': ['<%- sourceRoot %>/all.scss']
}
]
}
},
postcss: {
Expand All @@ -131,6 +134,7 @@ module.exports = function (grunt) {
"examples/*.css",
"examples/**/*.css",
"public/font/*.css",
"dist/ng2-material.css",
"<%- sourceRoot %>/all.css",
"<%- sourceRoot %>/components/**/*.css"
]
Expand All @@ -144,7 +148,7 @@ module.exports = function (grunt) {
'examples/**/*.scss',
'app.scss'
],
tasks: ['sass', 'postcss:dist', 'copy:styles', 'notify:styles']
tasks: ['sass', 'postcss:dist', 'notify:styles']
},
meta: {
files: [
Expand Down Expand Up @@ -246,7 +250,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('dts-generator');
grunt.loadNpmTasks('remap-istanbul');
grunt.registerTask('default', ['dtsGenerator', 'ts:source', 'sass', 'postcss', 'copy:styles', 'site-meta']);
grunt.registerTask('default', ['dtsGenerator', 'ts:source', 'sass', 'postcss', 'site-meta']);
grunt.registerTask('develop', ['default', 'watch']);
grunt.registerTask('cover', ['karma:cover', 'remapIstanbul', 'site-meta']);
grunt.registerTask('site', ['build', 'cover', 'copy:site']);
Expand Down

0 comments on commit 2cc8a74

Please sign in to comment.