csantanapr / grunt-cordovacli

Wraps web app with Cordova CLI using GruntJS
Apache License 2.0
60 stars 31 forks source link

Use different paths for tasks #26

Closed Phoscur closed 9 years ago

Phoscur commented 9 years ago

From my codebase I'm able to build two different apps (internal&external) for the same domain. But using the same gruntfile does do not work:

Cordova does not know undefined; try `cordova help` for a list of all the available commands.
 cordovacli:
      internal:
        options:
          path: './app/'
        plugins:
          options:
            command: 'plugin'
            action: 'add'
            plugins: cordovaPlugins
      external:
        options:
          path: './app-external/'
        plugins:
          options:
            command: 'plugin'
            action: 'add'
            plugins: cordovaPlugins
csantanapr commented 9 years ago

Wrong usage of Gruntfile.js

try this

 cordovacli:
        plugins_for_internal:
          options:
            path: './app/'
            command: 'plugin'
            action: 'add'
            plugins: cordovaPlugins
        plugins_for_external:
          options:
            path: './app-external/'
            command: 'plugin'
            action: 'add'
            plugins: cordovaPlugins