svg-path-commander 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dts.config.ts ADDED
@@ -0,0 +1,15 @@
1
+ const config = {
2
+ entries: [
3
+ {
4
+ filePath: "./src/index.ts",
5
+ outFile: "./dist/svg-path-commander.d.ts",
6
+ noCheck: false,
7
+ output: {
8
+ umdModuleName: 'SVGPathCommander',
9
+ noBanner: true,
10
+ }
11
+ },
12
+ ],
13
+ };
14
+
15
+ module.exports = config;
package/package.json CHANGED
@@ -2,23 +2,13 @@
2
2
  "name": "svg-path-commander",
3
3
  "author": "thednp",
4
4
  "license": "MIT",
5
- "version": "2.0.0",
5
+ "version": "2.0.1",
6
6
  "description": "TypeScript tools for SVG processing and converting path data",
7
7
  "source": "src/index.ts",
8
- "main": "./dist/svg-path-commander.js",
9
- "module": "./dist/svg-path-commander.mjs",
10
- "types": "./dist/svg-path-commander.d.ts",
11
- "files": [
12
- "dist",
13
- "src"
14
- ],
15
- "exports": {
16
- ".": {
17
- "import": "./dist/svg-path-commander.mjs",
18
- "require": "./dist/svg-path-commander.cjs",
19
- "types": "./dist/svg-path-commander.d.ts"
20
- }
21
- },
8
+ "main": "dist/svg-path-commander.js",
9
+ "module": "dist/svg-path-commander.cjs",
10
+ "esnext": "dist/svg-path-commander.mjs",
11
+ "types": "dist/svg-path-commander.d.ts",
22
12
  "scripts": {
23
13
  "pre-test": "npm run clean-coverage",
24
14
  "test": "npm run pre-test && cypress run",
@@ -75,9 +65,9 @@
75
65
  "prettier": "^2.8.1",
76
66
  "rimraf": "^3.0.2",
77
67
  "typescript": "^4.9.4",
78
- "vite": "^4.0.3"
68
+ "vite": "^4.0.4"
79
69
  },
80
70
  "dependencies": {
81
- "@thednp/dommatrix": "^2.0.0-alpha3"
71
+ "@thednp/dommatrix": "^2.0.2"
82
72
  }
83
73
  }
package/tsconfig.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ // https://janessagarrow.com/blog/typescript-and-esbuild/
3
+ "compilerOptions": {
4
+ "lib": ["DOM", "ESNext", "DOM.Iterable"],
5
+ "types": ["vite", "vite/client", "cypress", "@thednp/dommatrix"],
6
+ "rootDir": "./",
7
+ "baseUrl": "./",
8
+ "module": "ESNext",
9
+ "target": "ESNext",
10
+ "moduleResolution": "Node",
11
+ "allowJs": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "useDefineForClassFields": true,
14
+ "strict": true,
15
+ "sourceMap": true,
16
+ "resolveJsonModule": true,
17
+ "esModuleInterop": true,
18
+ "isolatedModules": false,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noImplicitReturns": true,
22
+ "removeComments": false,
23
+ "allowSyntheticDefaultImports": true,
24
+ "noEmit": true,
25
+ },
26
+ "include": ["src/*", "src/**/*"],
27
+ "exclude": ["node_modules", "experiments", "coverage", "dist"],
28
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ import {resolve} from 'path';
3
+ import { defineConfig } from 'vite';
4
+ import { name, version } from './package.json';
5
+
6
+ const getPackageName = () => {
7
+ return name.includes('@') ? name.split('/')[1] : name;
8
+ };
9
+
10
+ const NAME = 'SVGPathCommander';
11
+
12
+ const fileName = {
13
+ es: `${getPackageName()}.mjs`,
14
+ cjs: `${getPackageName()}.cjs`,
15
+ iife: `${getPackageName()}.js`,
16
+ };
17
+
18
+ export default defineConfig({
19
+ base: './',
20
+ build: {
21
+ emptyOutDir: true,
22
+ outDir: 'dist',
23
+ lib: {
24
+ entry: resolve(__dirname, 'src/index.ts'),
25
+ name: NAME,
26
+ formats: ['es', 'cjs', 'iife'],
27
+ fileName: (format: string) => fileName[format],
28
+ },
29
+ target: 'ESNext',
30
+ sourcemap: true,
31
+ minify: 'esbuild',
32
+ },
33
+ esbuild: {
34
+ charset: 'utf8',
35
+ treeShaking: true,
36
+ }
37
+ });
38
+