-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: support script for cjs * fix: socket can not fully transfer data when the flow is too large * fix: build release
- Loading branch information
1 parent
0675097
commit a1a4131
Showing
20 changed files
with
555 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'farmup': patch | ||
--- | ||
|
||
- support script for cjs | ||
- support shebang for file | ||
- fix entry clear failed | ||
- fix can't print address when start html | ||
- bump core version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
indent_size = 4 | ||
indent_style = space | ||
|
||
[*.{md,json}] | ||
[*.{md,json,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
## options | ||
|
||
### exec | ||
|
||
- `alias`: e | ||
|
||
can custom exec, select the exec method by default through the suffix of the file | ||
|
||
- html use server star | ||
- ts\js use node | ||
|
||
```shell | ||
farmup index.ts -e node | ||
|
||
farmup index.ts -e cat | ||
``` | ||
|
||
### format | ||
|
||
- option: `cjs` | `esm` | ||
|
||
```shell | ||
farmup --format cjs index.ts | ||
``` | ||
|
||
### minify | ||
|
||
```shell | ||
farmup --minify index.ts | ||
``` | ||
|
||
### config | ||
|
||
custom specify farm config, for more, see [farm config](https://www.farmfe.org/docs/config/configuring-farm) | ||
|
||
by default, it automatically finds the configuration | ||
|
||
if you not use local config, use `--no-config` option | ||
|
||
### target | ||
|
||
- `option`: `node`、`browser`, more see [targetEnv](https://www.farmfe.org/docs/config/compilation-options#outputtargetenv) | ||
|
||
define your production environment | ||
|
||
### watch | ||
|
||
- `alias`: `w` | ||
|
||
add extra watch files, support [glob](https://www.npmjs.com/package/glob) pattern | ||
|
||
### external | ||
|
||
set external package or path | ||
|
||
### autoExternal | ||
|
||
- `default`: `true` | ||
|
||
in your code, if not find `package` or `source`, set external | ||
|
||
### sourcemap | ||
|
||
- `default`: `undefined` | ||
- option: `boolean` | `'inline'` | `'all'` | `'all-inline'` | ||
|
||
generate sourcemap | ||
|
||
### no-experience-script | ||
|
||
- option: `boolean` | ||
|
||
disable exec esm without output to filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { defineConfig } from '@farmfe/core'; | ||
|
||
export default defineConfig({ | ||
compilation: { | ||
presetEnv: false, | ||
input: { | ||
vm: './src/node/cjs/vm.ts', | ||
}, | ||
output: { | ||
targetEnv: 'node', | ||
format: 'cjs', | ||
entryFilename: '[entryName].cjs', | ||
clean: false, | ||
}, | ||
lazyCompilation: false, | ||
persistentCache: false, | ||
external: ['^@farmfe/core$'], | ||
minify: false, | ||
treeShaking: true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,16 @@ | |
"access": "public" | ||
}, | ||
"scripts": { | ||
"dev": "farm watch", | ||
"build": "farm build", | ||
"dev": "farm watch & farm watch --config farm.config.cjs.ts", | ||
"build": "rimraf ./dist && farm build && farm build --config farm.config.cjs.ts", | ||
"preview": "farm preview", | ||
"clean": "farm clean", | ||
"farmup": "node ./bin/farmup.js --no-exec -w", | ||
"prepublish": "mv ../../README.md ./" | ||
}, | ||
"bin": "./bin/farmup.js", | ||
"devDependencies": { | ||
"@farmfe/cli": "^1.0.4", | ||
"@farmfe/cli": "catalog:", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/node": "^20.12.7", | ||
|
@@ -64,7 +64,7 @@ | |
"email": "[email protected]" | ||
}, | ||
"dependencies": { | ||
"@farmfe/core": "^1.3.16", | ||
"@farmfe/core": "catalog:", | ||
"tmp": "^0.2.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.