Registry / devops / basisjs-tools-build

basisjs-tools-build

JSON →
library1.12.2jsnpmunverified

basisjs-tools-build is a dedicated command-line interface (CLI) package providing comprehensive build, linting, and profiling utilities tailored for applications developed with the basis.js framework. It enables developers to compile and optimize their basis.js projects for production, extract detailed application profiles, perform static code analysis to identify potential issues, and resolve various file references within the basis.js ecosystem. The package is currently maintained, with its latest stable release being v1.12.2. While its release cadence can be irregular, updates typically address bugs, enhance stability, and incorporate dependency upgrades, such as the significant transition from uglify-js to uglify-es for JavaScript minification in v1.12.0. Its core value lies in offering specialized, deeply integrated tooling that understands the basis.js resource system and module patterns, distinguishing it from general-purpose build tools.

npm install basisjs-tools-build
INSTALL
IMPORT
SIG · BASISJS-TOOLS-BUIL
B
basisjs-tools-build
devopsjavascriptv1.12.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates the primary command-line operations for basisjs-tools-build, including building an application, extracting a profile, linting code, and resolving file paths.

// Assuming a basis.js project structure // 1. Install the package globally or locally in your project // npm install -g basisjs-tools-build // or // npm install --save-dev basisjs-tools-build // 2. Navigate to your basis.js project directory // cd my-basisjs-app // 3. Build the application for production // This command processes your basis.js application, // minifies assets, resolves resources, and outputs // a production-ready build to the './dist' folder by default. npx basisjs-tools-build build --output dist --js-pack --css-pack // 4. Extract an application profile (useful for analysis or linting) // This generates a JSON file describing your app's dependencies and resources. npx basisjs-tools-build extract --output profile.json // 5. Lint the application code based on the extracted profile // This will output warnings and errors found in your codebase. npx basisjs-tools-build lint // 6. Resolve a file reference within the basis.js context // Useful for debugging resource paths. npx basisjs-tools-build find app/init
basisjs --version
Debug
Known issues
breakingJavaScript minifier switched from `uglify-js` to `uglify-es`. This change, introduced in v1.12.0, may result in different minification outputs or require adjustments to existing JavaScript packing configurations.
fix
Review your `jsPackConfig` settings. If you relied on specific `uglify-js` behaviors, test your build outputs thoroughly and adjust configurations or project code as needed to ensure compatibility with `uglify-es` (or its modern equivalent, `terser`).
affects: >=1.12.0
breakingInternal AST representation migrated to ESTree format in v1.11.0. This is a significant internal change that could potentially impact any custom build steps or plugins that directly interact with the JavaScript Abstract Syntax Tree.
fix
If you have custom tools that parse or modify the AST, ensure they are compatible with the ESTree specification. This is unlikely to affect typical users but is critical for those extending the build process.
affects: >=1.11.0
gotchaVersions prior to 1.12.2 had a bug that could lead to infinite recursion during CSS minification, potentially causing build hangs or failures.
fix
Upgrade to `basisjs-tools-build@1.12.2` or later to resolve the CSS minification recursion issue.
affects: <1.12.2
gotchaThe Node.js engine requirement for `basisjs-tools-build` is `>=0.12.0`. While this is a very old version, newer Node.js versions might introduce unexpected incompatibilities, although not explicitly documented as breaking changes.
fix
Ensure you are using a compatible Node.js version. While the minimum is low, testing with a modern LTS Node.js version is recommended, and report any issues if encountered.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'mime'
An internal issue with the `mime` dependency causing build failures in specific environments.
fix
Upgrade `basisjs-tools-build` to version `1.12.1` or newer. This version specifically addresses the `mime` dependency problem.
Error: Unknown option `--js-pack-config`
Attempting to use the `--js-pack-config` CLI option or `jsPackConfig` field in config file with an older version of the tool.
fix
Update `basisjs-tools-build` to version `1.12.0` or later. This option was introduced in `v1.12.0`.
Build fails or `basis.resource` throws an exception with relative paths
Older versions of `basis.resource` (used internally) did not handle non-string arguments or relative paths correctly, leading to build issues.
fix
Upgrade `basisjs-tools-build` to version `1.11.3` or later. This version contains fixes for `basis.resource` path resolution.
CLI arguments like `--theme` or `--ignore-warnings` are not processed correctly when taking multiple values.
Bug in option processing for CLI arguments that expect several values, leading to incorrect parsing or ignored values.
fix
Upgrade `basisjs-tools-build` to version `1.10.3` or later. This version includes a fix for multi-valued option processing.
Upgrade
Version history
1.12.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
6
Resources
basisjs-tools-build — npm install basisjs-tools-build · libregistry