From 0dd7a851c49cdc987dd4812f6aa21688b5fec672 Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Sun, 14 Dec 2014 13:27:25 -0800 Subject: [PATCH] Add nuget publishing support --- Moment.js.nuspec | 28 ++++++++++++++++++++++++++++ package.json | 4 +++- tasks/nuget.js | 29 +++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 Moment.js.nuspec create mode 100644 tasks/nuget.js diff --git a/Moment.js.nuspec b/Moment.js.nuspec new file mode 100644 index 000000000..962482366 --- /dev/null +++ b/Moment.js.nuspec @@ -0,0 +1,28 @@ + + + + Moment.js + 2.8.4 + Tim Wood + Cory Deppen, Iskren Chernev + A lightweight javascript date library for parsing, manipulating, and formatting dates. + + - Add LTS localised format that includes seconds + - Added formatToken 'x' for unix offset in milliseconds #1938 + - Support 24:00:00.000 to mean next day, at midnight. + - Accept 'date' key when creating moment with object + - Use native toISOString when we can + - Some bugfixes and language improvements + + http://momentjs.com/ + http://pbs.twimg.com/profile_images/482670411402858496/Xrtdc94q_normal.png + https://raw.github.com/timrwood/moment/master/LICENSE + JavaScript date time browser node.js + + + + + + + + diff --git a/package.json b/package.json index 7ca38de5a..5ab7b1fd1 100644 --- a/package.json +++ b/package.json @@ -43,14 +43,16 @@ "grunt": "latest", "nodeunit": "latest", "benchmark": "latest", + "grunt-contrib-clean": "latest", "grunt-contrib-jshint": "latest", "grunt-contrib-nodeunit": "latest", "grunt-contrib-concat": "latest", "grunt-contrib-uglify": "latest", "grunt-contrib-watch": "latest", "grunt-env": "latest", - "grunt-jscs": "0.7.1", + "grunt-jscs": "latest", "grunt-karma": "latest", + "grunt-nuget": "latest", "grunt-benchmark": "latest", "grunt-string-replace": "latest", "grunt-exec": "latest", diff --git a/tasks/nuget.js b/tasks/nuget.js new file mode 100644 index 000000000..4c1e7d011 --- /dev/null +++ b/tasks/nuget.js @@ -0,0 +1,29 @@ +module.exports = function (grunt) { + // If this fails you might need to follow: + // + // http://stackoverflow.com/questions/15181888/nuget-on-linux-error-getting-response-stream + // + // $ sudo mozroots --import --machine --sync + // $ sudo certmgr -ssl -m https://go.microsoft.com + // $ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net + // $ sudo certmgr -ssl -m https://nuget.org + + grunt.config('nugetpack', { + dist: { + src: 'Moment.js.nuspec', + dest: './', + } + }); + grunt.config('nugetpush', { + dist: { + src: 'Moment.js.*.nupkg', + } + }); + grunt.config('clean.nuget', { + src: 'Moment.js.*.nupkg' + }); + + grunt.registerTask('nuget-publish', [ + 'nugetpack', 'nugetpush', 'clean:nuget' + ]); +} -- 2.47.2