Skip to content

Commit 36f9ade

Browse files
committed
init the project
1 parent 483b417 commit 36f9ade

25 files changed

+8700
-2
lines changed

.eslintrc.cjs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true,
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended"
11+
],
12+
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"@typescript-eslint"
20+
],
21+
"rules": {
22+
"@typescript-eslint/ban-ts-comment": "off",
23+
"@typescript-eslint/no-unused-vars": ["error", {argsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_"}]
24+
}
25+
}

CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CONTRIBUTING
2+
3+
See [Contribution Guidelines here](https://github.com/mzusin/index/blob/main/CONTRIBUTING.md).

babel.config.cjs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: {
7+
node: 'current'
8+
}
9+
}
10+
]
11+
]
12+
};

dist/index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module 'mz-svg' {
2+
3+
// export type Vector2 = [number, number];
4+
5+
// export const vSum: (vector1: Vector, vector2: Vector, decimalPlaces?: number) => Vector;
6+
}

dist/mz-svg.esm.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mz-svg.esm.js.map

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mz-svg.min.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mz-svg.min.js.map

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mz-svg.node.cjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
mzSVG - the TypeScript-based library for manipulating and animating SVG.
3+
Version: 1.0.0
4+
Author: Miriam Zusin
5+
6+
Documentation: https://github.com/mzusin/mz-svg
7+
Licensed GPLv3 for open source use, or Commercial License for commercial use - https://github.com/mzusin/index/blob/main/LICENSE.md
8+
*/
9+
var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(e,o)=>{for(var t in o)c(e,t,{get:o[t],enumerable:!0})},x=(e,o,t,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of n(o))!p.call(e,r)&&r!==t&&c(e,r,{get:()=>o[r],enumerable:!(l=m(o,r))||l.enumerable});return e};var f=e=>x(c({},"__esModule",{value:!0}),e);var h={};s(h,{vSum:()=>g});module.exports=f(h);var g=()=>{console.log("here")};0&&(module.exports={vSum});
10+
//# sourceMappingURL=mz-svg.node.cjs.map

dist/mz-svg.node.cjs.map

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../src/index-esm.ts", "../src/vector.ts"],
4+
"sourcesContent": ["export * from './vector';", "export const vSum = () => {\n\n console.log('here')\n};"],
5+
"mappings": ";;;;;;;;4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,IAAA,eAAAC,EAAAH,GCAO,IAAMI,EAAO,IAAM,CAEtB,QAAQ,IAAI,MAAM,CACtB",
6+
"names": ["index_esm_exports", "__export", "vSum", "__toCommonJS", "vSum"]
7+
}

