Skip to content

Releases: kaizendorks/dexa

v0.3.1

03 Sep 21:55
Compare
Choose a tag to compare

General

  • added npmignore to exclude files from published package
  • Refactor stack-manager to use top-level await when loading all the stacks. Every time a stack is loaded/created, its init/add/generate templates are loaded with an async method loadTemplates that combines default information with any custom properties defined in the optional dexa.js file of the stack.

Template

  • rename the render method as apply, since not every template will copy/render files. Some might provide a custom overriden action and just use execa to for example npx fastify-cli init

Init

  • add optional description for stack in dexa.js, use it as program.description when wiring all the dx init commands. (would need to refactor current dx-add.js to create a command per stack)
  • add custom pre/post actions in stack's dexa.js. Call same signature than the .action (since its based on defined arguments/options)

Add

  • allow extra config/metadata to be defined in dexa.js.
    • description
    • The same pre/postAction than in init are available

Generate

  • allow extra config/metadata to be defined in dexa.js.
    • description
    • The same pre/postAction than in init are available

v0.3.0

07 Aug 17:56
Compare
Choose a tag to compare

General

  • Rewrite to ES6. This will better align the project so customizations in stacks are also preferably done in ES modules, as well as supporting top-level async-await

Stack management

  • Can now add stacks from a local folder using dx stack add (previously only stack from git repos could be added). This will help testing stacks while they are created/updated, as well as testing features of dexa like prompt to install stack when executing dx add/generate commands.

Add command

  • First implementation of the command now available. Stacks can define their own "add" commands by just adding template folders inside their /add, for example adding ./add/unit-test makes dx add unit-test available for projects using that stack. There is zero config or metadata needed other than the template folder.
  • The dx add command has to be run in the context of the root folder of a project previously initialized with dx init (ie, a folder that contains a .dexarc file). A specific error is returned if the command is run in other folders
  • In case the .dexarc file references a stack not found locally, the dx add command will automatically prompt the user to install the stack.

Generate command

  • First implementation of the command now available. Stacks can define their own "generate" commands by just adding template folders inside their /generate, for example adding ./generate/api makes dx generate api available for projects using that stack. There is zero config or metadata needed other than the template folder.
  • All the dx generate commands will take a [name] required argument as in dx generate page my-new-page.
  • The dx generate command has to be run in the context of the root folder of a project previously initialized with dx init (ie, a folder that contains a .dexarc file). A specific error is returned if the command is run in other folders
  • In case the .dexarc file references a stack not found locally, the dx generate command will automatically prompt the user to install the stack.