jquery.dgtable 2.0.1 → 2.0.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jquery.dgtable",
3
3
  "description": "High-performance table View for jQuery",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "main": "dist/lib.cjs.min.js",
6
6
  "module": "dist/lib.es6.min.js",
7
7
  "broswer": "dist/lib.umd.min.js",
@@ -28,7 +28,7 @@
28
28
  }
29
29
  ],
30
30
  "dependencies": {
31
- "@danielgindi/dgtable.js": "^2.0.1"
31
+ "@danielgindi/dgtable.js": "^2.0.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/core": "^7.28.5",
package/scripts/build.js DELETED
@@ -1,162 +0,0 @@
1
- /* eslint-disable no-console */
2
-
3
- import Path from 'node:path';
4
- import { readFile, writeFile, rmdir, mkdir } from 'node:fs/promises';
5
- import { rollup } from 'rollup';
6
- import { babel } from '@rollup/plugin-babel';
7
- import PluginTerser from '@rollup/plugin-terser';
8
- import { nodeResolve } from '@rollup/plugin-node-resolve';
9
- import PluginCommonjs from '@rollup/plugin-commonjs';
10
- import { fileURLToPath } from 'node:url';
11
-
12
- (async () => {
13
-
14
- try {
15
- await rmdir('./dist', { recursive: true });
16
- } catch (ignored) { /* ignored */ }
17
- await mkdir('./dist');
18
-
19
- const rollupTasks = [{
20
- dest: 'dist/lib.es6.js',
21
- sourceMap: true,
22
- outputFormat: 'esm',
23
- babelTargets: {
24
- node: 10,
25
- },
26
- minified: false,
27
- ecmaVersion: 6,
28
- }, {
29
- dest: 'dist/lib.es6.min.js',
30
- sourceMap: true,
31
- outputFormat: 'esm',
32
- babelTargets: {
33
- node: 10,
34
- },
35
- minified: true,
36
- ecmaVersion: 6,
37
- }, {
38
- dest: 'dist/lib.umd.js',
39
- sourceMap: true,
40
- outputFormat: 'umd',
41
- outputExports: 'default',
42
- babelTargets: '> 0.25%, not dead',
43
- minified: false,
44
- ecmaVersion: 6,
45
- outputName: 'DGTableJQuery',
46
- }, {
47
- dest: 'dist/lib.umd.min.js',
48
- sourceMap: true,
49
- outputFormat: 'umd',
50
- outputExports: 'default',
51
- babelTargets: '> 0.25%, not dead',
52
- minified: true,
53
- ecmaVersion: 6,
54
- outputName: 'DGTableJQuery',
55
- }, {
56
- dest: 'dist/lib.cjs.js',
57
- sourceMap: true,
58
- outputFormat: 'cjs',
59
- outputExports: 'default',
60
- babelTargets: {
61
- node: 10,
62
- },
63
- minified: false,
64
- ecmaVersion: 6,
65
- }, {
66
- dest: 'dist/lib.cjs.min.js',
67
- sourceMap: true,
68
- outputFormat: 'cjs',
69
- outputExports: 'default',
70
- babelTargets: {
71
- node: 10,
72
- },
73
- minified: true,
74
- ecmaVersion: 6,
75
- }];
76
-
77
- const inputFile = 'index.js';
78
-
79
- for (let task of rollupTasks) {
80
- console.info('Generating ' + task.dest + '...');
81
-
82
- let plugins = [
83
- nodeResolve({
84
- mainFields: ['module', 'main'],
85
- }),
86
- PluginCommonjs({}),
87
- ];
88
-
89
- const pkg = JSON.parse(await readFile(Path.join(Path.dirname(fileURLToPath(import.meta.url)), '../package.json'), { encoding: 'utf8' }));
90
- const banner = [
91
- `/*!`,
92
- ` * ${pkg.name} ${pkg.version}`,
93
- ` * ${pkg.repository.url}`,
94
- ' */\n',
95
- ].join('\n');
96
-
97
- if (task.babelTargets) {
98
- plugins.push(babel({
99
- sourceMap: !!task.sourceMap,
100
- presets: [
101
- ['@babel/env', {
102
- targets: task.babelTargets,
103
- useBuiltIns: 'usage',
104
- corejs: 3,
105
- }],
106
- ],
107
- compact: false,
108
- minified: false,
109
- comments: true,
110
- retainLines: true,
111
- babelHelpers: 'bundled',
112
- exclude: 'node_modules/**/core-js/**/*',
113
- }));
114
- }
115
-
116
- if (task.minified) {
117
- plugins.push(PluginTerser({
118
- toplevel: true,
119
- compress: {
120
- ecma: task.ecmaVersion,
121
- passes: 2,
122
- },
123
- sourceMap: !!task.sourceMap,
124
- }));
125
- }
126
-
127
- const bundle = await rollup({
128
- preserveSymlinks: true,
129
- treeshake: true,
130
- onwarn(warning, warn) {
131
- if (warning.code === 'THIS_IS_UNDEFINED') return;
132
- warn(warning);
133
- },
134
- input: inputFile,
135
- plugins: plugins,
136
- external: ['jquery', 'jQuery'],
137
- });
138
-
139
- let generated = await bundle.generate({
140
- name: task.outputName,
141
- sourcemap: task.sourceMap ? 'hidden' : false,
142
- format: task.outputFormat,
143
- globals: {
144
- jquery: 'jQuery',
145
- },
146
- exports: task.outputExports,
147
- });
148
-
149
- let code = generated.output[0].code;
150
-
151
- if (task.sourceMap && generated.output[0].map) {
152
- let sourceMapOutPath = task.dest + '.map';
153
- await writeFile(sourceMapOutPath, generated.output[0].map.toString());
154
- code += '\n//# sourceMappingURL=' + Path.basename(sourceMapOutPath);
155
- }
156
-
157
- await writeFile(task.dest, code);
158
- }
159
-
160
- console.info('Done.');
161
-
162
- })();