You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently Vendure (+ Admin UI) build and testing steps require custom scripts.
For example with build, compiling Typescript files and then copying assets into the dist-folder, or using the populate-function script for test-data when testing.
This is error-prone and can be time-consuming if you don't have a pre-existing template to work with.
Describe the solution you'd like
Built-in CLI commands for npx vendure to build and test the Vendure API + Admin UI based on a configuration JSON-file, similar to how Angular handles CLI with angular.json.
Here are some pseudo-examples:
vendure build
Build the API into a dist-folder and copy assets (dist-folder and asset-paths configured in the JSON-file)
Also could handle multiple env-files by using the configurations-map of environment-configurations with the fileReplacements-technique that angular.json also has.
vendure test
Supposing that Vendure could have a pre-defined testing setup with Jest and Cypress?
vendure populate
This would populate the DB and could take 3 different options:
--csv pointing to a CSV-file containing the products-data.
--initial-data, pointing to a Typescript -file containing the initialData-object.
The 2 options above could be mandatory with each other, or if other is not provided, then the missing data would be from the test-data.
Alternatively, --test which would use the test-data from:
@vendure/create/assets/products.csv
@vendure/create/assets/initial-data.json
If all 3 would be provided, then the --csv and --initial-data options would take priority over --test.
Describe alternatives you've considered
An up-to-date and clear step-by-step guide in the docs for setting up production-ready configurations for these processes.
For comparison, Cloud Run example from Pinelab which is linked in the docs, seems a bit dated and abandoned, newest change was a README update 2 months ago, earlier commits from last year, so clearly not the latest Vendure-stuff included in there.
Additional context
Currently I have 6 scripts to produce a dist-folder with compiled Typescript and assets and 2 scripts for db-population and 1 for testing:
Sure, I could put the assets into one folder (as I probably will), but the issue is there that I have to copy the assets to the tsc-generated dist-folder, since tsc does not recognize other files than .ts or .tsx.
And also that I need to have custom Typescript-scripts using the Vendure-libraries for the db-population, instead of just providing the datafiles for a CLI command.
The text was updated successfully, but these errors were encountered:
We do have plans to expand the scope of the CLI to cover more of the dev experience like building and testing. Right now we are in the early planning stages.
Is your feature request related to a problem? Please describe.
Currently Vendure (+ Admin UI) build and testing steps require custom scripts.
For example with build, compiling Typescript files and then copying assets into the dist-folder, or using the populate-function script for test-data when testing.
This is error-prone and can be time-consuming if you don't have a pre-existing template to work with.
Describe the solution you'd like
Built-in CLI commands for
npx vendure
to build and test the Vendure API + Admin UI based on a configuration JSON-file, similar to how Angular handles CLI with angular.json.Here are some pseudo-examples:
vendure build
vendure test
vendure populate
--csv
pointing to a CSV-file containing the products-data.--initial-data
, pointing to a Typescript -file containing the initialData-object.--test
which would use the test-data from:@vendure/create/assets/products.csv
@vendure/create/assets/initial-data.json
--csv
and--initial-data
options would take priority over--test
.Describe alternatives you've considered
An up-to-date and clear step-by-step guide in the docs for setting up production-ready configurations for these processes.
For comparison, Cloud Run example from Pinelab which is linked in the docs, seems a bit dated and abandoned, newest change was a README update 2 months ago, earlier commits from last year, so clearly not the latest Vendure-stuff included in there.
Additional context
Currently I have 6 scripts to produce a dist-folder with compiled Typescript and assets and 2 scripts for db-population and 1 for testing:
Sure, I could put the assets into one folder (as I probably will), but the issue is there that I have to copy the assets to the tsc-generated dist-folder, since
tsc
does not recognize other files than.ts
or.tsx
.And also that I need to have custom Typescript-scripts using the Vendure-libraries for the db-population, instead of just providing the datafiles for a CLI command.
The text was updated successfully, but these errors were encountered: