cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

installation of yawik/demo-skin fails. #519

Closed cbleek closed 6 years ago

cbleek commented 6 years ago

I've installed yawik via:

yawik@php7:~$ composer -sdev create-project yawik/standard YawikDemoPhp7

inatslling yawik/demo-skin fails with Module (YawikDemoSkin) could not be initialized.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing yawik/demo-skin (dev-develop 5403ef6): Cloning 5403ef62f6 from cache

  Please select which config file you wish to inject 'YawikDemoSkin' into:
  [0] Do not inject
  [1] config/modules.config.php
  Make your selection (default is 1):

  Remember this option for other packages of the same type? (Y/n)
    Installing YawikDemoSkin from package yawik/demo-skin
Writing lock file
Generating autoload files

  [Zend\ModuleManager\Exception\RuntimeException]   
  Module (YawikDemoSkin) could not be initialized.  

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

@kilip can you take a look?

kilip commented 6 years ago

This should be fixed now, please try.

I am still try to figure out how to load grunt task automatically in public/modules/*/Gruntfile.js, so we need to add this line manually in Gruntfile.js:

grunt.loadTasks('./public/modules/YawikDemoSkin');

After that you need to run grunt to generate minified assets for YawikDemoSkin:

$ grunt
TiSiE commented 6 years ago

I am still try to figure out how to load grunt task automatically in public/modules/*/Gruntfile.js,

Maybe this grunt plugin will be helpful: https://www.npmjs.com/package/grunt-recurse

Alternatively we could use our newly created composer-plugin to inject the tasks in the main Gruntfile.js (using composer.json config from the module - similar to the assets installation)

TiSiE commented 6 years ago

I don't know much about grunt yet, but after reading in the documentation a bit, I guess we could create a custom task, that runs the tasks from the modules...

kilip commented 6 years ago

@TiSiE I am not very familiar with grunt too. Maybe we can use a gulp which I think looks like better then grunt.

After doing some research looks like our solution is very simple:

https://github.com/yawik/standard/blob/6880c18b6f0a12eab72abf514aa2bed9ed23dc41/Gruntfile.js#L8-L14

It's working now, but all Gruntfiles.js in modules should use grunt.merge.config so it can be executed in grunt:

https://github.com/yawik/DemoSkin/blob/488f3301998dd529c7b9f4fe4ffd747e853a403f/public/Gruntfile.js#L5-L10

cbleek commented 6 years ago

this works now. Thank you