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/tasks/build.js CHANGED
@@ -1,14 +1,16 @@
1
- const execa = require('execa')
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 = require('../package.json')
11
+ const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')))
10
12
 
11
- const babel = './node_modules/.bin/babel'
12
- await sh(`${babel} --no-babelrc src -d ${pkg.main} --config-file=./.babelrc-cjs`)
13
- await sh(`${babel} --no-babelrc src -d ${pkg.module} --config-file=./.babelrc-esm`)
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
  })()
@@ -1,5 +1,5 @@
1
1
  import test from 'ava'
2
- import { qs, createRouter } from '../src'
2
+ import { qs, createRouter } from '../src/index'
3
3
 
4
4
  test('createRouter, listen, navigate and dispose', (t) => {
5
5
  const calls = []
package/.babelrc-cjs DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/preset-env",
5
- {
6
- "loose": true,
7
- "targets": {
8
- "browsers": [
9
- "last 2 versions",
10
- "IE >= 9"
11
- ]
12
- },
13
- "exclude": ["transform-regenerator"]
14
- }
15
- ]
16
- ]
17
- }
File without changes