STILL CLI
Overview
still-cli
is a Still framework tool which makes it easy to handle some of the recurrent and specific tasks (e.g. Development tasks phase) thereby helping to speed up the things in certain aspects.
Initially the CLI tool provides commands in 3 categories such as Application, Component and Routing, in this documentation, we'll summarize the focusing in the more recurrent and key command.
Once install CLI tools goes by stilljs
, however it can be abreviated by stilljs
or st
. Just like the tool, the commands (e.g. create, route) and parameters (e.g. list) are also available through alias as can be seen when typing still --help
.
Windows considerations
When using the CLI tool on Windows it might happen that the the installetion
does not get identified in the path right after, in this case it can be used with npx prefix (e.g. npx still create component path/to-my/MyComponent
)
Installation
Still CLI tool is provided through the NPM (Node Package Manager), and it has to be installed globally and not in a project scope:
Create a new project
In order to create a new project we have to have a folder in which we want the project to be, and inside this project I'll run the init command.
Component Creation
It's recommended to use the CLI tool when creating a component in Still, as this will not only generate the new component but also manage conflicts and routes.
When creating a component, we have to specify the path, if folders of the path exists only the component will be created, otherwise both folder(s) and component will be created.
Folder structure changes
The folder structures in this images correspond the old Still.js setup. In the new setup there if the config folder which holds app-setup.js
, app-template.js
and route.map.js
Lone component creation
Lone component takes place in the use case where we're creating a Microfrontend or using Still.js framework through the CDN, therefore when creating a component in this context we need to specify the --lone
flag in the end. (e.g. npx still create component path/to-my/MyComponent --lone
)
Listing routes
Routes is one of the core aspects of Still.js framework (check routing & navgation), hence they are generate automatically when a component is created, and we can check on them also by using the CLI tool.
Folder structure changes
The folder structures in this images correspond the old Still.js setup. In the new setup there if the config folder which holds app-setup.js
, app-template.js
and route.map.js