@garbarino/gb-jscommons
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -1,2 +0,1 @@ | ||
const webpack = require('webpack'); | ||
const path = require('path'); | ||
@@ -16,13 +15,6 @@ const CleanWebpackPlugin = require('clean-webpack-plugin'); | ||
library: ["gbJsCommons", "[name]"], | ||
libraryTarget:'var' | ||
libraryTarget:'umd' | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin(['dist'], {root: rootFolder}), | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
filename: "commons.js", | ||
name: "commons" | ||
}), | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}) | ||
new CleanWebpackPlugin(['dist'], {root: rootFolder}) | ||
], | ||
@@ -29,0 +21,0 @@ module: { |
@@ -0,1 +1,2 @@ | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
@@ -5,3 +6,8 @@ const common = require('./webpack.common.js'); | ||
module.exports = merge(common, { | ||
devtool: 'inline-source-map' | ||
devtool: 'inline-source-map', | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('development') | ||
}) | ||
] | ||
}); |
@@ -0,1 +1,2 @@ | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
@@ -5,6 +6,31 @@ const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | ||
module.exports = merge(common, { | ||
const prodConfig = merge(common, { | ||
plugins: [ | ||
new UglifyJSPlugin() | ||
new UglifyJSPlugin(), | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}) | ||
] | ||
}); | ||
}); | ||
module.exports = [ | ||
prodConfig, | ||
merge.strategy( | ||
{ | ||
'plugins': 'replace' | ||
})( | ||
prodConfig, | ||
{ | ||
output: { | ||
path: prodConfig.output.path + "/es5" | ||
}, | ||
plugins: [ | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
filename: "commons.js", | ||
name: "commons" | ||
}) | ||
] | ||
} | ||
) | ||
] |
@@ -1,1 +0,1 @@ | ||
var gbJsCommons=gbJsCommons||{};gbJsCommons.other=webpackJsonpgbJsCommons__name_([1],[,function(e,o,s){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;o.default="test"}],[1]); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.other=t():(e.gbJsCommons=e.gbJsCommons||{},e.gbJsCommons.other=t())}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="test"}])}); |
@@ -1,1 +0,1 @@ | ||
var gbJsCommons=gbJsCommons||{};gbJsCommons["push-notifications"]=webpackJsonpgbJsCommons__name_([0],[function(e,n,r){"use strict";function o(){return"serviceWorker"in navigator&&"PushManager"in window}Object.defineProperty(n,"__esModule",{value:!0}),n.isCompatible=o,n.subscribeUserToPush=function(){return o()?navigator.serviceWorker.getRegistration().then(function(e){var n={userVisibleOnly:!0,applicationServerKey:t};return e.pushManager.subscribe(n)}).then(function(e){return console.log("Received PushSubscription: ",JSON.stringify(e)),e}):Promise.reject("Push notifications no compatible")},n.sendSubscriptionToBackEnd=function(e){return fetch("/api/save-subscription/",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":"32223507-c36c-42c2-b52d-b3f1d65fa5ae"},body:JSON.stringify(e)}).then(function(e){if(!e.ok)throw new Error("Bad status code from server.");return e.json()}).then(function(e){if(!e.data||!e.data.success)throw new Error("Bad response from server.")})};var t=function(e){for(var n=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(r.length),t=0;t<r.length;++t)o[t]=r.charCodeAt(t);return o}("BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U")}],[0]); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["push-notifications"]=n():(e.gbJsCommons=e.gbJsCommons||{},e.gbJsCommons["push-notifications"]=n())}("undefined"!=typeof self?self:this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=0)}([function(e,n,t){"use strict";function r(){return"serviceWorker"in navigator&&"PushManager"in window}Object.defineProperty(n,"__esModule",{value:!0}),n.isCompatible=r,n.subscribeUserToPush=function(){return r()?navigator.serviceWorker.getRegistration().then(function(e){var n={userVisibleOnly:!0,applicationServerKey:o};return e.pushManager.subscribe(n)}).then(function(e){return console.log("Received PushSubscription: ",JSON.stringify(e)),e}):Promise.reject("Push notifications no compatible")},n.sendSubscriptionToBackEnd=function(e){return fetch("/api/save-subscription/",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":"32223507-c36c-42c2-b52d-b3f1d65fa5ae"},body:JSON.stringify(e)}).then(function(e){if(!e.ok)throw new Error("Bad status code from server.");return e.json()}).then(function(e){if(!e.data||!e.data.success)throw new Error("Bad response from server.")})};var o=function(e){for(var n=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),t="undefined"!=typeof window?window.atob(n):"",r=new Uint8Array(t.length),o=0;o<t.length;++o)r[o]=t.charCodeAt(o);return r}("BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U")}])}); |
@@ -56,3 +56,3 @@ const APPLICATIONSERVERKEY = urlB64ToUint8Array('BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U'); | ||
const rawData = window.atob(base64); | ||
const rawData = typeof window !== "undefined" ? window.atob(base64) : ""; | ||
let outputArray = new Uint8Array(rawData.length); | ||
@@ -59,0 +59,0 @@ |
{ | ||
"name": "@garbarino/gb-jscommons", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A package of common functions used in our JavaScript applications.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
19156
14
396
1
55
4