Closed sjelfull closed 7 years ago
What happens if you click Build My Plugin
again?
Ah, the generator is throwing an error because there's no name for your Service.
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.
I'm not able to unzip the zip file. Tried different programs, and also got this error from unzip:
This is the settings I tried: