easy run your TypeScript、JavaScript or html
powered by Farm
feature
- cross import CommonJs and EsModule
- watch mode
- support html
pnpm i farmup
or install global
pnpm i -g farmup
run js/ts file
farmup index.ts
run html file, because farm
is used, even if it is html, it will automatically compile the referenced js and ts files.
farmup index.html
build and exec, but it can only-build
farmup build index.ts
# only-build
farmup build index.ts --no-exec
- support more entry file
- more cli options
- sourcemap
- ignore some watch file
- execute without output file
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
farmup index.ts -e node
farmup index.ts -e cat
- option:
cjs
|esm
farmup --format cjs index.ts
farmup --minify index.ts
custom specify farm config, for more, see farm config
by default, it automatically finds the configuration
if you not use local config, use --no-config
option
option
:node
、browser
, more see targetEnv
define your production environment
alias
:w
add extra watch files, support glob pattern
set external package or path
default
:true
in your code, if not find package
or source
, set external
default
:undefined
- option:
boolean
|'inline'
|'all'
|'all-inline'
generate sourcemap