
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@nebula.js/cli-build
Advanced tools
Build nebula.js visualization.
npm install @nebula.js/cli @nebula.js/cli-build -g
nebula build
Build nebula.js visualization
Options:
--version Show version number [boolean]
--config, -c Path to a JavaScript config file
[string] [default: "nebula.config.js"]
--watch, -w Watch source files
[choices: "umd", "systemjs"] [default: "umd"]
--sourcemap, -m Generate source map [boolean] [default: true]
--mode Explicitly set mode
[string] [choices: "production", "development"]
--core Set a core build target [string] [default: "core"]
--typescript Enable typescript bundling [boolean] [default: false]
Build the bundle with a nebula configuration json file in a new path
nebula build --config config/my-nebula-config.js
In the config file, build properties:
The following code in a config file demonstrates an example to set the nebula build configuration.
const path = require('path');
const defaultTheme = require('yourThemeProject/theme.json');
const targetPkg = require(path.resolve(process.cwd(), 'package.json'));
const replacementStrings = {
'process.env.PACKAGE_VERSION': JSON.stringify(targetPkg.version),
};
const mode = process.env.NODE_ENV === 'production' ? 'production' : 'development';
const sourcemap = mode !== 'production';
module.exports = {
build: {
replacementStrings,
sourcemap,
mode,
core: 'core',
typescript: true,
},
};
Rebuild the bundle when files in /src
folder have been change on the disk
nebula build --watch
Build the bundle without a source map file - .js.map
file
nebula build --sourcemap false
A source map is a file that maps from the bundled source file to the original
source files, enabling the browser to reconstruct and present the original source
code in the debugger. So if there is an error in a file in the /dist
directory,
the source map can tell you the original source file location.
Basically, source map is helpful for debugging and should be removed for production.
Bundle is not minified in the development mode
nebula build --mode development
And minified in the production mode
nebula build --mode production
You can export only the esm bundle by adding --core parameter.
To achieve that, you need to add a package.json file in the /core
directory.
In the package.json file, a module
field which specifies the output file
from the build is required:
"module": "dist/hello.esm.js",
The package.json can also have a different list of peerDependencies changing what dependencies are included in the output file.
Then run the following command:
nebula build --core
The code is exported into /core
directory
When you want to specify your directory instead of the default one, you can move that package.json file into your directory and run the following command:
nebula build --core minimal/target
The code is exported into /minimal/target
directory
Tips: In the package.json file, the main field makes sure that Node users using require can be served the umd version. The module field is a common convention to designate how to import an esm version of your code.
You can build a bundle using the SystemJS format by adding a systemjs
field in the
package.json which specifies the output file from the build:
"systemjs": "dist/hello.systemjs.js"
With this option you can enable typescript bundling of your code. Add a tsconfig.json
file to configure typescript to your own preferences.
nebula build --typescript
3.2.1 (2023-02-27)
Note: Version bump only for package nebula.js
FAQs
Unknown package
The npm package @nebula.js/cli-build receives a total of 421 weekly downloads. As such, @nebula.js/cli-build popularity was classified as not popular.
We found that @nebula.js/cli-build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers 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
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.