Hi!

Library assets placed in dist directory of package.

This is very important when when using npm-asset composer setup to automate libraries setup.

Comments

5n00py created an issue. See original summary.

andileco’s picture

Thanks--I'll work on getting this tested/implemented soon. This submodule still has a lot of work, so any patches are greatly appreciated!

5n00py’s picture

StatusFileSize
new709 bytes
new622 bytes

Also I found that declared files does not exists in dist dir:

/libraries/chartjs/dist/chart.scale.lineargauge.js: {  }
/libraries/chartjs/dist/chart.element.gaugerect.js: {  }
/libraries/chartjs/dist/chart.lineargauge.js: {  }
andileco’s picture

Hey @5n00py, when I install with composer (according to the README.txt file inside the sub-module), it puts the file in /libraries/chartjs. Can you think of any way that both techniques for installing will work? Does my question make sense?

5n00py’s picture

@andileco Your question make sense, yes.

As I see, this Readme file should be rewritten. Method described in readme shows how to install just one js file of specific version of library, downloaded directly from chartjs.org.

This is not preferred solution. Match better to download it from bower/npm.
In composer.json of sub-module we have asset-packegist repo and bower dependency from this repo. This method is much better.

Off course installer paths should be configured in main composer.json like this:

"extra": {
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/libraries/{$name}": ["type:drupal-library"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/contrib/{$name}": ["type:drupal-drush"]
        }
    }

  • andileco committed 6927847 on 8.x-3.x authored by 5n00py
    Issue #3010250 by 5n00py, andileco: Chartjs library path
    
andileco’s picture

Status: Active » Fixed

Updated documentation and removed libraries.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.