@questwork/q-utilities 0.1.29 → 0.1.32
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/BEST_PRACTICES.md +217 -0
- package/BUILDING_JS_TS_LIBRARY.md +321 -0
- package/dist/q-utilities.cjs +12 -0
- package/dist/q-utilities.cjs.map +1 -0
- package/dist/q-utilities.d.ts +1035 -0
- package/dist/q-utilities.esm.js +2796 -4067
- package/dist/q-utilities.esm.js.map +1 -0
- package/dist/q-utilities.iife.js +12 -0
- package/dist/q-utilities.iife.js.map +1 -0
- package/dist/q-utilities.umd.js +12 -0
- package/dist/q-utilities.umd.js.map +1 -0
- package/package.json +23 -24
- package/tests/runtime-test.js +563 -0
- package/tsconfig.json +28 -0
- package/vite.config.js +73 -0
- package/vitest.config.js +9 -0
- package/dist/index.min.cjs +0 -4410
- package/dist/q-utilities.min.js +0 -4441
package/vite.config.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import dts from 'vite-plugin-dts'
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
dts({
|
|
8
|
+
include: ['lib/**/*.js', 'lib/**/*.ts'],
|
|
9
|
+
exclude: ['**/*.spec.js', '**/*.spec.ts'],
|
|
10
|
+
rollupTypes: true,
|
|
11
|
+
outDir: 'dist',
|
|
12
|
+
rootDir: 'lib',
|
|
13
|
+
}),
|
|
14
|
+
],
|
|
15
|
+
build: {
|
|
16
|
+
outDir: 'dist',
|
|
17
|
+
sourcemap: true,
|
|
18
|
+
lib: {
|
|
19
|
+
entry: path.resolve(__dirname, 'lib/index.ts'),
|
|
20
|
+
name: 'qUtilities', // This is the global variable name for IIFE/UMD
|
|
21
|
+
fileName: (format) => {
|
|
22
|
+
if (format === 'es') return 'q-utilities.esm.js'
|
|
23
|
+
if (format === 'cjs') return 'q-utilities.cjs'
|
|
24
|
+
if (format === 'umd') return 'q-utilities.umd.js'
|
|
25
|
+
if (format === 'iife') return 'q-utilities.iife.js'
|
|
26
|
+
return `q-utilities.${format}.js`
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
rollupOptions: {
|
|
30
|
+
external: [],
|
|
31
|
+
output: [
|
|
32
|
+
{
|
|
33
|
+
format: 'es',
|
|
34
|
+
generatedCode: 'es2015',
|
|
35
|
+
exports: 'named',
|
|
36
|
+
preserveModules: false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
format: 'cjs',
|
|
40
|
+
exports: 'named',
|
|
41
|
+
interop: 'auto'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
format: 'umd',
|
|
45
|
+
name: 'qUtilities',
|
|
46
|
+
exports: 'named',
|
|
47
|
+
extend: true,
|
|
48
|
+
esModule: true,
|
|
49
|
+
interop: 'auto'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
format: 'iife',
|
|
53
|
+
name: 'qUtilities',
|
|
54
|
+
exports: 'named',
|
|
55
|
+
extend: true,
|
|
56
|
+
esModule: false,
|
|
57
|
+
interop: 'auto'
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
test: {
|
|
63
|
+
environment: 'node',
|
|
64
|
+
coverage: {
|
|
65
|
+
reporter: ['text', 'html'],
|
|
66
|
+
},
|
|
67
|
+
globals: true,
|
|
68
|
+
setupFiles: ['lib/test.setup.js', 'lib/helpers/test.setup.js'],
|
|
69
|
+
mocha: {
|
|
70
|
+
ui: 'bdd',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
})
|
package/vitest.config.js
ADDED