The path which has been mentioned as below for typed js library

Please use command "drush dal" to download dependencies or manually download the repository https://github.com/mattboldt/typed.js/archive/master.zip into the libraries folder to define the following structure [DRUPAL_ROOT]/libraries/typedJS/typed.js-master/js/typed.js

After downloading library, I did not get any /js/typed.js file. As I understand, the correct file path should be [DRUPAL_ROOT]/libraries/typedJS/typed.js-master/src/typed.js, that should be corrected in module. Please correct me if I am wrong.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devendra Mishra created an issue. See original summary.

Devendra Mishra’s picture

Issue summary: View changes
neuquen’s picture

I'm seeing the same issue.

As a temporary fix I changed the animations_dependencies.typedJS.file configration value within animations/config/install/animations.config.yml:

animations_dependencies:
  typedJS:
    name: "Typed JS"
    repository: "https://github.com/mattboldt/typed.js/archive/master.zip"
    file: "typed.js-master/src/typed.js"

And then refreshed the config with drush:

drush cim -y --partial --source=modules/contrib/animations/config/install/

cobenash’s picture

Because of using composer, I think maybe the module should change the default library path.

The current library path is using "[DRUPAL_ROOT]/libraries/typedJS/typed.js-master/js/typed.js".

However, I think it should be "[DRUPAL_ROOT]/libraries/typedjs/src/typed.js" instead.

we can easily follow the default installer-path of drupal-library.

cobenash’s picture

In order to use composer download and manage library, I made a little change.

cobenash’s picture

#2898824 mentioned before. The path of typejs has already been committed in to 8.x-1.x-dev.
However, it still not compatible with composer. So I made a little change on config.yml.
The patch is used to 8.x-1.x-dev version.
it can be installed via composer require drupal/animations:1.x-dev

And Add the following line to the repositories of the composer.json file

      {
            "type": "package",
            "package": {
                "name": "mattboldt/typedjs",
                "version": "2.0.9",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/mattboldt/typed.js/archive/v2.0.9.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "daneden/animatecss",
                "version": "3.7.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/daneden/animate.css/archive/3.7.0.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "matthieua/wowjs",
                "version": "1.1.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/matthieua/WOW/archive/1.1.0.zip",
                    "type": "zip"
                }
            }
        }

and then use composer require mattboldt/typedjs daneden/animatecss matthieua/wowjs

it will work perfectly. :)

cobenash’s picture

Status: Active » Needs review
deggertsen’s picture

FileSize
5.06 KB
38.36 KB

Did everything according to #6, but libraries are all still showing up as missing. See attached screenshots.

vuil’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
arnaldop’s picture

Version: 8.x-1.x-dev » 8.x-1.2
FileSize
952 bytes

Patch for latest 8.x-1.2.

arnaldop’s picture

New patch. Sorry for the confusion.

arnaldop’s picture

Well, what a fun morning of side tracks and tangents!

Here is a (hopefully) final patch for 8.x-1.2.

Included in this patch are:

  1. Changes that actually deploy to the target version.
  2. I noticed that we're using the master versions of all of the libraries. This is a bad practice. Any change committed to master branch of those dependencies can break things, and no one has any control over it. People running drush dal today can get totally different results tomorrow. So all of the versions are now fixed to the most recent release:
    • typed.js - v2.0.11
    • animate.css - v3.7.2
    • WOW - v1.1.0

This will also address the root complaint in https://www.drupal.org/project/animations/issues/2912546 and will also ensure that new downloads of this module won't break because the dependencies have new code in their master branches.

arnaldop’s picture

Status: Reviewed & tested by the community » Needs review
floown’s picture

FileSize
45.9 KB

Hello,

I have apply the patch, but the problem seems always to be here.

floown’s picture

I have try too with a: composer require drupal/animations:1.x-dev

I have adapt to the latest zip, inspired from #6:

      {
            "type": "package",
            "package": {
                "name": "mattboldt/typedjs",
                "version": "2.0.11",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/mattboldt/typed.js/archive/v2.0.11.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "daneden/animatecss",
                "version": "3.7.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/daneden/animate.css/archive/3.7.0.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "matthieua/wowjs",
                "version": "1.1.2",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/matthieua/WOW/archive/1.1.2.zip",
                    "type": "zip"
                }
            }
        }

The libraries are downloaded, but the directories names are not good. I have rename them, but I have always the result like in my previous screenshot.

So, a solution for 1.2 or dev version?

Regards