cyclonedx-node-module
cyclonedx-node-module copied to clipboard
DRAFT: restructure project
:construction: this ISSUE IS STILL A DRAFT :construction:
based on current implementation - restructure the project:
- bin/
- make-bom.js - if it is desired, multi-purpose wrapper for npm/yarn
- npm-bom.js
- yarn-bom.js -- if this exists
- res/
- spdx-licenses.json
- src/
- index.js -- imports all public classes/functions and exports them right away.
- command/
- options -- the options that all bins/commands have in common
- models/
- // the models
- buiders/ -- pull the logic out of the models so they become plain models
- factories/ -- pull the logic out of the models so they become plain models
- serialize/ -- serializers and normalizers
- spdx/
- // SPDX specific implementation
- tests/
- // the tests
in the ling run: rewrite the whole project. split out a library - the models, the serializers/normalizers, core functionality. keep the node/npm/yarn/... specifics in here.
the library has the node and web browsers as a target. therefore it needs to be compatible to them. Transpile to propriate target with webpack/babel/... is an option.
the node specifics dont need to support browser implementations of JavaScript.
motivation:
- split the node-specifics from the general-purpose-implementations.
- have the core functionality in a browser-runnable language, so people can write UI for them.