nystudio107 / generator-craftplugin

generator-craftplugin is a Yeoman generator for Craft CMS plugins
MIT License
73 stars 30 forks source link

Not able to unzip result for v3 plugin #17

Closed sjelfull closed 7 years ago

sjelfull commented 7 years ago

I'm not able to unzip the zip file. Tried different programs, and also got this error from unzip:

Archive: /Users/fred/Craft/Test/test.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /Users/fred/Craft/Test/test.zip or /Users/fred/Craft/Test/test.zip.zip, and cannot find /Users/fred/Craft/Test/test.zip.ZIP, period.

This is the settings I tried:

image

khalwat commented 7 years ago

What happens if you click Build My Plugin again?

khalwat commented 7 years ago

Ah, the generator is throwing an error because there's no name for your Service.

khalwat commented 7 years ago

It should work now:

vagrant@homestead ~/sites/pluginfactory/craft/storage/runtime/temp/pluginfactory (master) $ yo craftplugin --pluginComponents="controllers,models,records,services,settings,twigextensions,variables" --apiVersion="api_version_3_0" --pluginName="Test" --pluginDescription="Test" --pluginVersion="1.0.0" --pluginVendorName="sjelfull" --pluginAuthorName="Fred Carlsen" --pluginAuthorUrl="http://sjelfull.no" --pluginAuthorGithub="sjelfull" --codeComments="yes" --controllerName="" --elementName="" --fieldName="" --modelName="One,Two" --purchasableName="" --recordName="One,Two" --serviceName="" --taskName="" --widgetName=""
[ Initializing ]
[ Prompting ]
[ Configuring ]
{ pluginName: 'Test',
  pluginDescription: 'Test',
  pluginVersion: '1.0.0',
  pluginAuthorName: 'Fred Carlsen',
  pluginVendorName: 'sjelfull',
  pluginAuthorUrl: 'http://sjelfull.no',
  pluginAuthorGithub: 'sjelfull',
  codeComments: 'yes',
  pluginComponents:
   [ 'controllers',
     'models',
     'records',
     'services',
     'settings',
     'twigextensions',
     'variables' ],
  controllerName: [ 'Default' ],
  elementName: [ '' ],
  fieldName: [ '' ],
  modelName: [ 'One', 'Two' ],
  purchasableName: [ '' ],
  recordName: [ 'One', 'Two' ],
  serviceName: [ 'Default' ],
  taskName: [ '' ],
  widgetName: [ '' ],
  templatesDir: 'templates',
  pluginDirName: 'test',
  pluginCamelHandle: 'test',
  pluginHandle: 'Test',
  dateNow: '2017-01-09T17:54:28.843Z',
  niceDate: '2017.01.09',
  copyrightNotice: 'Copyright (c) 2017 Fred Carlsen',
  pluginDownloadUrl: 'https://github.com/sjelfull/test/archive/master.zip',
  pluginDocsUrl: 'https://github.com/sjelfull/test/blob/master/README.md',
  pluginReleasesUrl: 'https://raw.githubusercontent.com/sjelfull/test/master/releases.json',
  pluginCloneUrl: 'https://github.com/sjelfull/test.git' }
