Coder Social home page Coder Social logo

grunt-plistbuddy's People

Contributors

matiassingers avatar memolog avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

grunt-plistbuddy's Issues

Need help to add Array

Hello @memolog !
How do I add the array in .plist file using grunt?
For example I need to add in the following format:

<key>UIBackgroundModes</key>
    <array>
      <string>audio</string>
      <string>location</string>
    </array>

Add support for task options

I think the ability to define task-level options in missing in grunt-plistbuddy, currently everything except path are target-level options.

I think making src a task-level option as well makes a lot of sense.

It would make it possible to do something like this:

grunt.initConfig({
  plistbuddy: {
    options: {
      src: 'YourApp-Info.plist'
    },
    addShortVersion: {
      method: 'Add',
      entry: ':CFBundleShortVersionString',
      type: 'string',
      value: '1.0'
    },
    setShortVersion: {
      method: 'Set',
      entry: ':CFBundleShortVersionString',
      value: '1.0'
    },
    rootInfo: {
      method: 'Set',
      entry: 'PreferenceSpecifiers:1:Key',
      value: '1.0',
      src: 'yourAppDir/Resources/Settings.bundle/Root.plist'
    },
  }
});

@memolog before I created a pull-request I just wanted to explain and hear what your thoughts are.

Add support for multiple manipulations per task

Ideally, it'd be great to be able to bundle multiple plist manipulations into a single task.
I'd like to not have to do this:

grunt plistbuddy:addShortVersion plistbuddy:setShortVersion

grunt.initConfig({
  plistbuddy: {
    addShortVersion: {
      method: 'Add',
      entry: ':CFBundleShortVersionString',
      type: 'string',
      value: '1.0',
      src: 'YourApp-Info.plist'
    },
    setShortVersion: {
      method: 'Set',
      entry: ':CFBundleShortVersionString',
      value: '1.0',
      src: 'YourApp-Info.plist'
    }
  }
});

And instead be able to do this:

grunt plistbuddy:doVersions

grunt.initConfig({
  plistbuddy: {
    doVersions: [{
      method: 'Add',
      entry: ':CFBundleShortVersionString',
      type: 'string',
      value: '1.0',
      src: 'YourApp-Info.plist'
    },{
      method: 'Set',
      entry: ':CFBundleShortVersionString',
      value: '1.0',
      src: 'YourApp-Info.plist'
    }]
  }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.