blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

dev-create script does not support "workspace" type

Open moniika opened this issue 4 years ago • 2 comments

Category

Plugins

Component

dev-create

Is your feature request related to a problem? Please describe.

"workspace" is not one of the supported types that can be passed to the dev-create script although it is one of the plugin types we describe in our documentation.

Describe the solution you'd like

Support passing "workspace" as a type.

Describe alternatives you've considered

Don't support it and developers use the "plugin" type and then manually rename their plugin.

Additional context

moniika avatar May 10 '21 20:05 moniika

This issue has a few steps to resolve:

  1. Figure out how to test your changes. Navigate to the plugins/dev-create directory. Run the command npx . test -d . --skip-install --type workspace and observe how you get the error.
Unknown plugin type: workspace
Available types: plugin, field, block, theme
  1. Modify the code in plugins/dev-create/bin/create.js to include the new plugin type 'workspace'.
  2. Copy one of the existing templates under plugins/dev-create/templates (e.g. "field") and rename it to "workspace".
  3. Rename all instances of the old template name (e.g. "field") to the new name "workspace".
  4. Run the npx . test -d . --skip-install --type workspace command again, and verify that it properly creates a directory using your new template.
  5. Open your PR and resolve any PR comments.

After your PR is accepted, developers creating Blockly plugin will be able to easily create workspace-style plugins =)

BeksOmega avatar Aug 08 '22 20:08 BeksOmega

Going to hold off on this one for now since create-package should be changing soon.

maribethb avatar Aug 18 '22 23:08 maribethb