Skip to content
Snippets Groups Projects
Select Git revision
  • 1d41394759c6eb18268dc22cfc9cee9dabaeef6f
  • master default protected
  • chrome-manifest-v3
  • feature/migrate-cordova-13
  • feat/improve-network-scan
  • feat/force-migration-check
  • develop
  • feature/encrypted_comment
  • feature/android_api_19
  • gitlab_migration_1
  • rml8
  • v1.7.15-rc1
  • v1.7.14
  • v1.7.13
  • v1.7.12
  • v1.7.11
  • v1.7.10
  • v1.7.9
  • v1.7.8
  • v1.7.7
  • v1.7.6
  • v1.7.5
  • v1.7.4
  • v1.7.3
  • v1.7.2
  • v1.7.1
  • v1.7.0
  • v1.7.0-rc2
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
31 results

postinstall.js

Blame
  • postinstall.js 771 B
    #!/usr/bin/env node
    
    const fs = require('fs'),
    path = require('path');
    
    // Remove not used file (from old cordova-uglify plugin)
    try {
      fs.unlinkSync('hooks/uglify-config.json');
    } catch (e) {
      // Silent
    }
    
    
    // Replace /www/lib with a symbolic link to bower component libs
    try {
      fs.unlinkSync('www/lib');
    }
    catch(e ) {
      // Silent
    }
    try {
      fs.symlinkSync(path.resolve('node_modules/@bower_components'), 'www/lib', 'junction');
    } catch (e) {
      throw new Error(e);
    }
    
    // Remove some symbolic links, from the www/lib.
    // This is a workaround, because Cordova copy failed on this file
    try {
      fs.unlinkSync('www/lib/ionic-material/node_modules/.bin/gulp');
    }
    catch(e) {
      // Silent
    }
    try {
      fs.unlinkSync('www/lib/moment/meteor/moment.js');
    } catch (e) {
      // Silent
    }