---
# System prepended metadata

title: New DevExtreme CLI approach research

---

# New DevExtreme CLI approach research

## Motivation
Currently, CLI looks a bit messy, uses different approaches for every platform, and contains templates in the same repository. It is better to move templates out of the repo (keep in monorepo for now), and publish them as separate npm packages. Every framework supports some kind of project templates, it would be nice to utilize these platform-specific approaches. As a result, we'll allow customers to create DevExtreme apps either by using our CLI or by using platforms' CLI. Additionaly, published template packages could give us an additional audience channel and search results presence. 


## React
[Custom templates](https://create-react-app.dev/docs/custom-templates/) are supported, they mostly look like an actual app named as cra-template-** with an additional config (see [cra-template-typescript](https://github.com/facebook/create-react-app/tree/main/packages/cra-template-typescript) as an example). Templates can be used directly from the [filesystem](https://create-react-app.dev/docs/custom-templates/#testing-a-template).

There is one problem with using react app templates: it looks like there is support for string replacements for app templates in create-react-app. Current DevExtreme templates relate heavily on string replacements in code, so it becomes a problem, at least when using CRA CLI instead of ours. 

## Angular
Looks like the current approach with [schematics](https://angular.io/guide/schematics) is mostly correct.
Here is a good article on full app template creation using this approach: [https://medium.com/omnicell-engineering/generating-an-enterprise-application-template-with-the-angular-cli-and-schematics-e59b26b6d828](https://medium.com/omnicell-engineering/generating-an-enterprise-application-template-with-the-angular-cli-and-schematics-e59b26b6d828)

## Vue
It looks like the correct approach is using [presets](https://cli.vuejs.org/guide/plugins-and-presets.html#presets). They can include various plugins and also [generators](https://cli.vuejs.org/dev-guide/plugin-dev.html#generator) that copy files into a new project. Presets can be used [directly from source](https://cli.vuejs.org/guide/plugins-and-presets.html#remote-presets) or from the [filesystem](https://cli.vuejs.org/guide/plugins-and-presets.html#local-filesystem-preset). There is an [examle](https://cli.vuejs.org/dev-guide/plugin-dev.html#creating-new-templates) of template creation. 

There is a problem with Vue: their CLI is in maintenance mode and they recommend using their [new tool](https://github.com/vuejs/create-vue) for project creation. This tool is not webpack based (uses Vite instead). And, it looks like it doesn't support presets at all, at least for now.

## Platforms squad
Currently, they don't have enough resources for templates. They have plans to use new Vite-based Vue CLI in the next release, and stop supporting Vue 2. Typescript support for Vue templates may be introduced by the end of the current release.





