Skip to content

Commit

Permalink
add temporary copy workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
gfellerph committed Jul 25, 2024
1 parent f2621eb commit ef0b1c1
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 14 deletions.
3 changes: 3 additions & 0 deletions packages/styles/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ storybook-static
# Mac OSX Finder files.
**/.DS_Store
.DS_Store

# Temporary files
src/tokens/temp/
15 changes: 11 additions & 4 deletions packages/styles/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ gulp.task('copy', () => {
.pipe(gulp.dest(options.outputDir));
});

gulp.task('temprarily-copy-token-files', () => {
return gulp.src(['../tokens/dist/*.scss']).pipe(gulp.dest('./src/tokens/temp'));
});

/**
* Autoprefix SCSS files
*/
Expand Down Expand Up @@ -168,9 +172,12 @@ gulp.task('sass:tests', () => {
/**
* Watch task for scss development
*/
gulp.task('watch', () => {
return gulp.watch('./src/**/*.scss', gulp.series('copy'));
});
gulp.task(
'watch',
gulp.series('temprarily-copy-token-files', () => {
return gulp.watch('./src/**/*.scss', 'copy');
}),
);

/**
* Run copy and sass task in parallel per default
Expand All @@ -179,7 +186,7 @@ exports.default = gulp.task(
'build',
gulp.parallel(
gulp.series('map-icons', 'copy', 'autoprefixer', 'transform-package-json'),
gulp.series('sass'),
gulp.series('temprarily-copy-token-files', 'sass'),
gulp.series('build-components'),
),
);
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
},
"dependencies": {
"@popperjs/core": "2.11.8",
"@swisspost/design-system-tokens": "workspace:*",
"bootstrap": "5.3.3"
},
"devDependencies": {
"@swisspost/design-system-tokens": "workspace:*",
"@swisspost/design-system-icons": "workspace:8.0.0",
"@types/node": "20.14.12",
"autoprefixer": "10.4.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/placeholders/_modes.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@swisspost/design-system-tokens/mode' as mode;
@use '../tokens/temp/mode' as mode;
@use './../mixins/tokens';

%post-light {
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/tokens/_core.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@use '@swisspost/design-system-tokens/core';
@use './temp/core';
2 changes: 1 addition & 1 deletion packages/styles/src/tokens/_device.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@swisspost/design-system-tokens/device' as device;
@use './temp/device' as device;

@use './core';
@use './../mixins/tokens';
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/tokens/_external.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@swisspost/design-system-tokens/channel' as channel;
@use './temp/channel' as channel;

@use './core';
@use './../mixins/tokens';
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/tokens/_internal.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@swisspost/design-system-tokens/channel' as channel;
@use './temp/channel' as channel;

@use './core';
@use './../mixins/tokens';
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/tokens/_post-theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@swisspost/design-system-tokens/theme' as themes;
@use './temp/theme' as themes;

@use './core';
@use './../mixins/tokens';
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef0b1c1

Please sign in to comment.