space-router 0.8.5 → 0.9.1
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/.swc-cjs +11 -0
- package/CHANGELOG.md +9 -0
- package/LICENSE +1 -1
- package/dist/cjs/history.js +89 -100
- package/dist/cjs/index.js +23 -13
- package/dist/cjs/match.js +82 -85
- package/dist/cjs/qs.js +24 -20
- package/dist/cjs/router.js +251 -187
- package/dist/esm/history.js +81 -94
- package/dist/esm/index.js +3 -3
- package/dist/esm/match.js +65 -79
- package/dist/esm/qs.js +17 -20
- package/dist/esm/router.js +235 -161
- package/package.json +13 -15
- package/tasks/build.js +9 -7
- package/test/router.test.js +1 -1
- package/.babelrc-cjs +0 -17
- /package/{.babelrc-esm → .swc-esm} +0 -0
package/tasks/build.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
const sh = (...args) => execa(...args, { stdio: 'inherit', shell: true })
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
4
3
|
|
|
5
4
|
;(async function () {
|
|
5
|
+
const { execa } = await import('execa')
|
|
6
|
+
const sh = (...args) => execa(...args, { stdio: 'inherit', shell: true })
|
|
7
|
+
|
|
6
8
|
await sh('rm -rf dist')
|
|
7
9
|
await sh('mkdir -p dist')
|
|
8
10
|
|
|
9
|
-
const pkg =
|
|
11
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')))
|
|
10
12
|
|
|
11
|
-
const
|
|
12
|
-
await sh(`${
|
|
13
|
-
await sh(`${
|
|
13
|
+
const swc = './node_modules/.bin/swc'
|
|
14
|
+
await sh(`${swc} --no-swcrc src -d ${pkg.main} --config-file=./.swc-cjs`)
|
|
15
|
+
await sh(`${swc} --no-swcrc src -d ${pkg.module} --config-file=./.swc-esm`)
|
|
14
16
|
})()
|
package/test/router.test.js
CHANGED
package/.babelrc-cjs
DELETED
|
File without changes
|