Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(styles): add source map in dev mode #3673

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/styles/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const gulp = require('gulp');
const sass = require('sass');
const newer = require('gulp-newer');
const gulpSass = require('gulp-sass')(sass);
const sourcemaps = require('gulp-sourcemaps');
const gulpPostCss = require('gulp-postcss');
const postcssScss = require('postcss-scss');
const autoprefixer = require('autoprefixer');
Expand Down Expand Up @@ -154,6 +155,7 @@ gulp.task('build-components', () => {
gulp.task('sass:dev', () => {
return gulp
.src('./src/*.scss')
.pipe(sourcemaps.init())
.pipe(
gulpSass({
includePaths: options.includePaths,
Expand All @@ -162,6 +164,7 @@ gulp.task('sass:dev', () => {
}),
)
.pipe(gulpPostCss([autoprefixer()]))
.pipe(sourcemaps.write())
.pipe(gulp.dest(options.outputDir));
});

Expand Down
3 changes: 2 additions & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
},
"dependencies": {
"@popperjs/core": "2.11.8",
"bootstrap": "5.3.3"
"bootstrap": "5.3.3",
"gulp-sourcemaps": "3.0.0"
},
"devDependencies": {
"@swisspost/design-system-icons": "workspace:9.0.0-next.0",
Expand Down
Loading