chore(splitjs): get build & test to work

This commit is contained in:
Elian Doran 2025-10-21 18:33:12 +03:00
parent 87d6771c47
commit 429767e45c
No known key found for this signature in database
3 changed files with 498 additions and 37 deletions

View File

@ -16,7 +16,7 @@
"license": "MIT",
"homepage": "https://split.js.org/",
"scripts": {
"test": "karma start",
"test": "pnpm build && karma start",
"prepublish": "rollup -c",
"build": "rollup -c && npm run size",
"watch": "rollup -cw",
@ -37,5 +37,13 @@
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/splitjs"
},
"devDependencies": {
"@rollup/plugin-buble": "1.0.3",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
"karma-firefox-launcher": "2.1.3",
"karma-jasmine": "5.1.0",
"rollup-plugin-terser": "7.0.2"
}
}

View File

@ -1,14 +1,13 @@
import buble from '@rollup/plugin-buble'
import { terser } from 'rollup-plugin-terser'
const pkg = require('./package.json')
import pkg from "./package.json" with { type: "json" };
const output = {
format: 'umd',
file: pkg.main,
file: "dist/split.js",
name: 'Split',
sourcemap: false,
banner: `/*! Split.js - v${pkg.version} */\n`,
banner: `/*! Split.js - v${pkg.version} */\n`
}
export default [
@ -17,7 +16,7 @@ export default [
output: [
output,
{
file: pkg.module,
file: "dist/split.min.js",
format: 'esm',
sourcemap: false,
},
@ -29,7 +28,7 @@ export default [
output: {
...output,
sourcemap: true,
file: pkg['minified:main'],
file: "dist/split.min.js",
},
plugins: [buble(), terser()],
},

514
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff