Open KariNarhi28 opened 4 months ago
does your pouplate db script support external asset server ?
does your pouplate db script support external asset server ?
Don't think so, it's pretty much the same script that is shown on Vendure docs: https://docs.vendure.io/guides/developer-guide/importing-data/#the-populate-function
Haven't really studied the importing-related stuff since our use-case is that users add the product-materials manually by themselves.
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.