@egjs/svelte-infinitegrid 4.7.1 → 4.8.0
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/.DS_Store +0 -0
- package/.gitignore +4 -0
- package/.npmignore +3 -0
- package/CHANGELOG.md +125 -0
- package/dist/infinitegrid.cjs.js +24 -138
- package/dist/infinitegrid.cjs.js.map +1 -1
- package/dist/infinitegrid.esm.js +24 -138
- package/dist/infinitegrid.esm.js.map +1 -1
- package/global.d.ts +8 -0
- package/package.json +3 -3
- package/rollup.build.config.js +32 -0
- package/rollup.config.js +83 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import buildHelper from "@egjs/build-helper";
|
|
2
|
+
import svelte from "rollup-plugin-svelte";
|
|
3
|
+
import sveltePreprocess from "svelte-preprocess";
|
|
4
|
+
|
|
5
|
+
const defaultOptions = {
|
|
6
|
+
tsconfig: "",
|
|
7
|
+
commonjs: true,
|
|
8
|
+
external: {
|
|
9
|
+
svelte: "svelte",
|
|
10
|
+
},
|
|
11
|
+
plugins: [
|
|
12
|
+
svelte({
|
|
13
|
+
preprocess: sveltePreprocess(),
|
|
14
|
+
}),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default buildHelper([
|
|
19
|
+
{
|
|
20
|
+
...defaultOptions,
|
|
21
|
+
input: "./src/index.umd.js",
|
|
22
|
+
output: "dist/infinitegrid.cjs.js",
|
|
23
|
+
format: "cjs",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
...defaultOptions,
|
|
27
|
+
input: "./src/index.js",
|
|
28
|
+
output: "dist/infinitegrid.esm.js",
|
|
29
|
+
format: "es",
|
|
30
|
+
exports: "named",
|
|
31
|
+
},
|
|
32
|
+
]);
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import svelte from 'rollup-plugin-svelte';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
4
|
+
import livereload from 'rollup-plugin-livereload';
|
|
5
|
+
import { terser } from 'rollup-plugin-terser';
|
|
6
|
+
import sveltePreprocess from 'svelte-preprocess';
|
|
7
|
+
import typescript from '@rollup/plugin-typescript';
|
|
8
|
+
import css from 'rollup-plugin-css-only';
|
|
9
|
+
|
|
10
|
+
const production = !process.env.ROLLUP_WATCH;
|
|
11
|
+
|
|
12
|
+
function serve() {
|
|
13
|
+
let server;
|
|
14
|
+
|
|
15
|
+
function toExit() {
|
|
16
|
+
if (server) server.kill(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
writeBundle() {
|
|
21
|
+
if (server) return;
|
|
22
|
+
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
|
23
|
+
stdio: ['ignore', 'inherit', 'inherit'],
|
|
24
|
+
shell: true
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
process.on('SIGTERM', toExit);
|
|
28
|
+
process.on('exit', toExit);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
input: 'src/main.ts',
|
|
35
|
+
output: {
|
|
36
|
+
sourcemap: true,
|
|
37
|
+
format: 'iife',
|
|
38
|
+
name: 'app',
|
|
39
|
+
file: 'public/build/bundle.js'
|
|
40
|
+
},
|
|
41
|
+
plugins: [
|
|
42
|
+
svelte({
|
|
43
|
+
preprocess: sveltePreprocess({ sourceMap: !production }),
|
|
44
|
+
compilerOptions: {
|
|
45
|
+
// enable run-time checks when not in production
|
|
46
|
+
dev: !production
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
// we'll extract any component CSS out into
|
|
50
|
+
// a separate file - better for performance
|
|
51
|
+
css({ output: 'bundle.css' }),
|
|
52
|
+
|
|
53
|
+
// If you have external dependencies installed from
|
|
54
|
+
// npm, you'll most likely need these plugins. In
|
|
55
|
+
// some cases you'll need additional configuration -
|
|
56
|
+
// consult the documentation for details:
|
|
57
|
+
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
|
58
|
+
resolve({
|
|
59
|
+
browser: true,
|
|
60
|
+
dedupe: ['svelte']
|
|
61
|
+
}),
|
|
62
|
+
commonjs(),
|
|
63
|
+
typescript({
|
|
64
|
+
sourceMap: !production,
|
|
65
|
+
inlineSources: !production
|
|
66
|
+
}),
|
|
67
|
+
|
|
68
|
+
// In dev mode, call `npm run start` once
|
|
69
|
+
// the bundle has been generated
|
|
70
|
+
!production && serve(),
|
|
71
|
+
|
|
72
|
+
// Watch the `public` directory and refresh the
|
|
73
|
+
// browser on changes when not in production
|
|
74
|
+
!production && livereload('public'),
|
|
75
|
+
|
|
76
|
+
// If we're building for production (npm run build
|
|
77
|
+
// instead of npm run dev), minify
|
|
78
|
+
production && terser()
|
|
79
|
+
],
|
|
80
|
+
watch: {
|
|
81
|
+
clearScreen: false
|
|
82
|
+
}
|
|
83
|
+
};
|