jest.config.ts

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property and type check, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
export default {
7+
// All imported modules in your tests should be mocked automatically
8+
// automock: false,
9+
10+
// Stop running tests after `n` failures
11+
// bail: 0,
12+
13+
// The directory where Jest should store its cached dependency information
14+
// cacheDirectory: "/private/var/folders/41/gm411lgd0wx9h3ck0tn93shc0000gn/T/jest_dx",
15+
16+
// Automatically clear mock calls, instances, contexts and results before every test
17+
clearMocks: true,
18+
19+
// Indicates whether the coverage information should be collected while executing the test
20+
// collectCoverage: false,
21+
22+
// An array of glob patterns indicating a set of files for which coverage information should be collected
23+
// collectCoverageFrom: undefined,
24+
25+
// The directory where Jest should output its coverage files
26+
// coverageDirectory: undefined,
27+
28+
// An array of regexp pattern strings used to skip coverage collection
29+
// coveragePathIgnorePatterns: [
30+
// "/node_modules/"
31+
// ],
32+
33+
// Indicates which provider should be used to instrument code for coverage
34+
// coverageProvider: "babel",
35+
36+
// A list of reporter names that Jest uses when writing coverage reports
37+
// coverageReporters: [
38+
// "json",
39+
// "text",
40+
// "lcov",
41+
// "clover"
42+
// ],
43+
44+
// An object that configures minimum threshold enforcement for coverage results
45+
// coverageThreshold: undefined,
46+
47+
// A path to a custom dependency extractor
48+
// dependencyExtractor: undefined,
49+
50+
// Make calling deprecated APIs throw helpful error messages
51+
// errorOnDeprecated: false,
52+
53+
// The default configuration for fake timers
54+
// fakeTimers: {
55+
// "enableGlobally": false
56+
// },
57+
58+
// Force coverage collection from ignored files using an array of glob patterns
59+
// forceCoverageMatch: [],
60+
61+
// A path to a module which exports an async function that is triggered once before all test suites
62+
// globalSetup: undefined,
63+
64+
// A path to a module which exports an async function that is triggered once after all test suites
65+
// globalTeardown: undefined,
66+
67+
// A set of global variables that need to be available in all test environments
68+
// globals: {},
69+
70+
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
71+
// maxWorkers: "50%",
72+
73+
// An array of directory names to be searched recursively up from the requiring module's location
74+
// moduleDirectories: [
75+
// "node_modules"
76+
// ],
77+
78+
// An array of file extensions your modules use
79+
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
80+
// moduleFileExtensions: [
81+
// "js",
82+
// "mjs",
83+
// "cjs",
84+
// "jsx",
85+
// "ts",
86+
// "tsx",
87+
// "json",
88+
// "node"
89+
// ],
90+
91+
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
92+
// moduleNameMapper: {},
93+
94+
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
95+
// modulePathIgnorePatterns: [],
96+
97+
// Activates notifications for test results
98+
// notify: false,
99+
100+
// An enum that specifies notification mode. Requires { notify: true }
101+
// notifyMode: "failure-change",
102+
103+
// A preset that is used as a base for Jest's configuration
104+
// preset: undefined,
105+
106+
// Run tests from one or more projects
107+
// projects: undefined,
108+
109+
// Use this configuration option to add custom reporters to Jest
110+
// reporters: undefined,
111+
112+
// Automatically reset mock state before every test
113+
// resetMocks: false,
114+
115+
// Reset the module registry before running each individual test
116+
// resetModules: false,
117+
118+
// A path to a custom resolver
119+
// resolver: undefined,
120+
121+
// Automatically restore mock state and implementation before every test
122+
// restoreMocks: false,
123+
124+
// The root directory that Jest should scan for tests and modules within
125+
// rootDir: undefined,
126+
127+
// A list of paths to directories that Jest should use to search for files in
128+
// roots: [
129+
// "<rootDir>"
130+
// ],
131+
132+
// Allows you to use a custom runner instead of Jest's default test runner
133+
// runner: "jest-runner",
134+
135+
// The paths to modules that run some code to configure or set up the testing environment before each test
136+
// setupFiles: [],
137+
138+
// A list of paths to modules that run some code to configure or set up the testing framework before each test
139+
// setupFilesAfterEnv: [],
140+
141+
// The number of seconds after which a test is considered as slow and reported as such in the results.
142+
// slowTestThreshold: 5,
143+
144+
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
145+
// snapshotSerializers: [],
146+
147+
// The test environment that will be used for testing
148+
// testEnvironment: "jest-environment-node",
149+
150+
// Options that will be passed to the testEnvironment
151+
// testEnvironmentOptions: {},
152+
153+
// Adds a location field to test results
154+
// testLocationInResults: false,
155+
156+
// The glob patterns Jest uses to detect test files
157+
// testMatch: [
158+
// "**/__tests__/**/*.[jt]s?(x)",
159+
// "**/?(*.)+(spec|test).[tj]s?(x)"
160+
// ],
161+
162+
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
163+
// testPathIgnorePatterns: [
164+
// "/node_modules/"
165+
// ],
166+
167+
// The regexp pattern or array of patterns that Jest uses to detect test files
168+
// testRegex: [],
169+
170+
// This option allows the use of a custom results processor
171+
// testResultsProcessor: undefined,
172+
173+
// This option allows use of a custom test runner
174+
// testRunner: "jest-circus/runner",
175+
176+
// A map from regular expressions to paths to transformers
177+
transform: {
178+
'^.+\\.ts?$': 'ts-jest'
179+
},
180+
181+
// transform: undefined,
182+
183+
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
184+
// transformIgnorePatterns: [
185+
// "/node_modules/",
186+
// "\\.pnp\\.[^\\/]+$"
187+
// ],
188+
189+
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
190+
// unmockedModulePathPatterns: undefined,
191+
192+
// Indicates whether each individual test should be reported during the run
193+
// verbose: undefined,
194+
195+
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
196+
// watchPathIgnorePatterns: [],
197+
198+
// Whether to use watchman for file crawling
199+
// watchman: true,
200+
};

0 commit comments

Comments
 (0)