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/.eslintrc.cjs +224 -0
- package/.lgtm.yml +9 -0
- package/.prettierrc.json +15 -0
- package/README.md +1 -1
- package/cypress/e2e/svg-path-commander.spec.ts +826 -0
- package/cypress/fixtures/shapeObjects.js +11 -0
- package/cypress/fixtures/shapes.js +104 -0
- package/cypress/fixtures/simpleShapes.js +75 -0
- package/cypress/plugins/esbuild-istanbul.ts +50 -0
- package/cypress/plugins/tsCompile.ts +34 -0
- package/cypress/support/commands.ts +37 -0
- package/cypress/support/e2e.ts +21 -0
- package/cypress/test.html +36 -0
- package/cypress.config.ts +29 -0
- package/dist/svg-path-commander.cjs +1 -1
- package/dist/svg-path-commander.cjs.map +1 -1
- package/dist/svg-path-commander.js +1 -1
- package/dist/svg-path-commander.js.map +1 -1
- package/dist/svg-path-commander.mjs +325 -276
- package/dist/svg-path-commander.mjs.map +1 -1
- package/dts.config.ts +15 -0
- package/package.json +7 -17
- package/tsconfig.json +28 -0
- package/vite.config.ts +38 -0
package/dts.config.ts
ADDED
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.
|
|
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": "
|
|
9
|
-
"module": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
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.
|
|
68
|
+
"vite": "^4.0.4"
|
|
79
69
|
},
|
|
80
70
|
"dependencies": {
|
|
81
|
-
"@thednp/dommatrix": "^2.0.
|
|
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
|
+
|