Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@vladmandic/build
Advanced tools
Integrated HTTP/HTTPS server with a build platform, bundler, types/document/changelog generation and file watcher for NodeJS
Each execution step of the profiles is configurable
tsconfig.json
, typedoc.json
, .eslintrc.json
build.json
or as an object when using APIExample:
const Build = require('@vladmandic/build').Build;
const config = {
build: {
targets: [ // minimum configuration requires at least one target
{ input: "src/test.ts", output: "dist/test.js", platform: "node", format: "cjs", typedoc: 'typedoc', typings: 'types' }
]
}
}
const build = new Build(config);
console.log('Toolchain', build.toolchain);
console.log('Environment', build.environment);
console.log('Application', build.application);
console.log('Configuration', build.config);
const result = await build.production();
console.log('Build results:', result);
Example: npm run build
Usage: build [options] [command]
Options:
-c, --config <file> specify config file
-d, --debug enable debug output
-g, --generate generate config files from templates
-h, --help display help for command
Commands:
development start development ci
production start production build
config show active configuration and exit
help [command] display help for command
Modify your package.json
to include:
"scripts": {
"dev": "build development",
"prod": "build production",
}
Example: npm run build production
2021-09-09 12:01:39 INFO: @vladmandic/build version 0.3.1
2021-09-09 12:01:39 INFO: User: vlado Platform: linux Arch: x64 Node: v16.8.0
2021-09-09 12:01:39 INFO: Application: { name: '@vladmandic/build', version: '0.3.1' }
2021-09-09 12:01:39 INFO: Environment: { profile: 'production', config: 'build.json', tsconfig: true, eslintrc: true, git: true }
2021-09-09 12:01:39 INFO: Toolchain: { build: '0.3.1', esbuild: '0.12.25', typescript: '4.4.2', typedoc: '0.21.9', eslint: '7.32.0' }
2021-09-09 12:01:39 STATE: Clean: { locations: [ 'test/dist/*', 'types/*', 'typedoc/*', [length]: 3 ] }
2021-09-09 12:01:39 STATE: Build: { type: 'production', format: 'cjs', platform: 'node', input: 'src/build.js', output: 'test/dist/build.js', files: 12, inputBytes: 34587, outputBytes: 593571 }
2021-09-09 12:01:40 STATE: Typings: { input: 'src/build.js', output: 'types', files: 7 }
2021-09-09 12:01:45 STATE: TypeDoc: { input: 'src/build.js', output: 'typedoc', objects: 2, index: true }
2021-09-09 12:01:45 STATE: Build: { type: 'production', format: 'esm', platform: 'browser', input: 'test/src/index.ts', output: 'test/dist/index.esm.js', files: 2, inputBytes: 503, outputBytes: 377 }
2021-09-09 12:01:45 STATE: Build: { type: 'production', format: 'cjs', platform: 'node', input: 'test/src/index.ts', output: 'test/dist/index.node.js', files: 2, inputBytes: 503, outputBytes: 845 }
2021-09-09 12:01:46 STATE: Lint: { locations: [ 'src/*', 'test/src/*', [length]: 2 ], files: 12, errors: 0, warnings: 0 }
2021-09-09 12:01:46 STATE: ChangeLog: { repository: 'https://github.com/vladmandic/build', branch: 'main', output: 'CHANGELOG.md' }
2021-09-09 12:01:46 INFO: Profile production done
Example: npm run build development
2021-09-09 10:15:10 INFO: @vladmandic/build version 0.3.1
2021-09-09 10:15:10 INFO: User: vlado Platform: linux Arch: x64 Node: v16.8.0
2021-09-09 10:15:10 INFO: Application: { name: '@vladmandic/build', version: '0.3.1' }
2021-09-09 10:15:10 INFO: Environment: { profile: 'development', config: 'build.json', tsconfig: true, eslintrc: true, git: true }
2021-09-09 10:15:10 INFO: Toolchain: { esbuild: '0.12.25', typescript: '4.4.2', typedoc: '0.21.9', eslint: '7.32.0' }
2021-09-09 10:15:10 STATE: WebServer: { ssl: false, port: 8000, root: '.' }
2021-09-09 10:15:10 STATE: WebServer: { ssl: true, port: 8001, root: '.', sslKey: 'cert/https.key', sslCrt: 'cert/https.crt' }
2021-09-09 10:15:10 STATE: Watch: { locations: [ 'test/src/**', 'test/src/**', [length]: 2 ] }
2021-09-09 10:15:10 STATE: Build: { type: 'development', format: 'cjs', platform: 'node', input: 'test/src/index.ts', output: 'test/dist/index.node.js', files: 2, inputBytes: 503, outputBytes: 845 }
2021-09-09 10:15:24 INFO: Watch: { event: 'modify', input: 'test/src/index.ts' }
2021-09-09 10:15:24 STATE: Build: { type: 'development', format: 'cjs', platform: 'node', input: 'test/src/index.ts', output: 'test/dist/index.node.js', files: 2, inputBytes: 503, outputBytes: 845 }
2021-09-09 10:15:31 INFO: Build exiting...
config.clean.locations
ESLint
with default configuration found in config.lint
section plus overrides from local .eslintrc.json
Modules required by default configuration:
npm install eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-node
Git
to generate application change logconfig.documentRoot
NodeJS
solution without external dependenciesSome apps do not work without secure server since browsers enfoce ssl for access to navigator object
You can provide your server key and certificate or use provided self-signed ones
Self-signed certificate was generated using:
openssl req -x509 -newkey rsa:4096 -nodes -keyout https.key -out https.crt -days 365 \
-subj "/C=US/ST=Florida/L=Miami/O=@vladmandic"
ESLint
config.build.targets
with settings combined from config.build.global
, config.build.<profile>
and config.build.targets.<entry>
d.ts
typings using TSC
tsconfig.json
merged with config.typescript
Lint
typings
field pointing to output
directorytypedoc
using settings from optional tsconfig.json:typedocOptions
or typedoc.json
typedoc
field pointing to output
directorytsconfig.json
, .eslintrc.json
and typedoc.json
production
profile0.3.3 2021/09/10 mandic00@live.com
FAQs
Build: Automated CI Platform for NodeJS
The npm package @vladmandic/build receives a total of 32 weekly downloads. As such, @vladmandic/build popularity was classified as not popular.
We found that @vladmandic/build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.