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

Embedded Style Asset Partials #183

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion .core/gulp.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const defaultConfig = {
js: ['src/app/**/*', 'reactium_modules/**/*'],
markup: ['src/**/*.html', 'src/**/*.css', 'reactium_modules/**/*.css'],
colors: ['src/**/*/colors.json'],
pluginAssets: ['src/app/**/plugin-assets.json'],
pluginAssets: [
'src/app/**/plugin-assets.json',
'src/app/**/style-assets.json',
],
restartWatches: [
'src/**/assets/style/*.scss',
'!src/**/assets/style/_*.scss',
Expand Down
8 changes: 4 additions & 4 deletions .core/gulp.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ $assets: map.set($assets, "{{key}}", "{{{dataURL}}}");
fileName,
)} to partial at ${path.resolve(
base,
'_plugin-assets.scss',
'_reactium-style-variables.scss',
)}`,
);
const dataURL = await fileReader(
Expand All @@ -528,13 +528,13 @@ $assets: map.set($assets, "{{key}}", "{{{dataURL}}}");
}

fs.writeFileSync(
path.resolve(base, '_plugin-assets.scss'),
path.resolve(base, '_reactium-style-variables.scss'),
pluginAssetsTemplate(mappings),
'utf8',
);
} catch (error) {
console.error(
'error generating sass partial _plugin-assets.scss in ' +
'error generating sass partial _reactium-style-variables.scss in ' +
base,
error,
);
Expand Down Expand Up @@ -792,8 +792,8 @@ $assets: map.set($assets, "{{key}}", "{{{dataURL}}}");

const styles = gulp.series(
task('styles:colors'),
task('styles:partials'),
task('styles:pluginAssets'),
task('styles:partials'),
task('styles:compile'),
);

Expand Down