const convertZone = ( zone ) => ( { description: unescape( zone.description ), id: zone.term_id, name: unescape( zone.name ), slug: zone.slug, } )
const generateModuleSection = (doclet) => `--- title: '${doclet.name}' permalink: ${tagValue(doclet, 'permalink')} category: ${tagValue(doclet, 'category')} subCategory: Reference menuOrder: ${tagValue(doclet, 'menuOrder')} --- ${doclet.description}\n\n`
grp.request.url.variable.forEach(function (obj) { restParam.push({ name:obj.key, remark:obj.description, value:{ "status" : "", "data" : obj.value?[obj.value]:[], "type" : 0 } }) })
program .command('explore') .description('explore GraphQL data') .option('-p, --port <port>', 'use specified port (default: 8080)') .option('-h, --host <host>', 'use specified host (default: 0.0.0.0)') .action(args => { wrapCommand(require('./lib/explore'))(context, args) })
render() { return ( <Item> <Title>{this.props.title}</Title> <Description>{this.props.description}</Description> </Item> ) }
const dbCommunityToSearchCommunity = (community: DBCommunity): SearchCommunity => { let description = community.description; description = description && withoutStopWords(description); return { id: community.id, description, name: community.name, slug: community.slug, website: community.website ? community.website : null, objectID: community.id, }; }
function addExtensionDirectives (schemaComposer, extensions, location) { for (const name in extensions) { const extension = extensions[name] const directive = new GraphQLDirective({ args: normalizeArgs(schemaComposer, extension.args), description: extension.description, locations: [location], name }) schemaComposer.addDirective(directive) } }
function generateTypeDefs(doclets) { if (!doclets.length) { return ''; } const res = doclets.map((doclet) => [`## ${doclet.name}`, doclet.description, generateParams(doclet, 'properties'), '\n'] .filter((d) => !!d) .join('\n')); return res.join('\n'); }
const generateClassSection = (doclet) => { const header = `## ${doclet.name}\n`; let classSection = [header, (doclet.classdesc || doclet.description).trim(), '\n'].join('\n'); if (doclet.params && doclet.params.length) { classSection = classSection.concat(generateFunctionDocletSection(doclet, true)); } return classSection; }
program .command('build') .description('build site for production') .action(() => { wrapCommand(require('./lib/build'))(context, {}) })
// `$ strapi generate:api` program .command('generate:api <id> [attributes...]') .option('-a, --api <api>', 'API name to generate the files in') .option('-p, --plugin <api>', 'Name of the local plugin') .option('-e, --extend <api>', 'Name of the plugin to extend') .option('-c, --connection <connection>', 'The name of the connection to use') .description('generate a basic API') .action((id, attributes, cliArguments) => { cliArguments.attributes = attributes; getLocalScript('generate')(id, cliArguments); });
program .command('info') .description('output information about the local environment') .action(() => { const info = require('../lib/commands/info') return wrapCommand(info)() })
// `$ strapi generate:model` program .command('generate:model <id> [attributes...]') .option('-a, --api <api>', 'API name to generate a sub API') .option('-p, --plugin <api>', 'plugin name') .option('-c, --connection <connection>', 'The name of the connection to use') .description('generate a model for an API') .action((id, attributes, cliArguments) => { cliArguments.attributes = attributes; getLocalScript('generate')(id, cliArguments); });
program .command('info') .description('output information about the local environment') .action(() => { const info = require('../lib/commands/info') return wrapCommand(info)() })
program .command('develop') .description('start development server') .option('-p, --port <port>', 'use specified port (default: 8080)') .option('-h, --host <host>', 'use specified host (default: 0.0.0.0)') .action(args => { wrapCommand(require('./lib/develop'))(context, args) })