Skip to content

Commit c1a1022

Browse files
committed
feat(css): only use minified css add sourcemaps
1 parent db6de3e commit c1a1022

12 files changed

+176
-707
lines changed

Gulpfile.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ var optimizejs = require('gulp-optimize-js')
9696
var sass = require('gulp-sass')
9797
var prefix = require('gulp-autoprefixer')
9898
var minify = require('gulp-cssnano')
99+
var sourcemaps = require('gulp-sourcemaps')
99100

100101
// SVGs
101102
var svgmin = require('gulp-svgmin')
@@ -199,6 +200,7 @@ var buildStyles = function(done) {
199200

200201
// Run tasks on all Sass files
201202
src(paths.styles.input)
203+
.pipe(sourcemaps.init())
202204
.pipe(sass({
203205
outputStyle: 'expanded',
204206
sourceComments: true
@@ -208,10 +210,11 @@ var buildStyles = function(done) {
208210
cascade: true,
209211
remove: true
210212
}))
211-
.pipe(header(banner.full, {
212-
package: pkg
213-
}))
214-
.pipe(dest(paths.styles.output))
213+
// Uncomment if you want the non minified files
214+
// .pipe(header(banner.full, {
215+
// package: pkg
216+
// }))
217+
// .pipe(dest(paths.styles.output))
215218
.pipe(rename({
216219
suffix: '.min'
217220
}))
@@ -223,6 +226,7 @@ var buildStyles = function(done) {
223226
.pipe(header(banner.min, {
224227
package: pkg
225228
}))
229+
.pipe(sourcemaps.write('.'))
226230
.pipe(dest(paths.styles.output))
227231

228232
// Signal completion

package-lock.json

+158
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"gulp-optimize-js": "^1.1.0",
3535
"gulp-rename": "^1.4.0",
3636
"gulp-sass": "^4.0.2",
37+
"gulp-sourcemaps": "^2.6.5",
3738
"gulp-standard": "^12.0.0",
3839
"gulp-svgmin": "^2.2.0",
3940
"gulp-uglify": "^3.0.2",

src/main/xar-resources/resources/styles/doc.css

-77
This file was deleted.

src/main/xar-resources/resources/styles/doc.min.css

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/xar-resources/resources/styles/doc.min.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)