http-post-message
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
interface IHttpPostMessageRequest { | ||
@@ -2,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -0,1 +1,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
export interface IHttpPostMessageRequest { | ||
@@ -2,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -0,1 +1,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -2,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -0,1 +1,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["http-post-message"]=e():t["http-post-message"]=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e){"use strict";var o=function(){function t(t,e,o){void 0===o&&(o={}),this.defaultHeaders=o,this.targetWindow=t,this.windowPostMessageProxy=e}return t.addTrackingProperties=function(t,e){return t.headers=t.headers||{},e&&e.id&&(t.headers.id=e.id),t},t.getTrackingProperties=function(t){return{id:t.headers.id}},t.isErrorMessage=function(t){return!(200<=t.statusCode&&t.statusCode<300)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.send({method:"GET",url:t,headers:e})},t.prototype.post=function(t,e,o){return void 0===o&&(o={}),this.send({method:"POST",url:t,headers:o,body:e})},t.prototype.put=function(t,e,o){return void 0===o&&(o={}),this.send({method:"PUT",url:t,headers:o,body:e})},t.prototype.patch=function(t,e,o){return void 0===o&&(o={}),this.send({method:"PATCH",url:t,headers:o,body:e})},t.prototype["delete"]=function(t,e,o){return void 0===e&&(e=null),void 0===o&&(o={}),this.send({method:"DELETE",url:t,headers:o,body:e})},t.prototype.send=function(t){return this.assign(t.headers,this.defaultHeaders),this.windowPostMessageProxy.postMessage(this.targetWindow,t)},t.prototype.assign=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var r=Object(t);return e.forEach(function(t){if(void 0!==t&&null!==t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}),r},t}();e.HttpPostMessage=o}])}); |
var gulp = require('gulp-help')(require('gulp')); | ||
var rename = require('gulp-rename'), | ||
var del = require('del'), | ||
header = require('gulp-header'), | ||
rename = require('gulp-rename'), | ||
replace = require('gulp-replace'), | ||
@@ -13,7 +15,12 @@ uglify = require('gulp-uglify'), | ||
var package = require('./package.json'); | ||
var banner = "/*! <%= package.name %> v<%= package.version %> | (c) 2016 Microsoft Corporation <%= package.license %> */\n"; | ||
gulp.task('build', 'Build for release', function (done) { | ||
return runSequence( | ||
'clean:dist', | ||
'compile:ts', | ||
'min', | ||
'generatecustomdts', | ||
'header', | ||
done | ||
@@ -25,2 +32,3 @@ ); | ||
return runSequence( | ||
'clean:tmp', | ||
'compile:spec', | ||
@@ -38,4 +46,10 @@ 'test:spec', | ||
gulp.task('header', 'Add header to distributed files', function () { | ||
return gulp.src(['!./dist/*.map', './dist/*']) | ||
.pipe(header(banner, { package : package })) | ||
.pipe(gulp.dest('./dist')); | ||
}); | ||
gulp.task('min', 'Minify build files', function () { | ||
return gulp.src(['./dist/*.js']) | ||
return gulp.src(['!./dist/*.min.js', './dist/*.js']) | ||
.pipe(uglify()) | ||
@@ -48,2 +62,14 @@ .pipe(rename({ | ||
gulp.task('clean:dist', 'Clean dist folder', function () { | ||
return del([ | ||
'./dist/**/*' | ||
]); | ||
}); | ||
gulp.task('clean:tmp', 'Clean tmp folder', function () { | ||
return del([ | ||
'./tmp/**/*' | ||
]); | ||
}); | ||
gulp.task('compile:spec', 'Compile typescript for tests', function () { | ||
@@ -50,0 +76,0 @@ return gulp.src(['typings/browser/**/*.d.ts', './src/**/*.ts', './test/**/*.spec.ts']) |
{ | ||
"name": "http-post-message", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A library to enabled HTTP communication over window.postMessage using window-post-message-proxy. The enables communicating with iframes in a well known protocol and pattern.", | ||
@@ -29,3 +29,5 @@ "main": "dist/httpPostMessage.js", | ||
"devDependencies": { | ||
"del": "^2.2.1", | ||
"gulp": "^3.9.1", | ||
"gulp-header": "^1.8.7", | ||
"gulp-help": "^1.6.1", | ||
@@ -32,0 +34,0 @@ "gulp-rename": "^1.2.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1380
98045
21
31