Skip to content

Commit

Permalink
chore: Add config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbiscuit committed Feb 24, 2023
1 parent 5a69d11 commit 3d7b7cb
Show file tree
Hide file tree
Showing 7 changed files with 6,892 additions and 4 deletions.
94 changes: 94 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.vscode/
logs
*.log
npm-debug.log*
.DS_Store

coverage

# Node
node_modules
coverage
jsdoc
webpack-assets.json
webpack-stats.json
npm-debug.log
dist
junit.xml
eslint.xml
yarn-error.log
build

# Other
.DS_Store
.idea
lighthouse-report.html
.vscode/
.#*
*~

# Python
/api/.installed.cfg
/api/.mr.developer.cfg
/api/bin/
/api/develop-eggs/
/api/eggs/
/api/include/
/api/lib/
/api/lib64/
/api/notebook/env/
/api/parts/
/api/share/python-wheels/
/api/src/
/api/var/
/api/venv/
/bin/
/lib/
.Python
include
pip-selfcheck.json
pyvenv.cfg
share

# locales
locales/*.json

# Tests
/tests/bin
/tests/develop-eggs
/tests/parts
/tests/.installed.cfg
*.pyc
geckodriver.log
log.html
output.xml
report.html
selenium-screenshot-*.png
/selenium/
cypress/videos/
cypress/screenshots

# Local environment setup
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# generic
data
omelette

# build
public/critical.css
src/addons/*
/cache

# yarn 3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: prefix-commit-type
name: check for prefix commit type
language: pygrep
entry: '\A(?!feat: )(?!fix: )(?!docs: )(?!style: )(?!refactor: )(?!perf: )(?!test: )(?!chore: )(?!build: )'
args: [--multiline]
stages: [commit-msg]
38 changes: 38 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"hooks": {},
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"header": "# Changelog",
"preset": {
"name" : "conventionalcommits",
"type" : [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type" : "build",
"section" : "Build",
"hidden" : false
},
{
"type": "test",
"section": "Tests",
"hidden": false
}
]
}
}
}
}
8 changes: 8 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MIT License

Copyright © 2023, Affinitic
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.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# volto-icon-selector-widget

## Feature
This widget is used to select from a list of icon visualy with a popup and a search field.

### Settings
You can configure the icon list and default search result renderer (ResultRenderer, CategoryRenderer and CategoryLayoutRenderer) in `config.settings.widget.icon_selector.iconList` and `config.settings.widget.icon_selector.defaultRenderer`

#### Icon list structure

```
{
[category id] : {
'title': [category title]
'list': [
{'name' : [name of the icon]},
...
]
},
...
}
```

## Getting started

### Add volto-block-style to your Volto project

1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone

1. Start Volto frontend

- If you already have a volto project, just update `package.json`:

```JSON
"addons": [
"@affinitic/volto-icon-selector-widget"
],

"dependencies": {
"@affinitic/volto-icon-selector-widget": "^0.0.0"
}
```

- If not, create one:

```
npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --addon @affinitic/volto-icon-selector-widget
cd my-volto-project
```

1. Install new add-ons and restart Volto:

```
yarn
yarn start
```

1. Go to http://localhost:3000

1. Happy editing!
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@affinitic/volto-icon-selector-widget",
"version": "0.1.0",
"description": "volto-icon-selector-widget: Volto add-on",
"version": "0.0.0",
"description": "volto-icon-selector-widget: Volto add-on that add a widget for selecting an icon",
"main": "src/index.js",
"license": "MIT",
"keywords": [
Expand All @@ -11,9 +11,16 @@
"react"
],
"scripts": {
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon"
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
"release": "release-it -c ./.release-it.json",
"release:major": "npm run release -i major",
"release:minor": "npm run release -i minor",
"release:patch": "npm run release -i patch",
"release:no-bump": "npm run release --no-increment"
},
"devDependencies": {
"@plone/scripts": "*"
"@plone/scripts": "*",
"@release-it/conventional-changelog": "5.1.1",
"release-it": "15.6.0"
}
}
Loading

0 comments on commit 3d7b7cb

Please sign in to comment.