{"id":12877,"library":"basisjs-tools-build","title":"Basis.js Application Build and Linting Tools","description":"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.","status":"active","version":"1.12.2","language":"javascript","source_language":"en","source_url":"https://github.com/basisjs/basisjs-tools-build","tags":["javascript"],"install":[{"cmd":"npm install basisjs-tools-build","lang":"bash","label":"npm"},{"cmd":"yarn add basisjs-tools-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add basisjs-tools-build","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"// Assuming a basis.js project structure\n// 1. Install the package globally or locally in your project\n// npm install -g basisjs-tools-build\n// or\n// npm install --save-dev basisjs-tools-build\n\n// 2. Navigate to your basis.js project directory\n// cd my-basisjs-app\n\n// 3. Build the application for production\n// This command processes your basis.js application,\n// minifies assets, resolves resources, and outputs\n// a production-ready build to the './dist' folder by default.\nnpx basisjs-tools-build build --output dist --js-pack --css-pack\n\n// 4. Extract an application profile (useful for analysis or linting)\n// This generates a JSON file describing your app's dependencies and resources.\nnpx basisjs-tools-build extract --output profile.json\n\n// 5. Lint the application code based on the extracted profile\n// This will output warnings and errors found in your codebase.\nnpx basisjs-tools-build lint\n\n// 6. Resolve a file reference within the basis.js context\n// Useful for debugging resource paths.\nnpx basisjs-tools-build find app/init","lang":"typescript","description":"Demonstrates the primary command-line operations for basisjs-tools-build, including building an application, extracting a profile, linting code, and resolving file paths."},"warnings":[{"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`).","message":"JavaScript 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.","severity":"breaking","affected_versions":">=1.12.0"},{"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.","message":"Internal 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.","severity":"breaking","affected_versions":">=1.11.0"},{"fix":"Upgrade to `basisjs-tools-build@1.12.2` or later to resolve the CSS minification recursion issue.","message":"Versions prior to 1.12.2 had a bug that could lead to infinite recursion during CSS minification, potentially causing build hangs or failures.","severity":"gotcha","affected_versions":"<1.12.2"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Upgrade `basisjs-tools-build` to version `1.12.1` or newer. This version specifically addresses the `mime` dependency problem.","cause":"An internal issue with the `mime` dependency causing build failures in specific environments.","error":"Error: Cannot find module 'mime'"},{"fix":"Update `basisjs-tools-build` to version `1.12.0` or later. This option was introduced in `v1.12.0`.","cause":"Attempting to use the `--js-pack-config` CLI option or `jsPackConfig` field in config file with an older version of the tool.","error":"Error: Unknown option `--js-pack-config`"},{"fix":"Upgrade `basisjs-tools-build` to version `1.11.3` or later. This version contains fixes for `basis.resource` path resolution.","cause":"Older versions of `basis.resource` (used internally) did not handle non-string arguments or relative paths correctly, leading to build issues.","error":"Build fails or `basis.resource` throws an exception with relative paths"},{"fix":"Upgrade `basisjs-tools-build` to version `1.10.3` or later. This version includes a fix for multi-valued option processing.","cause":"Bug in option processing for CLI arguments that expect several values, leading to incorrect parsing or ignored values.","error":"CLI arguments like `--theme` or `--ignore-warnings` are not processed correctly when taking multiple values."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null}