Repository: incubator-freemarker-docgen
Updated Branches:
  refs/heads/master b69ded483 -> d03201fa6


Added copyright headers and "do not edit" warning to Gulp generated CSS and JS 
files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/commit/d03201fa
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/tree/d03201fa
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/diff/d03201fa

Branch: refs/heads/master
Commit: d03201fa676270c057c4aa7af0d88441393558f4
Parents: b69ded4
Author: ddekany <ddek...@apache.org>
Authored: Fri Jan 1 21:14:09 2016 +0100
Committer: ddekany <ddek...@apache.org>
Committed: Fri Jan 1 21:14:09 2016 +0100

----------------------------------------------------------------------
 gulpfile.js                                     |  8 +++++++
 package.json                                    |  1 +
 .../freemarker/docgen/gulp-output-header.txt    | 22 ++++++++++++++++++++
 3 files changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/blob/d03201fa/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
index 8a15fb6..36020ec 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,6 +1,7 @@
 'use strict';
 
 var path = require('path');
+var fs = require('fs');
 
 var gulp = require('gulp');
 var less = require('gulp-less');
@@ -9,10 +10,13 @@ var minifyCss = require('gulp-minify-css');
 var prefix = require('gulp-autoprefixer');
 var uglify = require('gulp-uglify');
 var concat = require('gulp-concat');
+var headerfooter = require('gulp-headerfooter');
 
 var BASE_DIR = path.join(__dirname, 'src', 'main', 'org', 'freemarker', 
'docgen');
 var OUT_DIR = path.join(BASE_DIR, 'statics');
 
+var header = fs.readFileSync(path.join(BASE_DIR, 'gulp-output-header.txt'));
+
 gulp.task('styles', function() {
   gulp.src(path.join(BASE_DIR, 'less', 'styles.less'))
     .pipe(less({ paths: path.join(__dirname, 'node_modules') }))
@@ -20,6 +24,7 @@ gulp.task('styles', function() {
     // rename and prefix
     .pipe(rename({ basename: 'docgen' }))
     .pipe(prefix({ cascade: false }))
+    .pipe(headerfooter.header(header))
     .pipe(gulp.dest(OUT_DIR))
 
     // minify
@@ -29,6 +34,7 @@ gulp.task('styles', function() {
       restructuring: false,
       aggressiveMerging: false
     }))
+    .pipe(headerfooter.header(header))
     .pipe(gulp.dest(OUT_DIR));
 });
 
@@ -40,9 +46,11 @@ gulp.task('js', function() {
       path.join(BASE_DIR, 'js', 'search.js')
     ])
     .pipe(concat('main.js'))
+    .pipe(headerfooter.header(header))
     .pipe(gulp.dest(OUT_DIR))
     .pipe(uglify())
     .pipe(rename({ suffix: '.min' }))
+    .pipe(headerfooter.header(header))
     .pipe(gulp.dest(OUT_DIR));
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/blob/d03201fa/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b9b0f74..d402648 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
     "gulp-minify-css": "1.2.1",
     "gulp-rename": "1.2.2",
     "gulp-uglify": "1.5.1",
+    "gulp-headerfooter": "1.0.3",
     "less": "2.5.3"
   },
   "engines": {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker-docgen/blob/d03201fa/src/main/org/freemarker/docgen/gulp-output-header.txt
----------------------------------------------------------------------
diff --git a/src/main/org/freemarker/docgen/gulp-output-header.txt 
b/src/main/org/freemarker/docgen/gulp-output-header.txt
new file mode 100644
index 0000000..94f0b00
--- /dev/null
+++ b/src/main/org/freemarker/docgen/gulp-output-header.txt
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/*
+ * GENERATED FILE - DO NOT EDIT! Instead, regenerate with Gulp!
+ */

Reply via email to