apache / cordova-windows

[DEPRECATED] Apache Cordova Windows
Apache License 2.0
203 stars 171 forks source link

Fix path to winjs dependency #331

Closed raphinesse closed 5 years ago

raphinesse commented 5 years ago

Motivation and Context

Fixes #326

Description

Properly resolve the path to our dependency instead of guessing it.

Testing

Manual:

$ cordova create cordovaWindows7Test
Creating a new cordova project.
$ cd cordovaWindows7Test
$ cordova platform add ~/code/cordova-windows
Warning: using prerelease platform windows@7.1.0-dev.
Use 'cordova platform add windows@latest' to add the latest published version instead.
Adding windows project...
Creating Cordova Windows Project:
    Path: platforms/windows
    Namespace: io.cordova.hellocordova
    Name: HelloCordova
Windows project created with cordova-windows@7.1.0-dev
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for windows
Adding cordova-plugin-whitelist to package.json

Unfortunately, a regression test is not easily to be had. The Problem is that, in our E2E tests, create copies the node_modules folder to where it expects it later when copying the winjs file. In a multi-platform project setup via CLI, the layout is different and node_modules is not copied in the first place.

regnete commented 5 years ago

https://github.com/apache/cordova-windows/issues/341#issuecomment-508391818