INNER CODE UNIT · JavaScript
commonPartRe
serverless/plugins · generate-docs.js:9
const commonPartRe = /(?:(?:^|-)serverless-plugin(?:-|$))|(?:(?:^|-)serverless(?:-|$))/;
const config = {
transforms: {
/*
In readme.md the below comment block adds the list to the readme
<!-- AUTO-GENERATED-CONTENT:START (GENERATE_SERVERLESS_PLUGIN_TABLE)-->
plugin list will be generated here
<!-- AUTO-GENERATED-CONTENT:END -->
*/
GENERATE_SERVERLESS_PLUGIN_TABLE: function(content, options) {
const commandsFile = path.join(__dirname, 'plugins.json')
const plugins = JSON.parse(fs.readFileSync(commandsFile, 'utf8'))
let md = '| Plugin | Stats |\n'
md += '|:---------------------------|:-----------:|\n'
plugins.sort(function (a, b) {
const aName = a.name.toLowerCase();