easy run your TypeScript、JavaScript or html
powered by Farm
feature
- cross import CommonJs and EsModule
- watch mode
- support html
pnpm i farmupor install global
pnpm i -g farmuprun js/ts file
farmup index.tsrun html file, because farm is used, even if it is html, it will automatically compile the referenced js and ts files.
farmup index.htmlbuild 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.tsfarmup --minify index.tscustom 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