+ Creating Craft plugin folder test
[ Writing ]
{ pluginName: 'Test',
  pluginDescription: 'Test',
  pluginVersion: '1.0.0',
  pluginAuthorName: 'Fred Carlsen',
  pluginVendorName: 'sjelfull',
  pluginAuthorUrl: 'http://sjelfull.no',
  pluginAuthorGithub: 'sjelfull',
  codeComments: 'yes',
  pluginComponents:
   [ 'controllers',
     'models',
     'records',
     'services',
     'settings',
     'twigextensions',
     'variables' ],
  controllerName: [ 'Default' ],
  elementName: [ '' ],
  fieldName: [ '' ],
  modelName: [ 'One', 'Two' ],
  purchasableName: [ '' ],
  recordName: [ 'One', 'Two' ],
  serviceName: [ 'Default' ],
  taskName: [ '' ],
  widgetName: [ '' ],
  templatesDir: 'templates',
  pluginDirName: 'test',
  pluginCamelHandle: 'test',
  pluginHandle: 'Test',
  dateNow: '2017-01-09T17:54:28.843Z',
  niceDate: '2017.01.09',
  copyrightNotice: 'Copyright (c) 2017 Fred Carlsen',
  pluginDownloadUrl: 'https://github.com/sjelfull/test/archive/master.zip',
  pluginDocsUrl: 'https://github.com/sjelfull/test/blob/master/README.md',
  pluginReleasesUrl: 'https://raw.githubusercontent.com/sjelfull/test/master/releases.json',
  pluginCloneUrl: 'https://github.com/sjelfull/test.git' }
> Writing template files
+ templates/src/_Plugin.php wrote to test/src/Test.php
+ templates/src/models/_Settings.php wrote to test/src/models/Settings.php
+ templates/_README.md wrote to test/README.md
+ templates/_CHANGELOG.md wrote to test/CHANGELOG.md
+ templates/_LICENSE.md wrote to test/LICENSE.md
+ templates/_releases.json wrote to test/releases.json
+ templates/_composer.json wrote to test/composer.json
+ templates/src/controllers/_Controller.php wrote to test/src/controllers/DefaultController.php
+ templates/src/models/_Model.php wrote to test/src/models/One.php
+ templates/src/models/_Model.php wrote to test/src/models/Two.php
+ templates/src/records/_Record.php wrote to test/src/records/One.php
+ templates/src/records/_Record.php wrote to test/src/records/Two.php
+ templates/src/migrations/_Install.php wrote to test/src/migrations/Install.php
+ templates/src/services/_Service.php wrote to test/src/services/Default.php
+ templates/src/templates/_settings.twig wrote to test/src/templates/Test_Settings.twig
+ templates/src/translations/_en.php wrote to test/src/translations/en/test.php
+ templates/src/twigextensions/_TwigExtension.php wrote to test/src/twigextensions/TestTwigExtension.php
+ templates/src/variables/_Variable.php wrote to test/src/variables/TestVariable.php
+ templates/src/resources/css/_style.css wrote to test/src/resources/css/Test_Style.css
+ templates/src/resources/js/_script.js wrote to test/src/resources/js/Test_Script.js
> Copying boilerplate files
+ templates/src/resources/icon-mask.svg copied to test/src/resources/icon-mask.svg
+ templates/src/resources/icon.svg copied to test/src/resources/icon.svg
+ templates/src/resources/images/plugin.png copied to test/src/resources/images/plugin.png
+ templates/src/resources/screenshots/plugin_logo.png copied to test/src/resources/screenshots/plugin_logo.png
> Sync to file system
   create test/src/Test.php
   create test/src/models/Settings.php
   create test/README.md
   create test/CHANGELOG.md
   create test/LICENSE.md
   create test/releases.json
   create test/composer.json
   create test/src/controllers/DefaultController.php
   create test/src/models/One.php
   create test/src/models/Two.php
   create test/src/records/One.php
   create test/src/records/Two.php
   create test/src/migrations/Install.php
   create test/src/services/Default.php
   create test/src/templates/Test_Settings.twig
   create test/src/translations/en/test.php
   create test/src/twigextensions/TestTwigExtension.php
   create test/src/variables/TestVariable.php
   create test/src/resources/css/Test_Style.css
   create test/src/resources/js/Test_Script.js
   create test/src/resources/icon-mask.svg
   create test/src/resources/icon.svg
   create test/src/resources/images/plugin.png
   create test/src/resources/screenshots/plugin_logo.png
[ Install ]
[ End ]
> End install commands
+ Fin. executed
Your Craft CMS plugin Test has been created.
The default LICENSE.txt is the MIT license; feel free to change it as you see fit.
> All set.  Have a nice day.