sfdx-generator
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

SFDX javascript wrapper.

styled with prettier Greenkeeper badge Travis Coveralls Dev Dependencies

A typescript tool that generates SFDX wrappers

Usage

 const sfdxGenerator = require('../compiled/sfdx-generator.js');
 const path = require('path');
 const root = path.resolve(__dirname, './..');
 
 // Using sfdx from dev dependencies instead of global;
 const sfdxPath = path.resolve(root, './node_modules/.bin/sfdx.cmd');
 
 const generator = new sfdxGenerator.Generator({
   SFDXPath: 'sfdx',
   outputDirectory: path.resolve(root, './generated'),
   templateDirectory: path.resolve(root, './templatesExample'),
   fileExtension: '.ts'
 });

 // Generate files using sfdx output.
 generator.generate().then(() => {
   console.log('Generating done');
 });

Documentation

Read our doc here: https://coveo.github.io/sfdx-generator/

dev scripts

  • npm start: Runs npm run build in watch mode.
  • npm run build: Generage bundles and typings, create docs.
  • npm run lint: Lints code.
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉).
  • npm run generate: Generate wrapper classes using the SFDX executable in path.

Git Hooks

There is already set a precommit hook for formatting your code with Prettier 💅

By default, there are 2 disabled git hooks. They're set up when you run the npm run semantic-release-prepare script. They make sure:

This makes more sense in combination with automatic releases.

Credits

Made with ❤️

/sfdx-generator/

    Package Sidebar

    Install

    npm i sfdx-generator

    Weekly Downloads

    1

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    4.71 MB

    Total Files

    34

    Last publish

    Collaborators

    • nlegros
    • msrioux
    • sallain
    • aboissinot
    • mmitiche
    • jkatofsky
    • agong-coveo
    • pixhel
    • ndlr
    • npmcoveo
    • lcoolen
    • coveo-organization
    • coveoit
    • olamothe
    • sssayegh
    • ylakhdar