Repository: olingo-odata4-js Updated Branches: refs/heads/master a822e7f45 -> b34559141
[OLINGO-442] clean build 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/b3455914 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/b3455914 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/b3455914 Branch: refs/heads/master Commit: b34559141535eb4a25dd90cd1462195d9ff674df Parents: a822e7f Author: Sven Kobler <[email protected]> Authored: Fri Feb 27 11:20:38 2015 +0100 Committer: Sven Kobler <[email protected]> Committed: Fri Feb 27 11:20:38 2015 +0100 ---------------------------------------------------------------------- .gitignore | 4 +-- Gruntfile.js | 25 ++++++-------- demo/scripts/.gitignore | 2 -- grunt-config/custom-tasks/rat/.gitignore | 3 +- .../custom-tasks/rat/extern-tools/info.md | 22 ------------ grunt-config/custom-tasks/rat/readme.md | 6 ++-- grunt-config/custom-tasks/rat/tasks/rat.js | 8 ++--- grunt-config/rat-config.js | 36 +++++++++----------- grunt-config/release-config.js | 2 +- src/index-browser.js | 2 +- src/index.js | 5 --- 11 files changed, 39 insertions(+), 76 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 59a9f72..7ff281f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -# ignore local stuff +# ignore local stuff starting with an underscore _* -# ignore IDE +# ignore IDE settings .idea # ignore local config http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index fe8bf8d..79acfab 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -19,6 +19,7 @@ */ module.exports = function(grunt) { 'use strict'; + var intUse = '-internal use only-'; var pkg = grunt.file.readJSON('package.json'); // Build artifact base name @@ -56,10 +57,6 @@ module.exports = function(grunt) { "src" : { src: ["src/**/*.js"], options: { destination: "_build/doc-src", verbose : true, debug : true, pedantic : true } - }, - "test" : { - src: ["tests/**/*.js"], - options: { destination: "_build/doc-test", verbose : true, debug : true, pedantic : true } } }, "nugetpack" : { // create nuget pagckage @@ -110,24 +107,25 @@ module.exports = function(grunt) { grunt.renameTask('clean','priv-clean'); //rat-config.js/sign-config.js/release-config.js // Avoid problems with apache-rat tool - grunt.registerTask('clearEnv', 'clear JAVA_TOOL_OPTIONS', function() { + grunt.registerTask('clearEnv', intUse, function() { process.env['JAVA_TOOL_OPTIONS'] = ''; }); - // E N D U S E R T A S K S + // E N D U S E R T A S K S + + grunt.registerTask('default' , 'Show help', function() { grunt.log.write('Use grunt --help to get a list of tasks')}); - grunt.registerTask('clean', ['priv-clean:build']); + grunt.registerTask('clean', 'Clean the temporary build directories', ['priv-clean:build']); // BUILD the odatajs library - grunt.registerTask('build', ['clean:build','toBrowser:release', 'uglify:browser', 'copy:to-latest', 'nugetpack']); + grunt.registerTask('build', 'Build the odatajs library', ['clean:build','toBrowser:release', 'uglify:browser', 'copy:to-latest', 'nugetpack']); // Create DOCumentation in /_build/doc - grunt.registerTask('doc', ['clearEnv', 'jsdoc:src']); - grunt.registerTask('doc-test', ['clearEnv', 'jsdoc:test']); + grunt.registerTask('doc', 'Create documentation in folder ./_build/doc-src',['clearEnv', 'jsdoc:src']); // R E L E A S E T A S K S ( tasts defined in release-config.js) - grunt.registerTask('release',[ + grunt.registerTask('release','Build the odatajs library, run checks and package it in folder ./_dist',[ 'priv-clean:release-dist', 'build', 'doc', @@ -137,12 +135,11 @@ module.exports = function(grunt) { ]); - grunt.registerTask('release:sign',[ + grunt.registerTask('release:sign','Sign the files which are released (run "grunt release" before"',[ 'sign:release','sign:asc','sign:asc-verify' ]); // Runs the license header check to verify the any source file contains a license header - grunt.registerTask('license-check', ['rat:manual']); - + grunt.registerTask('license-check','Check files for the existence of the license header', ['rat:manual','rat:dist']); }; http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/demo/scripts/.gitignore ---------------------------------------------------------------------- diff --git a/demo/scripts/.gitignore b/demo/scripts/.gitignore deleted file mode 100644 index f7f55d4..0000000 --- a/demo/scripts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -datajs-2* -tmp/ http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/custom-tasks/rat/.gitignore ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/.gitignore b/grunt-config/custom-tasks/rat/.gitignore index 74c07ca..a56a7ef 100644 --- a/grunt-config/custom-tasks/rat/.gitignore +++ b/grunt-config/custom-tasks/rat/.gitignore @@ -1,3 +1,2 @@ node_modules -extern-tools/info.md -!extern-tools/info.md \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/custom-tasks/rat/extern-tools/info.md ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/extern-tools/info.md b/grunt-config/custom-tasks/rat/extern-tools/info.md deleted file mode 100644 index f48049e..0000000 --- a/grunt-config/custom-tasks/rat/extern-tools/info.md +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -Place apache-rat-0.11.jar from http://creadur.apache.org/rat/download_rat.cgi -in ./apache-rat-0.11/apache-rat-0.11.jar. - -See ./../readme.md for details \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/custom-tasks/rat/readme.md ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/readme.md b/grunt-config/custom-tasks/rat/readme.md index fd2795c..a742811 100644 --- a/grunt-config/custom-tasks/rat/readme.md +++ b/grunt-config/custom-tasks/rat/readme.md @@ -17,7 +17,7 @@ * under the License. */ Download "apache-rat-0.11-bin.zip" from http://creadur.apache.org/rat/download_rat.cgi and unpack it to -"extern-tools/apache-rat-0.11" +"_extern-tools/apache-rat-0.11" -"apache-rat-0.11.jar" must be located in ./extern-tools/apache-rat-0.11/apache-rat-0.11.jar -( full path from git root /odatajs/grunt-config/custom-tasks/rat/extern-tools/apache-rat-0.11/apache-rat-0.11.jar) \ No newline at end of file +"apache-rat-0.11.jar" must be located in ./_extern-tools/apache-rat-0.11/apache-rat-0.11.jar +( full path from git root /odatajs/grunt-config/custom-tasks/rat/_extern-tools/apache-rat-0.11/apache-rat-0.11.jar) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/custom-tasks/rat/tasks/rat.js ---------------------------------------------------------------------- diff --git a/grunt-config/custom-tasks/rat/tasks/rat.js b/grunt-config/custom-tasks/rat/tasks/rat.js index 287f1a4..789a883 100644 --- a/grunt-config/custom-tasks/rat/tasks/rat.js +++ b/grunt-config/custom-tasks/rat/tasks/rat.js @@ -28,8 +28,8 @@ module.exports = function (grunt) { var globalCB = this.async(); - var ratJarFile = path.resolve(__dirname,'./../extern-tools/apache-rat-0.11/apache-rat-0.11.jar'); - var options = this.options({ xml : true, dest : './build/tmp'}); + var ratJarFile = path.resolve(__dirname,'./../_extern-tools/apache-rat-0.11/apache-rat-0.11.jar'); + var options = this.options({ xml : true, dest : './_dist/tmp'}); //check output directory if(!fs.existsSync(options.dest)){ @@ -58,7 +58,7 @@ module.exports = function (grunt) { var options = data.options; var outPutFile = options.dest + '/'+ 'rat_' + (options.tag ? options.tag:'') + (options.xml ? '.xml' : '.txt'); - //sample command java -jar apache-rat-0.10.jar -x -d ./src > ./build/tmp/rat.txt + //sample command java -jar apache-rat-0.10.jar -x -d ./src > ./_dist/tmp/rat.txt var cmd = 'java -jar ' + ratJarFile+ ' '; cmd += options.xml ? ' -x' : ''; cmd += ' --force -d ' + checkDir; @@ -82,7 +82,7 @@ module.exports = function (grunt) { var checkOutFile = function(outFile,data,cb) { //check out files if (path.extname(outFile) !== '.xml') { - grunt.log.writeln(chalk.yellow('\nrat --> ' + 'No XML output: ('+outFile+') skipped!\n')); + //grunt.log.writeln(chalk.yellow('\nrat --> ' + 'No XML output: ('+outFile+') skipped!\n')); cb(); return; } http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/rat-config.js ---------------------------------------------------------------------- diff --git a/grunt-config/rat-config.js b/grunt-config/rat-config.js index 0de3933..23871ae 100644 --- a/grunt-config/rat-config.js +++ b/grunt-config/rat-config.js @@ -23,41 +23,37 @@ module.exports = function(grunt) { grunt.config('rat', { dist: { options: { - dest : './build/tmp', + dest : './_build/tmp', exclude: [ - "node_modules","extern-tools",".gitignore", + "node_modules","_extern-tools",".gitignore","package.json","JSLib", "DEPENDENCIES","LICENSE","NOTICE", - "JSLib.sln","package.json", "mocha.opts" + "JSLib.sln","package.json", "mocha.opts","info.txt" ] }, files: [ /*{ src: ['./../_dist/<%= artifactname %>/doc'], options:{ tag:"dist-doc"}},generated*/ - /*{ src: ['./../_dist/<%= artifactname %>/lib'], options:{ tag:"dist-lib"}},very slow*/ - { src: ['./../_dist/<%= artifactname %>/sources'], options:{ tag:"dist-src"}}, + { src: ['./src'], options:{ tag:"src"}}, + { src: ['./tests'], options:{ tag:"tests"}}, + { src: ['./demo'], options:{ tag:"demo"}}, + { src: ['./grunt-config'], options:{ tag:"grunt-config" }}, + { src: ['./_dist/<%= artifactname %>/lib'], options:{ tag:"dist-lib"}}, + { src: ['./_dist/<%= artifactname %>/sources'], options:{ tag:"dist-src"}} ] }, - "manual-dist": { + manual: { // with txt output options: { xml:false, - dest : './build/tmp', + dest : './_build/tmp', exclude: [ - "node_modules","extern-tools",".gitignore", + "node_modules","_extern-tools",".gitignore","package.json","JSLib", "DEPENDENCIES","LICENSE","NOTICE", - "JSLib.sln","package.json", "mocha.opts" + "JSLib.sln","package.json", "mocha.opts","info.txt" ] }, files: [ - /*{ src: ['./../_dist/<%= artifactname %>/doc'], options:{ tag:"dist-doc"}},generated*/ - /*{ src: ['./../_dist/<%= artifactname %>/lib'], options:{ tag:"dist-lib"}},very slow*/ - { src: ['./../_dist/<%= artifactname %>/sources'], options:{ tag:"dist-src"}}, - ] - }, - manual: { // with txt output - options: { xml:false, - dest : './build/tmp', - exclude: ["node_modules","extern-tools",".gitignore"] }, - files: [ { src: ['./src'], options:{ tag:"src"}}, { src: ['./tests'], options:{ tag:"tests"}}, { src: ['./demo'], options:{ tag:"demo"}}, - { src: ['./grunt-config'], options:{ tag:"grunt-config" }} + { src: ['./grunt-config'], options:{ tag:"grunt-config" }}, + { src: ['./_dist/<%= artifactname %>/lib'], options:{ tag:"dist-lib"}}, + { src: ['./_dist/<%= artifactname %>/sources'], options:{ tag:"dist-src"}} ] } }); http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/grunt-config/release-config.js ---------------------------------------------------------------------- diff --git a/grunt-config/release-config.js b/grunt-config/release-config.js index b634962..6865bb1 100644 --- a/grunt-config/release-config.js +++ b/grunt-config/release-config.js @@ -94,7 +94,7 @@ module.exports = function(grunt) { if (srcPath === 'node_modules' || contains(srcPath, 'node_modules')) { return false; } - if (srcPath === 'extern-tools' || contains(srcPath, 'extern-tools')) { + if (srcPath === '_extern-tools' || contains(srcPath, '_extern-tools')) { return false; } http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/src/index-browser.js ---------------------------------------------------------------------- diff --git a/src/index-browser.js b/src/index-browser.js index 6301acf..0524487 100644 --- a/src/index-browser.js +++ b/src/index-browser.js @@ -1,4 +1,4 @@ -/*1 +/* * 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 http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/b3455914/src/index.js ---------------------------------------------------------------------- diff --git a/src/index.js b/src/index.js index d939da2..28bf066 100644 --- a/src/index.js +++ b/src/index.js @@ -17,11 +17,6 @@ * under the License. */ -//console.log('main starting'); -//var a = require('./a.js'); -//var b = require('./b.js'); -//console.log('in main, a.done=%j, b.done=%j', a.done, b.done); - var odatajs = {}; odatajs.version = {
