Accent CLI
The Accent CLI is a set of tools for creating and developing Accent applications.
Installation#
You can install Accent CLI with NPM.
npm install @accent/cliUsage#
The command prefix for Accent CLI is accent, often abbreviated as ac.
Example (Help Command):
ac --helpExample (View Version Number):
ac --versionCreating an Accent Project#
Accent does not have any rules for how you structure your application. However, if you want to get started with a pre-defined structure, you can do so with the CLI's create command.
To create a project, use the following command:
ac create [project-name]This will create a new directory with the following file structure:
โโโ components โโโ sharedโโโ pages โโโ sharedโโโ index.htmlโโโ app.jsโโโ ac.config.json # Used to indicate the root of an Accent project.This structure can be altered in any way you see fit.
Creating a Development Server (Accent Router)#
This development server is to be used with the Accent Router library. See the documentation for more information.
To start your development server, run the serve command in the directory with your index.html file:
ac serveThis will create a localhost server on port 5000 configured for Accent's Single Page Application (SPA) structure.
Custom Path#
To add a custom path for your server, use the following syntax:
ac serve ./path/to/index.htmlCustom Server Port#
To add a custom port for your server, use the following syntax:
ac serve --port=[port-number]