filter-button 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +24 -10
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
-
2
1
  # Filter Button
3
2
 
4
3
  ## About
5
4
 
6
5
  ![App Screenshot](https://github.com/kalpesh442266/Filter-Button/blob/master/assets/demo.gif)
7
6
 
7
+ <!-- ![App Screenshot](./assets//demo.gif) -->
8
+
8
9
  This package provides a custom field for Strapi that lets you add a filter button in no time.
9
10
 
10
11
  Custom fields are supported since Strapi 4.4+ and offer powerful API to create highly customizable fields.
@@ -14,28 +15,36 @@ This plugin lets you view filtered data according to your configurations.
14
15
  ## Installation
15
16
 
16
17
  To install this plugin, you need to add an NPM dependency to your Strapi application:
18
+
17
19
  #### For NPM:
20
+
18
21
  ```bash
19
22
  npm i filter-button
20
23
  ```
24
+
21
25
  #### For Yarn:
26
+
22
27
  ```bash
23
28
  yarn add filter-button
24
29
  ```
25
30
 
26
31
  Now we need to register plugin so strapi can use it. In order to do that we need to create (if not already created) ./config/plugins.js file and add entry to it.
32
+
27
33
  ```bash
34
+ module.exports = {
28
35
  'filter-button': {
29
36
  enabled: true,
30
- }
37
+ },
38
+ }
31
39
  ```
32
40
 
33
- ## Configuration
41
+ ## Configuration
42
+
34
43
  #### create relations first for filter button to work
35
- if relation is many to many then add boolean ```manyToMany:true``` in configuration
36
44
 
37
- Add webpack.config.js file into src/admin and paste this content there.
45
+ if relation is many to many then add boolean `manyToMany:true` in configuration
38
46
 
47
+ Add webpack.config.js file into src/admin and paste this content there.
39
48
 
40
49
  ```bash
41
50
  'use strict';
@@ -76,17 +85,22 @@ module.exports = (config, webpack) => {
76
85
 
77
86
  ```
78
87
 
79
- #### Then run build:
88
+ #### Then run build:
89
+
80
90
  #### For NPM:
91
+
81
92
  ```bash
82
- npm run bild
93
+ npm run build
83
94
  ```
95
+
84
96
  #### For Yarn:
97
+
85
98
  ```bash
86
- yarn bild
99
+ yarn build
87
100
  ```
101
+
88
102
  ## How To Use
89
103
 
90
- 1. Once all necessary configuration is done, create a elation between ```from``` and ```to``` collections.
104
+ 1. Once all necessary configuration is done, create a elation between `from` and `to` collections.
91
105
  2. Add button from custom fields
92
- 3. make sure ```attributeName``` is matching with configurations while creating custom field
106
+ 3. make sure `attributeName` is matching with configurations while creating custom field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filter-button",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "Custom filter button plugin for strapi",
6
6
  "strapi": {
@@ -20,11 +20,14 @@
20
20
  ],
21
21
  "dependencies": {},
22
22
  "author": {
23
- "name": "A Strapi developer"
23
+ "name":"Kalpesh Rane"
24
+ },
25
+ "peerDependencies": {
26
+ "@strapi/strapi": "^4.4.0"
24
27
  },
25
28
  "maintainers": [
26
29
  {
27
- "name": "A Strapi developer"
30
+ "name": "Kalpesh Rane"
28
31
  }
29
32
  ],
30
33
  "engines": {