Lightweight and versatile build tool based on the esbuild compiler
ISC License
Bot releases are visible (Hide)
Improvements:
test/stdin
) #26BuildConfig.entry
and .entryPoints
to accept a record mapping output files to input files. #36Changes in behavior:
run
ning a program after building it, any user-provided onEnd
callback is now invoked & awaited before starting the sub process. In Estrella <=1.4.0 onEnd was called concurrently with starting the subprocess. #38Bug fixes:
config.entry
would in some cases not be set in the config object passed to onStart
and onEnd
callbacks.Install this version:
npm i -D [email protected]
Published by rsms over 3 years ago
entryPoint
files during -watch
mode (only verified on macOS). #29watch
function (see details below)define
entries in BuildConfig
are handled might cause some build scripts to behave differently. See below for details. #23sourcesContent:true
in your build config. #28BuildProcess
promise would resolve to undefined
, when in watch mode and the user calls cancel()
on the promise. This would effectively look like the build failed while in practice cancelling the build should not signal failure.watch
function) would react to self-originating file modifications.WatchCallback
WatchCallback
used with the watch
function now receives a list of objects describing file changes in more detail. In Estrella <=1.3x this function received a list of strings.
If you use watch
here's an example of how to quickly update your code to work with Estrella >=1.4:
Before: (for Estrella <=1.3x)
watch(".", watchOptions, filenames => {
doSomethingWithFilenames(filenames)
})
After: (for Estrella >=1.4.0)
watch(".", watchOptions, changes => {
doSomethingWithFilenames(changes.map(c => c.name))
})
Note: This does not affect the onStart
callback which continues to receive a plain list of filenames.
BuildConfig.define
An internal change to how define
entries in BuildConfig
are handled might cause some build scripts to behave differently.
Prior to Estrella 1.4.0, values assigned to define
would be implicitly JSON encoded. For example, {define:{foo:"window"}}
would be equivalent to const foo = "window"
in the compiled output. With Estrella 1.4.0 the same define
config is equivalent to const foo = window
(notice that window
is a name here, not a string.)
Here's how you can fix up a build script making use of define
:
Before: (for Estrella <=1.3x)
const version = "1.2.3"
build({
define: { VERSION: version }
})
After: (for Estrella >=1.4.0)
const version = "1.2.3"
build({
define: { VERSION: JSON.stringify(version) }
})
The rationale here is that sometimes you want to define a name with a variable value from the environment. For example, you could do this now to load a JSON file at runtime: define:{ somedata: "require('somedata.json')" }
(which in prior versions of Estrella would end up just naming the string "require('somedata.json')"
.)
Published by rsms over 3 years ago
Fixes a small issue with the optional dependency "fsevents" accidentally being marked as a required dependency
Published by rsms over 3 years ago
For esbuild 0.9
No change to Estrella API.
Published by rsms almost 4 years ago
npm install -D [email protected]
build({ outfile:"-" })
#17onEnd
function instead of writing to file. Simply omit outfile
and outdir
from your call to build({ ... })
; results are provided via the onEnd
's second argument (results
). #17 #18-silent
option which completely silences output logging"dependencies"
(or similar) entry of package.json
. #19