How to use the @create-figma-plugin/common.constants.packageJson function in @create-figma-plugin/common

To help you get started, we’ve selected a few @create-figma-plugin/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yuanqing / create-figma-plugin / packages / create-figma-plugin / src / create-figma-plugin.js View on Github external
function createDefaultConfig ({ name, template }) {
  const result = {
    name: constants.packageJson.defaultPluginName,
    template: 'default'
  }
  if (typeof name !== 'undefined') {
    result.name = name
  }
  if (typeof template !== 'undefined') {
    result.template = template
  }
  return result
}