Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Fix hanging CI builds #352

Commits on Apr 21, 2017

  1. Fix usage of plugin with npm 2

    Whenever you try using the plugin with `npm 2`, it's postinstall script will fail, as it requires `fs-extra` module. However it's not been added as dependency of the plugin, so it does not exist in node_modules and `require` fails.
    When npm 3 or later is used, the `fs-extra` plugin exists in the root level of `node_modules` as it is a dependency of `fs-promise`. npm 3 and later tries to flatten the dependencies tree, so `fs-extra` is moved in the root level and the `require` in the post-install script works.
    
    In order to fix this, add the `fs-extra` as dependency of the plugin.
    
    NOTE: Maybe it's worth checking why we need fs-extra, Node.js `fs` could do the work, but I leave it for further discussions.
    rosen-vladimirov committed Apr 21, 2017
    Configuration menu
    Copy the full SHA
    bb00f56 View commit details
    Browse the repository at this point in the history
  2. Fix postinstall in CI environment

    In case you are in CI environment (non-interactive terminal), the postinstall script will fail as it prompts for action (in case there's no firebase.nativescript.json). As this is one of the basic scenarios when adding a plugin (add it and try building the project), some CI or cloud builds are hanging.
    So add a check if the console is interactive and use the default settings in case it is.
    rosen-vladimirov committed Apr 21, 2017
    Configuration menu
    Copy the full SHA
    02c874a View commit details
    Browse the repository at this point in the history