Skip to content

Commit

Permalink
merge css inject
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rodrigues committed Jun 8, 2023
1 parent 94eea98 commit 60abef5
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 deletions.
3 changes: 1 addition & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "leux",
"version": "0.2.8",
"version": "0.2.9",
"homepage": "https://leux.vercel.app/",
"description": "React components library",
"publishConfig": {
Expand Down Expand Up @@ -79,7 +79,6 @@
"rollup": "^2.79.0",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-includepaths": "^0.2.4",
"rollup-plugin-merge-and-inject-css": "^1.1.3",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
Expand Down
13 changes: 7 additions & 6 deletions rollup.config.js
Expand Up @@ -13,8 +13,6 @@ import cssnested from "postcss-nested";
// eslint-disable-next-line node/no-missing-import
import cssimport from "postcss-import";

import cssmerge from "rollup-plugin-merge-and-inject-css";

import peerDepsExternal from "rollup-plugin-peer-deps-external";
import eslint from "@rollup/plugin-eslint";
import eslintConfig from "./.eslintrc.json";
Expand All @@ -38,13 +36,16 @@ export default [
],
plugins: [
postcss({
extract: "leux.min.css",
inject: true,
modules: true,
minimize: true,
plugins: [cssimport(), simplevars(), cssnested()],
include: ["src/**/*.scss"],
}),
cssmerge({
id: "leux.min.css",
use: {
sass: true,
stylus: null,
less: null,
},
}),
peerDepsExternal(),
commonjs(),
Expand Down
9 changes: 9 additions & 0 deletions src/components/CSS/CSS.tsx
@@ -0,0 +1,9 @@
import React from "react";

import "./global.scss";
import "./variables.scss";
import "./main.scss";

const LeCSS = () => <></>;

export { LeCSS };
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/CSS/index.ts
@@ -0,0 +1 @@
export * from "./CSS";
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/index.ts
Expand Up @@ -22,3 +22,4 @@ export * from "./ToastContext";
export * from "./ToastProvider";
export * from "./Tooltip";
export * from "./Topography";
export * from "./CSS";
1 change: 0 additions & 1 deletion src/index.ts
@@ -1,4 +1,3 @@
export * from "./components";
export * from "./types";
export * as LeCSS from "./styles";
export * from "./utils";
3 changes: 0 additions & 3 deletions src/styles/index.ts

This file was deleted.

0 comments on commit 60abef5

Please sign in to comment.