luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

theme/create command with not working output #2020

Closed JohnnyMcWeed closed 4 years ago

JohnnyMcWeed commented 4 years ago

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

nadar commented 4 years ago

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

JohnnyMcWeed commented 4 years ago
  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 = [
boehsermoe commented 4 years ago

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