rebuildjs 0.3.2 → 0.4.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/app/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { be_lock_memosig_triple_T, be_sig_triple_T } from 'ctx-core/rmemo'
1
+ import type { be_lock_memosig_triple_T, be_memo_pair_T, be_sig_triple_T } from 'ctx-core/rmemo'
2
2
  export const [
3
3
  port$_,
4
4
  port_,
@@ -34,11 +34,19 @@ export const [
34
34
  app_path_,
35
35
  app_path__set,
36
36
  ]:be_lock_memosig_triple_T<string>
37
+ export const [
38
+ browser_relative_path$_,
39
+ browser_relative_path_,
40
+ ]:be_memo_pair_T<string>
37
41
  export const [
38
42
  browser_path$_,
39
43
  browser_path_,
40
44
  browser_path__set,
41
45
  ]:be_lock_memosig_triple_T<string>
46
+ export const [
47
+ server_relative_path$_,
48
+ server_relative_path_,
49
+ ]:be_memo_pair_T<string>
42
50
  export const [
43
51
  server_path$_,
44
52
  server_path_,
package/app/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { be_lock_memosig_triple_, be_memosig_triple_, be_sig_triple_ } from 'ctx-core/rmemo'
1
+ import { be_lock_memosig_triple_, be_memo_pair_, be_memosig_triple_, be_sig_triple_ } from 'ctx-core/rmemo'
2
2
  import { join, resolve } from 'path'
3
- import { app_ctx__be_config } from 'relysjs'
3
+ import { app_ctx__be_config } from '../ctx/index.js'
4
4
  export const [
5
5
  port$_,
6
6
  port_,
@@ -25,13 +25,6 @@ export const [
25
25
  process.env.NODE_ENV === 'production',
26
26
  app_ctx__be_config
27
27
  )
28
- export const [
29
- dist_path$_,
30
- dist_path_,
31
- dist_path__set,
32
- ] = be_memosig_triple_(ctx=>
33
- join(cwd_(ctx), 'dist'),
34
- app_ctx__be_config)
35
28
  export const [
36
29
  public_path$_,
37
30
  public_path_,
@@ -39,6 +32,13 @@ export const [
39
32
  ] = be_lock_memosig_triple_(ctx=>
40
33
  join(cwd_(ctx), 'public'),
41
34
  app_ctx__be_config)
35
+ export const [
36
+ dist_path$_,
37
+ dist_path_,
38
+ dist_path__set,
39
+ ] = be_memosig_triple_(ctx=>
40
+ join(cwd_(ctx), 'dist'),
41
+ app_ctx__be_config)
42
42
  export const [
43
43
  src_path$_,
44
44
  src_path_,
@@ -53,17 +53,29 @@ export const [
53
53
  ] = be_lock_memosig_triple_(ctx=>
54
54
  join(src_path_(ctx), 'app'),
55
55
  app_ctx__be_config)
56
+ export const [
57
+ browser_relative_path$_,
58
+ browser_relative_path_,
59
+ ] = be_memo_pair_(ctx=>
60
+ join('dist', is_prod_(ctx) ? 'browser' : 'dev-browser'),
61
+ app_ctx__be_config)
56
62
  export const [
57
63
  browser_path$_,
58
64
  browser_path_,
59
65
  browser_path__set,
60
66
  ] = be_lock_memosig_triple_(ctx=>
61
- join(dist_path_(ctx), is_prod_(ctx) ? 'browser' : 'dev-browser'),
67
+ join(cwd_(ctx), browser_relative_path_(ctx)),
68
+ app_ctx__be_config)
69
+ export const [
70
+ server_relative_path$_,
71
+ server_relative_path_,
72
+ ] = be_memo_pair_(ctx=>
73
+ join('dist', is_prod_(ctx) ? 'server' : 'dev-server'),
62
74
  app_ctx__be_config)
63
75
  export const [
64
76
  server_path$_,
65
77
  server_path_,
66
78
  server_path__set,
67
79
  ] = be_lock_memosig_triple_(ctx=>
68
- join(dist_path_(ctx), is_prod_(ctx) ? 'server' : 'dev-server'),
80
+ join(cwd_(ctx), server_relative_path_(ctx)),
69
81
  app_ctx__be_config)
package/browser/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { nullish__none_, tup } from 'ctx-core/function'
2
2
  import { be_memo_pair_, be_sig_triple_ } from 'ctx-core/rmemo'
3
+ import { browser_relative_path_ } from '../app/index.js'
3
4
  import { app_ctx__be_config, middleware_ctx__be_config } from '../ctx/index.js'
4
5
  import { server__input_path_ } from '../server/index.js'
5
6
  export const [
@@ -40,7 +41,7 @@ export const [
40
41
  browser__script$_,
41
42
  browser__script_,
42
43
  ] = be_memo_pair_(ctx=>
43
- nullish__none_([browser__output_path_(ctx)],
44
- browser__output_path=>
45
- browser__output_path.replace('dist/dev-browser', '')),
44
+ nullish__none_([browser__output_path_(ctx), browser_relative_path_(ctx)],
45
+ (browser__output_path, browser_relative_path)=>
46
+ browser__output_path.replace(browser_relative_path, '')),
46
47
  { ...middleware_ctx__be_config, id: 'browser__script' })
package/build/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  server__input_path__set,
15
15
  server__metafile_,
16
16
  server__metafile__set
17
- } from '../server'
17
+ } from '../server/index.js'
18
18
  /**
19
19
  * @param {Partial<BuildOptions>}config
20
20
  * @returns {Promise<void>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuildjs",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Reactive esbuild...simple hackable alternative to vite for Multi Page Apps",
5
5
  "keywords": [
6
6
  "reactive",
@@ -47,6 +47,7 @@
47
47
  "dependencies": {
48
48
  "ctx-core": "^4.15.0",
49
49
  "elysia": "^0.7.30",
50
+ "esbuild": "^0.19.9",
50
51
  "fdir": "^6.1.1",
51
52
  "picomatch": "^3.0.1"
52
53
  },
@@ -67,7 +68,7 @@
67
68
  "clean": ":",
68
69
  "exec": "$@",
69
70
  "test": "pnpm test-unit && check-dts",
70
- "test-unit": "tsx node_modules/uvu/bin.js . '\\\\.test\\\\.(ts|js)$'",
71
+ "test-unit": "tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
71
72
  "test-unit-coverage": "c8 pnpm test-unit"
72
73
  }
73
74
  }