[OLINGO-429] add headers, extend rat module, remove dependencies
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/733b57dd Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/733b57dd Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/733b57dd Branch: refs/heads/master Commit: 733b57dd808269cfa5fabe22e8f7b4bd735000fb Parents: cf77b73 Author: Sven Kobler <[email protected]> Authored: Wed Sep 10 09:18:45 2014 +0200 Committer: Sven Kobler <[email protected]> Committed: Wed Sep 10 09:18:45 2014 +0200 ---------------------------------------------------------------------- odatajs/Gruntfile.js | 81 +- odatajs/JSLib.csproj | 19 + odatajs/JSLib.sln | 3 +- odatajs/Web.config | 19 + odatajs/demo/mypage.html | 28 - odatajs/demo/scripts/datajs-1.1.1.js | 10710 ----------------- odatajs/demo/scripts/datajs-1.1.1.min.js | 14 - odatajs/demo/scripts/datajs-1.1.2.js | 10577 ---------------- odatajs/demo/scripts/datajs-1.1.2.min.js | 13 - odatajs/demo/scripts/tools.js | 18 + odatajs/demo/tester.html | 29 +- .../stripheader/package.json | 18 + .../custom-tasks/rat/extern-tools/info.md | 18 + .../grunt-config/custom-tasks/rat/package.json | 19 + odatajs/grunt-config/custom-tasks/rat/readme.md | 18 + .../grunt-config/custom-tasks/rat/tasks/rat.js | 123 +- odatajs/grunt-config/rat-config.js | 51 +- odatajs/grunt-config/release.js | 25 +- odatajs/package.json | 4 +- odatajs/tests/common/djstest-browser.js | 2 +- odatajs/tests/common/djstest.js | 2 +- odatajs/tests/e2etest/Test.html | 4 +- 22 files changed, 337 insertions(+), 21458 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/733b57dd/odatajs/Gruntfile.js ---------------------------------------------------------------------- diff --git a/odatajs/Gruntfile.js b/odatajs/Gruntfile.js index d138ebf..58e0633 100644 --- a/odatajs/Gruntfile.js +++ b/odatajs/Gruntfile.js @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ module.exports = function(grunt) { 'use strict'; var pkg = grunt.file.readJSON('package.json'); @@ -13,48 +31,39 @@ module.exports = function(grunt) { banner: grunt.file.read('src/banner.txt'), artifactname : artifactname, - browserify: { // convert code from nodejs style to browser style + "browserify": { // convert code from nodejs style to browser style src: { - files: { 'build/<%= artifactname %>.js': ['src/index.js'] }, + files: { 'build/lib/<%= artifactname %>.js': ['src/index.js'] }, options: { // remove apache license headers before contatenating transform: ['./grunt-config/browserify_transforms/stripheader/stripheader.js'], } } }, - uglify: { // uglify and minify the lib + "uglify": { // uglify and minify the lib options: { sourceMap : true, - sourceMapName : 'build/<%= artifactname %>.map', + sourceMapName : 'build/lib/<%= artifactname %>.map', sourceMapIncludeSources : true, }, build: { - src: 'build/<%= artifactname %>.js', - dest: 'build/<%= artifactname %>.min.js' + src: 'build/lib/<%= artifactname %>.js', + dest: 'build/lib/<%= artifactname %>.min.js' } }, - concat : { // add the apache license headers + "concat" : { // add the apache license headers options : { banner : '<%= banner %>' }, licence: { - src: 'build/<%= artifactname %>.js', - dest: 'build/<%= artifactname %>.js', + src: 'build/lib/<%= artifactname %>.js', + dest: 'build/lib/<%= artifactname %>.js', }, licence_min: { - src: 'build/<%= artifactname %>.min.js', - dest: 'build/<%= artifactname %>.min.js', + src: 'build/lib/<%= artifactname %>.min.js', + dest: 'build/lib/<%= artifactname %>.min.js', }, }, - 'copy': { // copy odatajs library files to demo folder withch contains samples - forDemo: { - files: [{ - expand: true, cwd: 'build/', filter: 'isFile', - src: ['<%= artifactname %>*.*'], - dest: 'demo/scripts/' - }] - } - }, - 'jsdoc' : { // generate documentation + "jsdoc" : { // generate documentation src : { src: ['src/**/*.js'], options: { destination: 'build/doc-src', verbose : false } @@ -64,24 +73,25 @@ module.exports = function(grunt) { options: { destination: 'build/doc-test', verbose : false } } }, - 'npm-clean': { - tmp: { + "npm-clean": { + options: {force: true}, + "build": { + src: [ "build"], + }, + "lib": { + src: [ "build/lib"] + }, + "tmp": { src: [ "build/tmp"] }, - doc: { + "doc": { src: ["build/doc"], - options: { - force: true - } }, "doc-test": { src: ["build/doc-test"], - options: { - force: true - } }, }, - curl: { + "curl": { 'license': { src: { url: 'http://apache.org/licenses/LICENSE-2.0.txt', @@ -128,23 +138,22 @@ module.exports = function(grunt) { /*** E N D U S E R T A S K S ***/ - grunt.registerTask('clean', ['npm-clean:doc','npm-clean:tmp']); + grunt.registerTask('clean', ['npm-clean']); // Runs the license header check to verify the any source file contains a license header - grunt.registerTask('license-check', ['custom-license-check']); + grunt.registerTask('license-check', ['rat:manual']); // Create documentation in /build/doc grunt.registerTask('doc', ['clearEnv', 'jsdoc:src']); grunt.registerTask('doc-test', ['clearEnv', 'jsdoc:test']); // Build the odatajs library - grunt.registerTask('build', ['browserify:src', 'uglify:build', 'concat','copy:forDemo']); - + grunt.registerTask('build', ['clean:lib','browserify:src', 'uglify:build', 'concat']); grunt.registerTask('test-browser', ['configureProxies:test-browser', 'connect:test-browser']); grunt.registerTask('test-node', ['node-qunit:default-tests']); //grunt.registerTask('release', ['build','doc','compress']); - grunt.registerTask('update-legal', ['curl:license']); + //grunt.registerTask('update-legal', ['curl:license']); }; http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/733b57dd/odatajs/JSLib.csproj ---------------------------------------------------------------------- diff --git a/odatajs/JSLib.csproj b/odatajs/JSLib.csproj index 27253b1..847691f 100644 --- a/odatajs/JSLib.csproj +++ b/odatajs/JSLib.csproj @@ -1,4 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */--> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/733b57dd/odatajs/JSLib.sln ---------------------------------------------------------------------- diff --git a/odatajs/JSLib.sln b/odatajs/JSLib.sln index d265e52..61927d4 100644 --- a/odatajs/JSLib.sln +++ b/odatajs/JSLib.sln @@ -1,5 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 +Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JSLib", "JSLib.csproj", "{73ADF1A7-613B-4679-885B-2AE4AFAA9A6A}" EndProject http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/733b57dd/odatajs/Web.config ---------------------------------------------------------------------- diff --git a/odatajs/Web.config b/odatajs/Web.config index e45c79e..5441da1 100644 --- a/odatajs/Web.config +++ b/odatajs/Web.config @@ -1,4 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */--> <configuration> <system.web> <compilation debug="true" targetFramework="4.0"> http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/733b57dd/odatajs/demo/mypage.html ---------------------------------------------------------------------- diff --git a/odatajs/demo/mypage.html b/odatajs/demo/mypage.html deleted file mode 100644 index 16517a4..0000000 --- a/odatajs/demo/mypage.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>data js demo</title> - <script type="text/javascript" src="scripts/datajs-2.0.0.js"></script> - <script type="text/javascript" src="scripts/jquery-2.0.3.js"></script> - <script type="text/javascript" src="scripts/datajs_demo.js"></script> - <style type="text/css">.title { font-size: 30px;font-style: italic;}</style> -</head> -<body onload="run()"> - <div> - <span class="title">Simple Read</span> - <pre id="simpleRead"></pre> - </div> - <div> - <span class="title">Simple Read With Metadata</span> - <pre id="simpleReadWithMetadata"></pre> - </div> - <div> - <span class="title">Simple Read with JSONP</span> - <pre id="simpleReadWithJSONP"></pre> - </div> - <div> - <span class="title">Metadata</span> - <pre id="metadata"></pre> - </div> -</body> -</html>
