generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 23f88ef
Showing
9 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.vscode/ | ||
.history | ||
logs | ||
*.log | ||
npm-debug.log* | ||
.DS_Store | ||
*.swp | ||
yarn-error.log | ||
|
||
node_modules | ||
build | ||
dist | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"git": { | ||
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs", | ||
"tagName": "v${version}" | ||
}, | ||
"github": { | ||
"release": true, | ||
"releaseName": "${version}", | ||
"releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs" | ||
}, | ||
"hooks": { | ||
"before:init": "yarn test", | ||
"after:bump": "npx auto-changelog --commit-limit false -p" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## 0.1.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# volto-addon-template | ||
|
||
## Develop | ||
|
||
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/) | ||
|
||
1. Install `mrs.developer` | ||
|
||
$ npm install -g mrs.developer | ||
|
||
1. Install `@plone/create-volto-app` | ||
|
||
$ npm install -g @plone/create-volto-app | ||
|
||
1. Create new volto app | ||
|
||
$ create-volto-app my-volto-project | ||
$ cd my-volto-project | ||
|
||
1. Update `package.json` with the following information: | ||
|
||
{ | ||
"scripts": { | ||
"develop": "missdev --config=jsconfig.json --output=addons" | ||
}, | ||
|
||
"addons": [ | ||
"@eeacms/volto-addon-template" | ||
], | ||
} | ||
|
||
1. Add the following to `mrs.developer.json`: | ||
|
||
{ | ||
"volto-addon-template": { | ||
"url": "https://github.com/eea/volto-addon-template.git", | ||
"package": "@eeacms/volto-addon-template", | ||
"branch": "develop", | ||
"path": "src" | ||
} | ||
} | ||
|
||
1. Install | ||
|
||
$ yarn develop | ||
$ yarn | ||
|
||
1. Start backend | ||
|
||
$ docker run -d --name plone -p 8080:8080 -e SITE=Plone plone | ||
|
||
...wait for backend to setup and start - `Ready to handle requests`: | ||
|
||
$ docker logs -f plone | ||
|
||
...you can also check http://localhost:8080/Plone | ||
|
||
1. Start frontend | ||
|
||
$ yarn start | ||
|
||
1. Go to http://localhost:3000 | ||
|
||
1. Happy hacking! | ||
|
||
$ cd src/addons/volto-addon-template/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 European Environment Agency | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# volto-addon-template | ||
[![Releases](https://img.shields.io/github/v/release/eea/volto-addon-template)](https://github.com/eea/volto-addon-template/releases) | ||
|
||
[Volto](https://github.com/plone/volto) add-on | ||
|
||
## Features | ||
|
||
### | ||
|
||
Demo GIF | ||
|
||
## Getting started | ||
|
||
1. Create new volto project if you don't already have one: | ||
``` | ||
$ npm install -g @plone/create-volto-app | ||
$ create-volto-app my-volto-project | ||
$ cd my-volto-project | ||
``` | ||
1. Update `package.json`: | ||
``` JSON | ||
"addons": [ | ||
"@eeacms/volto-addon-template" | ||
], | ||
"dependencies": { | ||
"@eeacms/volto-addon-template": "1.0.0" | ||
} | ||
``` | ||
1. Install new add-ons and restart Volto: | ||
``` | ||
$ yarn | ||
$ yarn start | ||
``` | ||
1. Go to http://localhost:3000 | ||
1. Happy editing! | ||
## How to contribute | ||
See [DEVELOP.md](https://github.com/eea/volto-addon-template/blob/master/DEVELOP.md2). | ||
## Copyright and license | ||
The Initial Owner of the Original Code is European Environment Agency (EEA). | ||
All Rights Reserved. | ||
See [LICENSE.md](https://github.com/eea/volto-addon-template/blob/master/LICENSE.md) for details. | ||
## Funding | ||
[European Environment Agency (EU)](http://eea.europa.eu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
TEMPLATE="volto-addon-template" | ||
ADDON="$(basename $PWD)" | ||
|
||
echo "Replacing $TEMPLATE with $ADDON" | ||
grep -rlZ $TEMPLATE . --exclude="bootstrap" --exclude-dir=".git" | xargs -0 sed -i "s/$TEMPLATE/$ADDON/g" | ||
echo "Done!" | ||
echo "See git diff for details" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@eeacms/volto-addon-template", | ||
"version": "0.1.0", | ||
"description": "volto-addon-template: Volto add-on", | ||
"main": "src/index.js", | ||
"author": "European Environment Agency: IDM2 A-Team", | ||
"license": "MIT", | ||
"homepage": "https://github.com/eea/volto-addon-template", | ||
"keywords": [ | ||
"volto-addon", | ||
"volto", | ||
"plone", | ||
"react" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:eea/volto-addon-template.git" | ||
}, | ||
"devDependencies": { | ||
"release-it": "*" | ||
}, | ||
"scripts": { | ||
"release": "release-it", | ||
"bootstrap": "./bootstrap" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const applyConfig = (config) => { | ||
return config; | ||
}; | ||
|
||
export default applyConfig; |