Skip to content

Commit 92b7b06

Browse files
committed
wip
1 parent 86eae8a commit 92b7b06

File tree

8 files changed

+40
-26
lines changed

8 files changed

+40
-26
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "./api-extractor.base.json",
3-
"mainEntryPointFilePath": "./dist/types/mobile/mobile-exports.d.ts",
3+
"mainEntryPointFilePath": "./dist/types/mobile/index.mobile-editor.d.ts",
44
"dtsRollup": {
55
"enabled": true,
6-
"untrimmedFilePath": "./editor/mobile-exports.d.ts"
6+
"untrimmedFilePath": "./editor/mobile-editor.d.ts"
77
}
88
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "./api-extractor.base.json",
3-
"mainEntryPointFilePath": "./dist/types/web/web-exports.d.ts",
3+
"mainEntryPointFilePath": "./dist/types/web/index.web-editor.d.ts",
44
"dtsRollup": {
55
"enabled": true,
6-
"untrimmedFilePath": "./editor/web-exports.d.ts"
6+
"untrimmedFilePath": "./editor/web-editor.d.ts"
77
}
88
}
Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
const esbuild = require('esbuild')
2-
const outfile = './dist/global/index.js'
3-
esbuild
4-
.build({
5-
entryPoints: ['./src/index.global.ts'],
6-
outfile: outfile,
7-
bundle: true,
8-
minify: true,
9-
})
10-
.catch((err) => {
2+
3+
const outfileMinified = './dist/global/index.min.js'
4+
const outfileUnminified = './dist/global/index.js'
5+
6+
async function build() {
7+
try {
8+
// Build minified version
9+
await esbuild.build({
10+
entryPoints: ['./src/index.global.ts'],
11+
outfile: outfileMinified,
12+
bundle: true,
13+
minify: true,
14+
})
15+
console.log(`wrote: ${outfileMinified}`)
16+
17+
// Build unminified version
18+
await esbuild.build({
19+
entryPoints: ['./src/index.global.ts'],
20+
outfile: outfileUnminified,
21+
bundle: true,
22+
minify: false,
23+
})
24+
console.log(`wrote: ${outfileUnminified}`)
25+
} catch (err) {
1126
console.error(err)
1227
process.exit(1)
13-
})
14-
.then(() => {
15-
console.log(`wrote: ${outfile}`)
16-
})
28+
}
29+
}
30+
31+
build()

packages/signals/signals-runtime/extract-editor-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const main = async () => {
3838
// eslint-disable-next-line no-undef
3939
execSync('npx api-extractor run --config ./api-extractor.mobile.json --local')
4040
execSync('npx api-extractor run --config ./api-extractor.web.json --local')
41-
const outputs = ['./editor/web-exports.d.ts', './editor/mobile-exports.d.ts']
41+
const outputs = ['./editor/web-editor.d.ts', './editor/mobile-editor.d.ts']
4242
await Promise.all(outputs.map(removeExports))
4343
await Promise.all(outputs.map(prependGenerated))
4444
console.log('wrote:', outputs.join(', '))

packages/signals/signals-runtime/src/mobile/mobile-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SignalsRuntime } from '../shared/signals-runtime'
2-
import { ISignalsRuntime } from './mobile-exports'
2+
import { ISignalsRuntime } from './index.mobile-editor'
33
import { Signal } from './mobile-signals-types'
44

55
export type Signals = ISignalsRuntime<Signal>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Entry point for the definitions
3+
*/
4+
export * from './web-signals-types'
5+
export * from '../shared/shared-types'
6+
export * from './web-runtime'

packages/signals/signals-runtime/src/web/web-exports.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)