tomfulton / grunt-umbraco-package

A grunt task to automate the creation of installable Umbraco packages from your files.
MIT License
12 stars 4 forks source link

Allow specifying requirements from options #11

Open bjarnef opened 7 years ago

bjarnef commented 7 years ago

It seems it is not possible via the options object to specify the requirements (minimum Umbraco version). It just set requirements to 0.0.0 https://github.com/tomfulton/grunt-umbraco-package/blob/d1dc9823042d63f35eb40869b4a45d7942cdebd1/tasks/umbraco_package.js#L117-L121

When creating a package from Umbraco backoffice it set the requirements (default to Umbraco version in which the package is created).

<requirements type="strict">
        <major>7</major>
        <minor>5</minor>
        <patch>9</patch>
</requirements>

It would be great to add an object to handle this from json config, e.g.

{
    "name": "Switcher",
    "description": "Switcher for Umbraco 7",
    "directory": "Switcher",
    "version": "1.0.3",
    "requirements": {
        "major": 7,
        "minor": 5,
        "patch": 0
    },
    "url": "https://github.com/bjarnef/Switcher",
    "author": "Bjarne Fyrstenborg",
    "authorUrl": "https://github.com/bjarnef",
    "license": "MIT",
    "licenseUrl": "http://opensource.org/licenses/MIT",
    "readme": "Switcher is a simple property editor that works as an alternative to the core true/false datatype. It can be used for different kinds of true/false values e.g. on/off, active/deactive or enabled/disabled and gives a more visual feedback to the content editor. Furthermore it is great for content editors, who edit content from tablets, where the switch-button is touch friendly."
}
willroscoe commented 6 years ago

I've made a pull request to add this functionality.