mvila / serverless-plugin-scripts

Add scripting capabilities to the Serverless Framework
123 stars 15 forks source link

Feature request: Add ability to specify script configuration with variables #9

Closed Enase closed 4 years ago

Enase commented 4 years ago

Add ability to specify script configuration node as any sls variable.

Example:

custom:
  scripts: ${file(./your/path/config-hooks.yml)}

Proposal: Add configuration value population in configuration load method getConfig()

Current state:

  getConfig() {
    const service = this.serverless.service;
    return service.custom && service.custom.scripts;
  }

Change proposition:

  getConfig() {
    const service = this.serverless.service;
    const config = service.custom && service.custom.scripts;
    if (config) {
       return this.serverless.variables.populateValue(config);
    }
    return undefined;
  }
mvila commented 4 years ago

I am so sorry, but since I don't use the Serverless framework anymore, I don't feel comfortable adding new features. I edited the README to mention that this project is now in maintenance mode.