arere-plugin-tutorial
v0.1.3
Published
Tutorial plugin for 'arere' - demonstrates i18n and external dependencies
Maintainers
Readme
arere-plugin-tutorial
Tutorial plugin for arere - demonstrates basic usage, i18n, and external dependencies
Japanese | English
Features
This plugin demonstrates two key features of the arere plugin system:
- i18n Support - Multi-language support using translation files
- External Dependencies - Using npm packages (date-fns) in plugin actions
Use as Template
This repository can be used as a template to create your own arere plugin.
Option 1: Using GitHub Template (Recommended)
If this repository is published on GitHub with template repository enabled:
- Click the "Use this template" button at the top of the repository page
- Select "Create a new repository"
- Enter your plugin details:
- Repository name:
arere-plugin-your-name - Description: Your plugin description
- Choose public or private visibility
- Repository name:
- Click "Create repository from template"
Your new repository will have a clean commit history and all the files from this template.
📝 Next Steps: After creating from template, see TEMPLATE.md for detailed customization guide.
Option 2: Manual Clone
# Clone this repository
git clone https://github.com/your-org/arere-plugin-tutorial.git arere-plugin-your-name
cd arere-plugin-your-name
# Remove the original git history
rm -rf .git
git init
# Update package.json
# - Change "name" to "arere-plugin-your-name"
# - Update "description", "author", etc.
# Update src/index.ts
# - Change plugin meta information
# - Update i18nNamespace
# Install dependencies
npm install
# Start developing
npm run devSetting Up Template Repository (For Maintainers)
To enable the "Use this template" button on GitHub:
- Go to the repository Settings
- Scroll to the Template repository section
- Check the ✅ Template repository checkbox
- Save changes
The green "Code" button will change to "Use this template".
Installation
npm install arere-plugin-tutorialConfiguration
Add to your .arere/settings.json:
{
"plugins": {
"arere-plugin-tutorial": true
}
}Actions
demo-plugin-i18n
Demonstrates i18n (internationalization) support in plugins.
- Uses translation keys with plugin namespace
- Supports both English and Japanese
- Shows how to use
t()function for translations - Interactive prompts with i18n support
demo-plugin-external-deps
Demonstrates using external dependencies (date-fns).
- Format dates in various styles
- Use external npm packages in plugin actions
- Interactive date formatting options
- Practical example of dependency management
Development
# Install dependencies
npm install
# Build the plugin
npm run build
# Watch mode
npm run devProject Structure
arere-plugin-tutorial/
├── package.json
├── src/
│ └── index.ts # Plugin definition
├── actions/
│ ├── demo-plugin-i18n.ts # i18n demonstration
│ └── demo-plugin-external-deps.ts # External dependency demo
├── locales/
│ ├── en/
│ │ └── translation.json
│ └── ja/
│ └── translation.json
└── README.mdLicense
MIT
