Skip to content

Commit

Permalink
🐛 fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greatanimalion committed Aug 21, 2024
1 parent f1eb7f8 commit de56116
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "colorfontcolor",
"version": "1.0.2",
"version": "1.0.3",
"description": "Generate cool colors",
"type": "module",
"main": "./dist/index.cjs.js",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ export default [
entryFileNames: '[name].esm.js',
},
plugins: [resolve(), commonjs(), typescript(), terser(), cleanup()],
},{
entry: 'src/scripts/main.js',
dest: 'build/js/main.min.js',
format: 'iife',
sourceMap: 'inline',
}
];
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function colorFont(el: Element | string, config:any = {color:['red','gree
let colorType=''
const split=Math.floor(100/fontNum)
for(let i =0;i<fontNum;i++){
colorType+=i*split+'%{color:'+color[i]+';}'
colorType+=i*split+`%{color:${color[i]};text-shadow: 0 0 10px ${color[i]},0 0 20px ${color[i]},0 0 30px ${color[i]},0 0 40px ${color[i]};}`
}
const animation = `@keyframes ${className} {${colorType}}`;
let compiled
Expand Down

0 comments on commit de56116

Please sign in to comment.