Use the Aurelia CLI to build your plugin:
au build-plugin
This command generates two module formats:
dist/native-modules/
: ES2015 module formatdist/commonjs/
: CommonJS module format
dist/
├── native-modules/
│ ├── index.js
│ ├── elements/
│ ├── attributes/
│ └── ...
└── commonjs/
├── index.js
├── elements/
├── attributes/
└── ...
Install directly from a Git repository:
# GitHub
npm install github:username/repo-name
# Bitbucket
npm install bitbucket:username/repo-name
# GitLab
npm install gitlab:username/repo-name
// main.js
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.plugin(PLATFORM.moduleName('your-plugin-name'));
}
- Remove
"private": true
frompackage.json
- Update version and publish
# Run tests
npm test
# Bump version (patch/minor/major)
npm version patch
# Publish to npm
npm publish
Install changelog utilities:
npm install -D standard-changelog standard-version
Update package.json
scripts:
{
"scripts": {
"version": "standard-changelog && git add CHANGELOG.md",
"postversion": "git push && git push --tags && npm publish"
}
}