-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to TypeScript and Node 18 (#152)
- Loading branch information
Showing
13 changed files
with
3,470 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"TYPESCRIPT": { | ||
"ABC": [ | ||
20, | ||
40, | ||
80, | ||
120 | ||
], | ||
"LOC": [ | ||
50, | ||
80, | ||
120, | ||
160 | ||
], | ||
"TOTAL_LOC": [ | ||
400, | ||
500, | ||
640, | ||
900 | ||
], | ||
"BLOCK_NESTING": [ | ||
6, | ||
8, | ||
10, | ||
12 | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { readFileSync } from 'node:fs'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { resolve, dirname } from 'node:path'; | ||
|
||
import svg64 from '../dist/svg64.module.js'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
const svg = readFileSync(resolve(__dirname, '..', 'assets', 'loader.svg'), 'utf-8'); | ||
const result = svg64(svg); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "svg64", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "Convert SVG to base64 anywhere", | ||
"keywords": [ | ||
"SVG convert", | ||
|
@@ -15,20 +15,28 @@ | |
"license": "MIT", | ||
"author": "Atanas Atanasov <[email protected]> (https://atanas.info)", | ||
"funding": "https://github.com/sponsors/scriptex", | ||
"main": "dist/svg64.js", | ||
"type": "module", | ||
"source": "src/svg64.ts", | ||
"exports": { | ||
"require": "./dist/svg64.cjs", | ||
"default": "./dist/svg64.modern.js" | ||
}, | ||
"main": "./dist/svg64.cjs", | ||
"types": "./dist/svg64.d.ts", | ||
"module": "./dist/svg64.module.js", | ||
"unpkg": "./dist/svg64.umd.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "github:scriptex/svg64" | ||
}, | ||
"scripts": { | ||
"js": "mkdir dist && uglifyjs src/svg64.js -o dist/svg64.js", | ||
"clean": "rm -rf dist && rm -rf demo/dist", | ||
"copy": "cp -r dist demo", | ||
"demo": "node ./demo/scripts/node.js", | ||
"build": "yarn clean && yarn js && yarn copy" | ||
"demo": "node ./demo/scripts/node.mjs", | ||
"build": "microbundle && yarn copy", | ||
"start": "microbundle watch" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"uglify-js": "3.17.4" | ||
"microbundle": "0.15.1" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
c3c6a1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
svg64 – ./
svg64-git-master-atanas.vercel.app
svg64.atanas.info
svg64-atanas.vercel.app