raspikabek / sfdocs-sfdx-plugin Goto Github PK
View Code? Open in Web Editor NEWSalesforce Documentation Generator plugin for sfdx
Home Page: https://sfdocs.netlify.app
License: MIT License
Salesforce Documentation Generator plugin for sfdx
Home Page: https://sfdocs.netlify.app
License: MIT License
Describe the bug
Parse of Standard objects (Account, Contact) does not display the API name nor Label or Plural Label
To Reproduce
run sfdx sfdocs:generate
in a project with a standard object such us Account
Expected behavior
Using elements like Label, Fullname or PluralLabel should return Account
or Accounts
Describe the solution you'd like
Right now the support is only with Custom Objects and easy folder structures like Profiles, Permission Sets, etc.
List all structure types and carefully develop the modules per type, so in the future additional changes or different structures can be added with minor impact and development.
Main script now just... works. Let's refactor it into small pieces, small reusable methods and future-proof for re-usability or including new metadata structures into the project.
Describe the solution you'd like
Definition of default markdown templates per Metadata type for the parser.
Additional context
Sample template for CustomObjects (skeleton subject to changes if implementation changes)
export const customObject = [
{ h1: { type: 'label' } },
{ h3: { type: 'pluralLabel', label: 'Plural Label', separator: ' --> ' } },
{ h3: { type: 'fullName', label: 'Full Name', separator: ' --> ' } },
{ h3: { type: 'visibility', label: 'Visibility' } },
{ hr: '' },
{ p: { type: 'pluralLabel', label: 'Plural Label', separator: ' = ' } },
{
p: [
{ type: 'pluralLabel', label: 'Plural Label', separator: ' =>> ' },
{ type: 'fullName', label: 'Full Name', separator: ' =>> ' }
]
},
{ hr: '' },
{ blockquote: { type: 'pluralLabel', label: 'Plural Label', separator: ' = ' } },
{
blockquote: [
{ type: 'pluralLabel', label: 'Plural Label', separator: ' =>> ' },
{ type: 'fullName', label: 'Full Name', separator: ' =>> ' }
]
},
{ h2: 'Attributes' },
{
ul: [
{ type: 'enableFeeds', label: 'Enable Feeds' },
{ type: 'enableHistory', label: 'Enable History' },
{ type: 'enableActivities', label: 'Enable Activities' }
]
},
{ h2: 'List Views' },
{ ul: [{ type: 'listViews', elements: ['label', 'fullName', 'filterScope', 'columns'], separator: ' | ' }] },
{ h2: 'Fields' },
{ table: { type: 'fields', headers: ['Label', 'Full Name', 'Type', 'Reference To', 'Required'], rows: ['label', 'fullName', 'type', 'referenceTo', 'required'] } }
];
Describe the solution you'd like
To enable the possibility of adding links/mentions to PermissionSets/Profiles referecing an object/field
To include possibly this within the Object, next the fields as additional custom nodes so it can be referenced in the templates easily
Is your feature request related to a problem? Please describe.
Let the users customize their our templates so they have the ability to personalize the structure of their own documentation.
Describe the solution you'd like
Via JSON config files let the users the customize the structure of the page the parser will build. Ideally we would love to have partial substitution for easy customization, but initially we will implement a full replacement, later we will implement a partial substitution followed by some kind of unique ids and order?
Describe alternatives you've considered
We could have in the website a playground with a dummy project where the users could build a template and export the configuration
To implement github workflows to automatically create releases and publish to NPM
master
, to create a new release candidate and publish to npm ( rc
tag )rc
as latest
Refactor how markdown.ts works to include proper types & interfaces to ensure the build works with no issues.
Is your feature request related to a problem? Please describe.
Use of handlebars
npm package to format JSON into Markdown/HTML templates
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Use mustache alternatively, but seems like Handlerbars is more powerful with the usage of helpers and other logical stuff due to mustache is logic-less
Handlerbars might be heavier than mustache in terms of size
Additional context
For this BETA Version, only a few handlebars templates exist:
We need to prepare a more prepare default templates in MD and HTML for these items + add templates for other common metadata types.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.