Install
This page explains the way to install spear and create project.
Create Project
You need to install only npm, no additional global package like other CLI tools.
You just execute the following command.
# npm create spear@spear
After execute this command, create project wizard will start.
Wizard
Spear wizard will ask the several questions for building web site.
# npm create spear
### Welcome to Spear CLI ###
? Name of your project
? Use Spearly CMS
? Enter your Spearly CMS API KEY
? Choose template type
? Generate Sitemap?
? Enter your hosting URL (Example: https://foobar.netlify.app/)
? Add ESLint for JavaScript code quality?
- Project Name
- Input your paroject what you want to.
- Use Spearly CMS
- If you need to integrate with Spearly CMS, You type [yes]
- For detail, see the Connect to CMS,
- Spearly CMS API KEY
- If previous question is [yes], You need to input the Spearly CMS API Key.
- Template type
- You can choose project template from
basic
orempty
.
- You can choose project template from
- Sitemap
- If you want to generate the sitemap, you type [yes].
- URL
- If previous question is [yes], you need to input your hosting URL.
- You can set this value after wizard by configuraiton.
Spear Project Configuration
Spear will built based on spear.config.mjs
like bellow:
export default {
"projectName": "Sample Project",
"generateSitemap": false,
"siteURL": "https://sample.com",
"spearlyAuthKey": "***********"
}
You can edit this configuration file, an allowed option parameter is
Setting parameter
{{ projectName }})