luyadev/luya

theme/create command with not working output

Closed this issue · 3 comments

What steps will reproduce the problem?

Use theme/create command

What is the expected result?

Output files should work as theme by default.

What do you get instead?

Not working files.

Additional infos

  • Wrong asset css source
  • Wrong namespace in Asset
  • Asset needs $sourcePath set I think
nadar commented

Do you get an exception? the luya\web\Asset does not require a sourcePath, it has a default path:

https://luya.io/api/luya-web-Asset

  1. Wrong asset css source
core/console/commands/ThemeController.php
-> line 162
\'{$themeName}.css\',
  1. Wrong namespace in Asset
core/console/commands/ThemeController.php
-> line 180 
use luya\themes\frontend\\'.$className.';
  1. Asset needs $sourcePath set I think

Sorry my fault, bad explanation. Yes the asset is correct like this, but this seems somehow confusing that there's a need to add a new asset folder inside -> The file or directory to be published does not exist: F:\Projekte\projectname\themes\themename\resources\theme-asset (As the folder "theme-asset" is not built by default)

So I think either the $sourcePath should be set or the folder should be built automatically. So probably somehow here add the folder...

core/console/commands/ThemeController.php
-> line 75 
$folders = [

@JohnnyMcWeed thank you for reporting, I open a PR to fix it.