generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/eea/volto-slate-footnote …
…into docs
- Loading branch information
Showing
47 changed files
with
3,472 additions
and
242 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,9 @@ | ||
const defaultBabel = require('@plone/volto/babel'); | ||
|
||
function applyDefault(api) { | ||
const voltoBabel = defaultBabel(api); | ||
voltoBabel.plugins.push('istanbul'); | ||
return voltoBabel; | ||
} | ||
|
||
module.exports = applyDefault; |
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
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,2 @@ | ||
[ -n "$CI" ] && exit 0 | ||
yarn lint-staged |
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,48 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const projectRootPath = fs.existsSync('./project') | ||
? fs.realpathSync('./project') | ||
: fs.realpathSync('./../../../'); | ||
const packageJson = require(path.join(projectRootPath, 'package.json')); | ||
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions; | ||
|
||
const pathsConfig = jsConfig.paths; | ||
|
||
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto'); | ||
|
||
Object.keys(pathsConfig).forEach(pkg => { | ||
if (pkg === '@plone/volto') { | ||
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`; | ||
} | ||
}); | ||
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`); | ||
const reg = new AddonConfigurationRegistry(projectRootPath); | ||
|
||
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons | ||
const addonAliases = Object.keys(reg.packages).map(o => [ | ||
o, | ||
reg.packages[o].modulePath, | ||
]); | ||
|
||
|
||
module.exports = { | ||
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`, | ||
settings: { | ||
'import/resolver': { | ||
alias: { | ||
map: [ | ||
['@plone/volto', '@plone/volto/src'], | ||
...addonAliases, | ||
['@package', `${__dirname}/src`], | ||
['~', `${__dirname}/src`], | ||
], | ||
extensions: ['.js', '.jsx', '.json'], | ||
}, | ||
'babel-plugin-root-import': { | ||
rootPathSuffix: 'src', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
{ | ||
"npm": { | ||
"publish": true | ||
}, | ||
"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}" | ||
"tagName": "${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" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,14 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG VOLTO_VERSION | ||
FROM plone/frontend-builder:${VOLTO_VERSION} | ||
|
||
ARG ADDON_NAME | ||
ARG ADDON_PATH | ||
|
||
COPY --chown=node:node ./ /app/src/addons/${ADDON_PATH}/ | ||
|
||
RUN /setupAddon | ||
RUN yarn install | ||
|
||
ENTRYPOINT ["yarn"] | ||
CMD ["start"] |
Oops, something went wrong.