semantic-release/test/fixtures/plugin-log-env.js
Pierre Vanduynslager a94e08de9a feat: pass cwd and env context to plugins
- Allow to run semantic-release (via API) from anywhere passing the current working directory.
- Allows to simplify the tests and to run them in parallel in both the core and plugins.
2018-07-17 00:42:04 -04:00

7 lines
282 B
JavaScript

module.exports = (pluginConfig, {env, logger}) => {
console.log(`Console: Exposing token ${env.MY_TOKEN}`);
logger.log(`Log: Exposing token ${env.MY_TOKEN}`);
logger.error(`Error: Console token ${env.MY_TOKEN}`);
throw new Error(`Throw error: Exposing ${env.MY_TOKEN}`);
};