From 4d5d8904613025bae520f20f4979e1b24a0fadf9 Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Thu, 5 Mar 2015 15:29:35 +0200 Subject: [PATCH] Add licenses --- LICENSE | 13 +++++++++++++ apps/LICENSE | 23 +++++++++++++++++++++++ gruntfile.js | 17 ++++++++++++++--- package.json | 4 +++- 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100755 LICENSE create mode 100755 apps/LICENSE diff --git a/LICENSE b/LICENSE new file mode 100755 index 000000000..49e2a9faf --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + Copyright (c) 2015 Telerik AD + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/apps/LICENSE b/apps/LICENSE new file mode 100755 index 000000000..a2ea2e632 --- /dev/null +++ b/apps/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Telerik AD +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/gruntfile.js b/gruntfile.js index 24982735a..a0a275cad 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -32,6 +32,7 @@ module.exports = function(grunt) { contentAsObject.version = localCfg.packageVersion; contentAsObject.name = "tns-samples-" + currentAppName; contentAsObject.description = "Nativescript " + currentAppName + " sample application"; + contentAsObject.license = "BSD"; }); }; @@ -40,6 +41,7 @@ module.exports = function(grunt) { contentAsObject.version = localCfg.packageVersion; contentAsObject.name = "tns-definitions"; contentAsObject.description = "NativeScript Module definitions"; + contentAsObject.license = "Apache-2.0"; }); } @@ -119,6 +121,14 @@ module.exports = function(grunt) { dest: "<%= localCfg.outModulesDir %>/", cwd: localCfg.srcDir }, + license: { + expand: true, + src: [ + "./LICENSE", + ], + dest: "<%= localCfg.outModulesDir %>/", + cwd: localCfg.srcDir + }, definitionFiles: { src: [ localCfg.srcDir + "/**/*.d.ts", @@ -178,7 +188,7 @@ module.exports = function(grunt) { }, readyAppFiles: { expand: true, - src: ["./**/*.*"], + src: ["./**/*.*", "../LICENSE"], dest: localCfg.outAppsDir + "/", cwd: localCfg.outModulesDir + "/apps/", options: { @@ -187,7 +197,7 @@ module.exports = function(grunt) { }, readyTsAppFiles: { expand: true, - src: ["./**/*.*", "!./**/*.map"], + src: ["./**/*.*", "!./**/*.map", "../LICENSE"], dest: localCfg.outTsAppsDir + "/", cwd: localCfg.srcAppsDir }, @@ -331,7 +341,8 @@ module.exports = function(grunt) { grunt.registerTask("collect-definitions-raw-files", []); grunt.registerTask("collect-modules-raw-files", [ - "copy:jsLibs" + "copy:jsLibs", + "copy:license" ]); grunt.registerTask("compile-ts", [ diff --git a/package.json b/package.json index 67ab4c3b2..6e191dbad 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,10 @@ "description": "Telerik NativeScript Core", "version": "0.4.2", "files": [ - "**/*.*" + "**/*.*", + "**/*" ], + "license": "Apache-2.0", "devDependencies": { "grunt": "0.4.5", "grunt-contrib-clean": "0.5.0",