
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bloomstack/bcore-bundler
Advanced tools
BCore's extendable esbuild bundler configuration utility.
This repository holds bcore's js bundler default configurations. If you are developing bcore apps you can use this bundler to kickstart your project's js dependencies.
The bundler expects your application's directory structure in a particular layout generated by bcore. See bcore for more information.
After adding this package to your packages.json dev dependencies you can run the following commands to build and/or watch your js files:
yarn bcore-builder bundle
yarn bcore-builder watch
To keep things shorter and easier on your wrists, you should add bcore-builder calls in your packages script section as follows:
{
...
"scripts": {
"build": "bcore-builder bundle",
"watch": "bcore-builder watch"
},
...
}
If you want to modify the esbuild configuration object you can import the builder's package and directly use its internal build method directly or import the cli to reuse the terminal interface.
Lets say you want to reuse the cli. In your codebase add ./cli.js:
import { cli } from "@bloomstack/bcore-bundler/cli.js"
await cli(import.meta, (config) => {
// You can modify config here and return it.
// This configuration is used for both bundling and watching.
// The config object is directly passed to esbuild so all of
// esbuild options are usable here.
return config;
});
Otherwise, if you want to build your own cli interface and only require running builds and/or watching for file changes. In your code base add ./builder.js:
import { build } from "@bloomstack/bcore-bundler";
await build({
path: ".", // The root path of your bcore application in your file
// system. This defaults to the current working director.
watch: false, // set to true to watch instead of only bundling.
production: false, // set to true to bundle into ./dist folder and minify.
format: "esm", // set to cjs or esm to change file format. Defaults to
// esm for now.
analyze: false, // set to true if you would like to see a detailed bundle
// statistics.
minify: false, // set to true if you want bundles minified irrespective of
// production/develop setting.
configure(config) {
// You can modify config here and return it.
// This configuration is used for both bundling and watching.
// The config object is directly passed to esbuild so all of
// esbuild options are usable here.
return config;
}
});
import css from "./style.scss";
... use css string some how ...
FAQs
BCore's extendable esbuild bundler configuration utility.
The npm package @bloomstack/bcore-bundler receives a total of 0 weekly downloads. As such, @bloomstack/bcore-bundler popularity was classified as not popular.
We found that @bloomstack/bcore-bundler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.