JSPM

suitecloud-config-hooks

1.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 8
    • Score
      100M100P100Q38050F
    • License ISC

    Provides hooks to be run when using the SuiteCloud Developer Framework CLI or VSCode extension

    Package Exports

    • suitecloud-config-hooks
    • suitecloud-config-hooks/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (suitecloud-config-hooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    SuiteCloud Config Hooks

    Hooks into Node version of SuiteCloud Developer Framework CLI. These can be executed automatically with SDF commands by creating a suitecloud.config.js file. Details on creating this file can be found in the Help Center.

    Example suitecloud.config.js

    const hooks = require('suitecloud-config-hooks');
    
    module.exports = {
      commands: {
        'object:import': {
          onCompleted: hooks.organizeImportedObjects,
        },
        'project:deploy': {
          beforeExecuting: async (options) => {
            await hooks.preventDeployWithoutRemote(options);
            if (hooks.isProd(options)) {
              await hooks.preventDeployWithUncommittedChanges(options);
            }
            return options;
          }
        }
      }
    }