@s-ui/bundler 9.75.0 → 9.77.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/README.md CHANGED
@@ -102,6 +102,21 @@ $ sui-bundler dev -L ../frontend-ma--uilib-components/components
102
102
 
103
103
  And of course you can combine `link-all` and `link-package` flags
104
104
 
105
+ #### Packages with their own watcher (dev script)
106
+
107
+ When using `--link-package` or `--link-all`, packages that define a `dev` script in their `package.json` are **automatically excluded** from being linked by `sui-bundler`. These packages are expected to handle their own file watching and compilation via their `dev` script, so linking them would be redundant or could cause conflicts.
108
+
109
+ ```json
110
+ // package.json of the linked package
111
+ {
112
+ "scripts": {
113
+ "dev": "tsup --watch" // this package will NOT be linked by sui-bundler
114
+ }
115
+ }
116
+ ```
117
+
118
+ > **Note:** If the package is **not part of the monorepo** (i.e. it lives outside the project remember to use [`npm link`](https://docs.npmjs.com/cli/commands/npm-link) directly instead.
119
+
105
120
  ### Production
106
121
 
107
122
  ```
@@ -10,8 +10,12 @@ const diccFromAbsolutePaths = (paths, init = {}) =>
10
10
  const packagePath = path.resolve(pkg)
11
11
  try {
12
12
  const pkg = require(path.join(packagePath, 'package.json'))
13
- acc[pkg.name] = path.join(packagePath, 'src')
14
- log.success(`✔ ${pkg.name} from path "${packagePath}"`)
13
+ if (pkg.scripts?.dev) {
14
+ log.info(`ℹ Package from path "${packagePath}" wouldn't be linked because it has its own watcher.`)
15
+ } else {
16
+ acc[pkg.name] = path.join(packagePath, 'src')
17
+ log.success(`✔ ${pkg.name} from path "${packagePath}"`)
18
+ }
15
19
  return acc
16
20
  } catch (e) {
17
21
  log.warn(`⚠ Package from path "${packagePath}" can't be linked.\n Path is wrong or package.json is missing.`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "9.75.0",
3
+ "version": "9.77.0",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"