Skip to content

Commit

Permalink
turn on blue dot
Browse files Browse the repository at this point in the history
  • Loading branch information
nakzyu committed Aug 27, 2024
1 parent f89ee9a commit ad14abf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.js → build.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
const fs = require("fs").promises;

const removeCommon = (text) => {
const removeCommon = (text: string) => {
const regex = /:root[\s\S]*?@-webkit-keyframes/;
return text.replace(regex, "@-webkit-keyframes");
};

const removeWebkitKeyframes = (text) => {
const removeWebkitKeyframes = (text: string) => {
const regex =
/@-webkit-keyframes\s+[\w-]+\s*\{[^{}]*?(?:\{[^{}]*?\}[^{}]*?)*\}/g;
return text.replace(regex, "");
};

const removeCSSClass = (text) => {
const removeCSSClass = (text: string) => {
const regex = /\.[\w-]+(?:\.[\w-]+)*\s*\{[^{}]*?(?:\{[^{}]*?\}[^{}]*?)*\}/g;
return text.replace(regex, "");
};

const convertCSSKeyframesToJS = (text) => {
const convertCSSKeyframesToJS = (text: string) => {
const regex = /@keyframes\s+(\w+)\s*\{([^{}]*?(?:\{[^{}]*?\}[^{}]*?)*)\}/g;

let result;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "styled-components-animatecss",
"title": "Styled Components Animatecss",
"description": "Extract and convert keyframes from animate.css into a JavaScript module that can be imported and used with styled-components.",
"version": "1.0.2",
"version": "1.0.3",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"styled-components": "*"
},
"scripts": {
"build": "node build.js && swc index.ts -d dist && tsc",
"build": "tsc ./build.ts && node build.js && swc index.ts -d dist && tsc",
"prepublishOnly": "yarn build"
}
}

0 comments on commit ad14abf

Please sign in to comment.