You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flagon.apache.org by po...@apache.org on 2019/06/13 02:01:55 UTC
[incubator-flagon-useralejs] branch v1.0.0ReRelease updated: Add
ASF licence to minifyed JS
This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch v1.0.0ReRelease
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git
The following commit(s) were added to refs/heads/v1.0.0ReRelease by this push:
new 53df024 Add ASF licence to minifyed JS
new ef9e6df Merge pull request #8 from dameikle/v1.0.0ReRelease
53df024 is described below
commit 53df0245e2828b6a9e07a1b108907e397ad7ceca
Author: David Meikle <da...@meikle.io>
AuthorDate: Tue Jun 11 23:43:07 2019 +0100
Add ASF licence to minifyed JS
---
build/userale-1.0.0.js | 18 ++++++++++++++++++
build/userale-1.0.0.min.js | 17 +++++++++++++++++
gulpfile.js | 26 +++++++++++++++++++++++++-
package-lock.json | 40 ++++++++++++++++++++++++++++++++++++++++
package.json | 3 ++-
5 files changed, 102 insertions(+), 2 deletions(-)
diff --git a/build/userale-1.0.0.js b/build/userale-1.0.0.js
index f3d8d67..ebf5f9a 100644
--- a/build/userale-1.0.0.js
+++ b/build/userale-1.0.0.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.
+ * @preserved
+ */
+
(function (exports) {
'use strict';
diff --git a/build/userale-1.0.0.min.js b/build/userale-1.0.0.min.js
index 5253a54..3dc158e 100644
--- a/build/userale-1.0.0.min.js
+++ b/build/userale-1.0.0.min.js
@@ -1 +1,18 @@
+/**
+ * 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.
+ * @preserved
+ */
!function(t){"use strict";function e(t){if(t.timeStamp&&t.timeStamp>0){var e,n=Date.now()-t.timeStamp;if(n<0)e=function(){return t.timeStamp/1e3};else if(n>t.timeStamp){var r=performance.timing.navigationStart;e=function(t){return t+r}}else e=function(t){return t}}else e=function(){return Date.now()};return e}function n(t,e){Object.keys(e).forEach(function(n){if("userFromParams"===n){var a=r(e[n]);a&&(t.userId=a)}t[n]=e[n]})}function r(t){var e=t,n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)" [...]
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 38afea8..85505b9 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -24,6 +24,7 @@ var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var mocha = require('gulp-mocha');
var babel = require('babel-register');
+var license = require('rollup-plugin-license');
var version = require('./package.json').version;
var userale = 'userale-' + version;
@@ -38,6 +39,23 @@ gulp.task('rollup', function() {
return rollup({
entry : 'src/main.js',
plugins : [
+ license({
+ banner: 'Licensed to the Apache Software Foundation (ASF) under one or more\n' +
+ 'contributor license agreements. See the NOTICE file distributed with\n' +
+ 'this work for additional information regarding copyright ownership.\n' +
+ 'The ASF licenses this file to You under the Apache License, Version 2.0\n' +
+ '(the "License"); you may not use this file except in compliance with\n' +
+ 'the License. You may obtain a copy of the License at\n' +
+ '\n' +
+ 'http://www.apache.org/licenses/LICENSE-2.0\n' +
+ '\n' +
+ 'Unless required by applicable law or agreed to in writing, software\n' +
+ 'distributed under the License is distributed on an "AS IS" BASIS,\n' +
+ 'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
+ 'See the License for the specific language governing permissions and\n' +
+ 'limitations under the License.' +
+ '\n@preserved'
+ }),
json()
]
})
@@ -53,7 +71,13 @@ gulp.task('rollup', function() {
// Minify and output completed build
gulp.task('build', ['rollup'], function() {
return gulp.src('build/' + userale + '.js')
- .pipe(uglify())
+ .pipe(uglify({
+ preserveComments: function (node, comment) {
+ if (/@preserved/.test(comment.value)) {
+ return true;
+ }
+ }
+ }))
.on('error', gutil.log)
.pipe(rename({ suffix : '.min' }))
.pipe(gulp.dest('build'))
diff --git a/package-lock.json b/package-lock.json
index 709669e..f11fb47 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1437,6 +1437,12 @@
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
+ "commenting": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.1.0.tgz",
+ "integrity": "sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==",
+ "dev": true
+ },
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -4506,6 +4512,15 @@
"integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
"dev": true
},
+ "magic-string": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz",
+ "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==",
+ "dev": true,
+ "requires": {
+ "sourcemap-codec": "^1.4.4"
+ }
+ },
"make-dir": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
@@ -4720,6 +4735,12 @@
}
}
},
+ "moment": {
+ "version": "2.24.0",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
+ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==",
+ "dev": true
+ },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -5681,6 +5702,19 @@
"rollup-pluginutils": "^2.0.1"
}
},
+ "rollup-plugin-license": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.9.0.tgz",
+ "integrity": "sha512-/1PW3C1+xIeUsaSQdvRsMFu7Oqmou6ArLBy5vDfem1Yv8wEBGlJ4+izYTZn61Lq39srT+6bndK+zfYTz0CrXQQ==",
+ "dev": true,
+ "requires": {
+ "commenting": "1.1.0",
+ "lodash": "4.17.11",
+ "magic-string": "0.25.2",
+ "mkdirp": "0.5.1",
+ "moment": "2.24.0"
+ }
+ },
"rollup-pluginutils": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.7.1.tgz",
@@ -6041,6 +6075,12 @@
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
"dev": true
},
+ "sourcemap-codec": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz",
+ "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==",
+ "dev": true
+ },
"sparkles": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
diff --git a/package.json b/package.json
index d874979..4951b2c 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
"nodemon": "^1.9.2",
"rollup": "^0.26.0",
"rollup-plugin-json": "^2.0.1",
- "sinon": "^1.17.6"
+ "sinon": "^1.17.6",
+ "rollup-plugin-license": "^0.9.0"
}
}