Identifies and copies the contents of a folder named with Semantic Versioning
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-semvercopy --save-dev
In your project's Gruntfile, add a section named
semvercopy to the data object passed into
grunt.initConfig(). semvercopy is a multi-task.
The name of the resource you would like to pull in.
The path to the parent directory of the SemVer named folders.
The destination folder to copy the contents of the max SemVer folder.
You have an external dependency on a CoreAPI which is organized on disk into SemVer named folders.
You would like to copy the contents of version ~1.1 into your current project in the location
A possible gruntfile could look like -
When run, the contents of
//NETWORK/CoreAPI/1.1.2/ will be copied into
Resources can either be place directly in the gruntfile config or configured from within a JSON file. When multiple resources are found, every resource is acted upon naive of others that have or will run.
Single JSON file
Multiple JSON files
In the above examples, resourceFiles are valid json files that contain the resources object/array.
"resources":"name": "ResourceName""range": "~1.1.1""parentDirectory": "//NETWORK/Path/To/Parent/"
"resources":"name": "ResourceName""range": "~1.1.1""parentDirectory": "//NETWORK/Path/To/Parent/""name": "AnotherResourceName""range": "~1.1.1""parentDirectory": "//NETWORK/Path/To/AnotherParent/"
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Test your code using Grunt.