This repository has been archived by the owner on Nov 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
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 3f09797
Showing
38 changed files
with
415 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,7 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = false | ||
indent_style = space | ||
indent_size = 2 |
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,103 @@ | ||
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes | ||
|
||
# Handle line endings automatically for files detected as text | ||
# and leave all files detected as binary untouched. | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# | ||
|
||
# | ||
## These files are text and should be normalized (Convert crlf => lf) | ||
# | ||
|
||
# source code | ||
*.php text | ||
*.css text | ||
*.sass text | ||
*.scss text | ||
*.less text | ||
*.styl text | ||
*.js text eol=lf | ||
*.coffee text | ||
*.json text | ||
*.htm text | ||
*.html text | ||
*.xml text | ||
*.svg text | ||
*.txt text | ||
*.ini text | ||
*.inc text | ||
*.pl text | ||
*.rb text | ||
*.py text | ||
*.scm text | ||
*.sql text | ||
*.sh text | ||
*.bat text | ||
|
||
# templates | ||
*.ejs text | ||
*.hbt text | ||
*.jade text | ||
*.haml text | ||
*.hbs text | ||
*.dot text | ||
*.tmpl text | ||
*.phtml text | ||
|
||
# git config | ||
.gitattributes text | ||
.gitignore text | ||
.gitconfig text | ||
|
||
# code analysis config | ||
.jshintrc text | ||
.jscsrc text | ||
.jshintignore text | ||
.csslintrc text | ||
|
||
# misc config | ||
*.yaml text | ||
*.yml text | ||
.editorconfig text | ||
|
||
# build config | ||
*.npmignore text | ||
*.bowerrc text | ||
|
||
# Heroku | ||
Procfile text | ||
.slugignore text | ||
|
||
# Documentation | ||
*.md text | ||
LICENSE text | ||
AUTHORS text | ||
|
||
|
||
# | ||
## These files are binary and should be left untouched | ||
# | ||
|
||
# (binary is a macro for -text -diff) | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mov binary | ||
*.mp4 binary | ||
*.mp3 binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.zip binary | ||
*.7z binary | ||
*.ttf binary | ||
*.eot binary | ||
*.woff binary | ||
*.pyc binary | ||
*.pdf binary |
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,10 @@ | ||
# Don't check auto-generated stuff into git | ||
coverage | ||
node_modules | ||
stats.json | ||
package-lock.json | ||
|
||
# Cruft | ||
.DS_Store | ||
npm-debug.log | ||
.idea |
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,3 @@ | ||
# Strapi plugin import-export-content | ||
|
||
A quick description of import-export-content. |
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,29 @@ | ||
/** | ||
* | ||
* This component is the skeleton around the actual pages, and should only | ||
* contain code that should be seen on all pages. (e.g. navigation bar) | ||
* | ||
*/ | ||
|
||
import React from "react"; | ||
import { Switch, Route } from "react-router-dom"; | ||
import { NotFound } from "strapi-helper-plugin"; | ||
// Utils | ||
import pluginId from "../../pluginId"; | ||
// Containers | ||
import HomePage from "../HomePage"; | ||
|
||
const pathTo = (uri = "") => `/plugins/${pluginId}${uri}`; | ||
const App = () => { | ||
return ( | ||
<div> | ||
<Switch> | ||
<Route path={pathTo("/")} component={HomePage} exact /> | ||
<Route path={pathTo("users")} component={HomePage} /> | ||
<Route component={NotFound} /> | ||
</Switch> | ||
</div> | ||
); | ||
}; | ||
|
||
export default App; |
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,20 @@ | ||
/* | ||
* | ||
* HomePage | ||
* | ||
*/ | ||
|
||
import React, { memo } from "react"; | ||
// import PropTypes from 'prop-types'; | ||
import pluginId from "../../pluginId"; | ||
|
||
const HomePage = () => { | ||
return ( | ||
<div> | ||
<h1>{pluginId}'s HomePage</h1> | ||
<p>Happy coding</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default memo(HomePage); |
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 @@ | ||
/** | ||
* | ||
* Initializer | ||
* | ||
*/ | ||
|
||
import { useEffect, useRef } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import pluginId from '../../pluginId'; | ||
|
||
const Initializer = ({ updatePlugin }) => { | ||
const ref = useRef(); | ||
ref.current = updatePlugin; | ||
|
||
useEffect(() => { | ||
ref.current(pluginId, 'isReady', true); | ||
}, []); | ||
|
||
return null; | ||
}; | ||
|
||
Initializer.propTypes = { | ||
updatePlugin: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default Initializer; |
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,53 @@ | ||
import pluginPkg from "../../package.json"; | ||
import pluginId from "./pluginId"; | ||
import App from "./containers/App"; | ||
import Initializer from "./containers/Initializer"; | ||
import lifecycles from "./lifecycles"; | ||
import trads from "./translations"; | ||
|
||
export default (strapi) => { | ||
const pluginDescription = | ||
pluginPkg.strapi.description || pluginPkg.description; | ||
const icon = pluginPkg.strapi.icon; | ||
const name = pluginPkg.strapi.name; | ||
|
||
const plugin = { | ||
blockerComponent: null, | ||
blockerComponentProps: {}, | ||
description: pluginDescription, | ||
icon, | ||
id: pluginId, | ||
initializer: Initializer, | ||
injectedComponents: [], | ||
isReady: false, | ||
isRequired: pluginPkg.strapi.required || false, | ||
layout: null, | ||
lifecycles, | ||
mainComponent: App, | ||
name, | ||
preventComponentRendering: false, | ||
trads, | ||
menu: { | ||
pluginsSectionLinks: [ | ||
{ | ||
destination: `/plugins/${pluginId}`, | ||
icon, | ||
label: { | ||
id: `${pluginId}.plugin.name`, | ||
defaultMessage: name, | ||
}, | ||
name, | ||
permissions: [ | ||
// Uncomment to set the permissions of the plugin here | ||
// { | ||
// action: '', // the action name should be plugins::plugin-name.actionType | ||
// subject: null, | ||
// }, | ||
], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
return strapi.registerPlugin(plugin); | ||
}; |
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,3 @@ | ||
function lifecycles() {} | ||
|
||
export default lifecycles; |
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,7 @@ | ||
const pluginPkg = require('../../package.json'); | ||
const pluginId = pluginPkg.name.replace( | ||
/^strapi-plugin-/i, | ||
'' | ||
); | ||
|
||
module.exports = pluginId; |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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,3 @@ | ||
{ | ||
"plugin.name": "Import / Export Content" | ||
} |
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,3 @@ | ||
{ | ||
"plugin.name": "Importar / Exportar Contenido" | ||
} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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,49 @@ | ||
import ar from './ar.json'; | ||
import cs from './cs.json'; | ||
import de from './de.json'; | ||
import en from './en.json'; | ||
import es from './es.json'; | ||
import fr from './fr.json'; | ||
import id from './id.json'; | ||
import it from './it.json'; | ||
import ko from './ko.json'; | ||
import ms from './ms.json'; | ||
import nl from './nl.json'; | ||
import pl from './pl.json'; | ||
import ptBR from './pt-BR.json'; | ||
import pt from './pt.json'; | ||
import ru from './ru.json'; | ||
import th from './th.json'; | ||
import tr from './tr.json'; | ||
import uk from './uk.json'; | ||
import vi from './vi.json'; | ||
import zhHans from './zh-Hans.json'; | ||
import zh from './zh.json'; | ||
import sk from './sk.json'; | ||
|
||
const trads = { | ||
ar, | ||
cs, | ||
de, | ||
en, | ||
es, | ||
fr, | ||
id, | ||
it, | ||
ko, | ||
ms, | ||
nl, | ||
pl, | ||
'pt-BR': ptBR, | ||
pt, | ||
ru, | ||
th, | ||
tr, | ||
uk, | ||
vi, | ||
'zh-Hans': zhHans, | ||
zh, | ||
sk, | ||
}; | ||
|
||
export default trads; |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
import pluginId from '../pluginId'; | ||
|
||
const getTrad = id => `${pluginId}.${id}`; | ||
|
||
export default getTrad; |
Oops, something went wrong.