Skip to content

Commit

Permalink
Add scss back in
Browse files Browse the repository at this point in the history
  • Loading branch information
folkforms committed May 21, 2024
1 parent 7516399 commit 230f970
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 34 deletions.
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "../packages/carbon-addons-devenv/src/scss/index.scss";
import "../packages/custom-carbon-addons/src/scss/index.scss";

export const parameters = {
Expand Down
1 change: 1 addition & 0 deletions packages/carbon-addons-devenv/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright Merative US L.P. 2021, 2024
*/
import "./scss/index.scss";
import sampleRenderers from "../sample_renderers";

export default sampleRenderers;
15 changes: 1 addition & 14 deletions packages/carbon-addons-entrypoint/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,8 @@ import "regenerator-runtime/runtime";
// eslint-disable-next-line import/no-unresolved
import sampleRenderers from "devenv_pkg/src";
// eslint-disable-next-line import/no-unresolved
import { renderers } from "custom_pkg/src";
import renderers from "custom_pkg/src";

// FIXME Is this used?
/*
Use when the main bundle is not on the same level as the script calling it.
Webpack will reference this path when emitting the chunks
*/
export const usePublicPath = async (path) => {
if (path) {
// eslint-disable-next-line camelcase, no-undef
__webpack_public_path__ = path;
}
};

// FIXME Eventually get rid of this...
/* Imports Carbon Addons dynamically */
const requireCustomCarbonAddons = async () => {
const customCarbonAddons = await import(
Expand Down
16 changes: 2 additions & 14 deletions packages/custom-carbon-addons/src/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
/*
* Copyright Merative US L.P. 2021, 2024
*/

// FIXME Delete this usePublicPath function
/*
Use when the main bundle is not on the same level as the script calling it.
Webpack will reference this path when emitting the chunks
*/
import "./scss/index.scss";
import renderers from "../renderers";

export const usePublicPath = async (path) => {
if (path) {
// eslint-disable-next-line camelcase, no-undef
__webpack_public_path__ = path;
}
};

export { renderers };
export default renderers;
4 changes: 2 additions & 2 deletions packages/custom-carbon-addons/src/scss/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../../carbon-addons-devenv/src/scss/app.scss";
// @import "../../../carbon-addons-devenv/src/scss/app.scss";

.spm-custom-component {
//-------------------------
Expand All @@ -8,7 +8,7 @@
//-------------------------
// Carbon-Components
//-------------------------
@import "../../../carbon-addons-devenv/src/scss/carbon-components.scss";
// @import "../../../carbon-addons-devenv/src/scss/carbon-components.scss";
//-------------------------
// Custom addons scss here
//-------------------------
Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module.exports = {
},
},
],
include: path.resolve(
__dirname,
"./packages/custom-carbon-addons/src/scss",
),
include: [
path.resolve(__dirname, "./packages/carbon-addons-devenv/src/scss"),
path.resolve(__dirname, "./packages/custom-carbon-addons/src/scss"),
],
},
{
test: /\.(js|jsx)$/,
Expand Down

0 comments on commit 230f970

Please sign in to comment.