This should automatically:
1) create a content/_components folder if it doesn't already exist
2) create a subfolder for the component name provided, e.g. content/_components/mycomp
3) create a defaults file with empty json {} inside, e.g. content/_components/mycomp/_defaults.json
4) create a schema file with empty json {} inside, e.g. content/_components/mycomp/_schema.json
The plenti build breaks if it finds an invalid JSON file, so a blank JSON file breaks the build, thus adding {} inside defaults and schema.
Format:
plenti new component <mycomp>
This should automatically: 1) create a
content/_components
folder if it doesn't already exist 2) create a subfolder for the component name provided, e.g.content/_components/mycomp
3) create a defaults file with empty json{}
inside, e.g.content/_components/mycomp/_defaults.json
4) create a schema file with empty json{}
inside, e.g.content/_components/mycomp/_schema.json
The plenti build breaks if it finds an invalid JSON file, so a blank JSON file breaks the build, thus adding
{}
inside defaults and schema.This should be very similar to the
plenti new type <mytype>
command: https://github.com/plentico/plenti/blob/84f6461d3c5a1485d76f2d5fe1fe5dd7349ae815/cmd/type.go