# The litexa project
A litexa project is a tree of files that together describe a single Alexa skill. Much of litexa relies on finding the right files in the right locations, which the generator can help set up.
# Generating a litexa project
Once you've installed the Litexa CLI you can create a new Litexa project by opening up a terminal, navigating to a directory where you have rights to create files, and typing:
At this point you'll get a series of questions to help you get started. For now, answer the questions with the following options:
This one command will create a new directory called
hello-litexa and set up a simple Litexa project inside of it.
It will also print out the file names of the files it generated to the console.
# The litexa project structure
Let's review in a little more depth what files were generated and what our application looks like.
If we take a look at the contents of the directory we notice they look something like this
. ├── README.md ├── artifacts.json ├── litexa │ ├── assets │ │ ├── icon-108.png │ │ └── icon-512.png │ ├── main.litexa │ ├── main.test.litexa │ ├── utils.js │ └── utils.test.js ├── litexa.config.js └── skill.js
The README.md is a great place to start after generating a project. It provides information specific to the type of project you've generated, and also includes a succinct synopsis of the contents covered in this getting started guide.
This directory contains an number of auto-generated files and folders that make up the structure of a basic litexa project. Here's a short rundown of each of the files and folders created by default:
README.mdcontains useful tidbits of knowledge pertaining to your generated project.
artifacts.jsonfile stores generated information about the project.
litexa.config.jsis your project configuration file.
skill.jsis a representation of your skill that provides required metadata to Alexa.
litexafolder houses your assets, litexa files, and skill logic:
assetscontains any images, videos and sounds you'd like to deploy with your project.
*.litexafiles are the Litexa language files.
*.jsfiles are code files. Anything defined in them will be visible in the litexa global scope.
As mentioned above, code files inside of the
litexa directory are treated differently.
import have limited support in this context. If you wish to organize your code in a way that you can
import/require your own files, you can run
litexa generate and select the
As modules. or
As an application. option.
For more information on this and for generation shorthands, check out the Project Structure section of the cookbook.