spyne 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.travis.yml +2 -2
  2. package/karma.conf.js +18 -69
  3. package/lib/spyne.js +29752 -28672
  4. package/lib/spyne.min.js +1 -1
  5. package/lib/spyne.min.js.LICENSE.txt +9 -9
  6. package/package.json +21 -42
  7. package/src/spyne/channels/channel-fetch-class.js +25 -5
  8. package/src/spyne/channels/channel-payload-class.js +36 -23
  9. package/src/spyne/channels/channel-proxy.js +7 -5
  10. package/src/spyne/channels/channel.js +54 -28
  11. package/src/spyne/channels/channels-config.js +2 -4
  12. package/src/spyne/channels/{channels-delegator.js → channels-map.js} +25 -41
  13. package/src/spyne/channels/spyne-channel-lifecycle.js +1 -2
  14. package/src/spyne/channels/spyne-channel-route.js +21 -62
  15. package/src/spyne/channels/spyne-channel-ui.js +1 -2
  16. package/src/spyne/channels/spyne-channel-window.js +24 -35
  17. package/src/spyne/spyne-app.js +163 -0
  18. package/src/spyne/spyne-plugins.js +43 -40
  19. package/src/spyne/spyne.js +6 -157
  20. package/src/spyne/utils/channel-config-validator.js +0 -1
  21. package/src/spyne/utils/channel-fetch-util.js +1 -2
  22. package/src/spyne/utils/channel-payload-filter.js +9 -76
  23. package/src/spyne/utils/frp-tools.js +21 -1
  24. package/src/spyne/utils/gc.js +1 -1
  25. package/src/spyne/utils/route-channel-updater.js +0 -4
  26. package/src/spyne/utils/spyne-app-properties.js +183 -0
  27. package/src/spyne/utils/spyne-logger.js +18 -0
  28. package/src/spyne/utils/spyne-plugins-methods.js +97 -0
  29. package/src/spyne/utils/spyne-trait.js +2 -5
  30. package/src/spyne/utils/spyne-utils-channel-route-url.js +3 -8
  31. package/src/spyne/utils/spyne-utils-channel-route.js +6 -14
  32. package/src/spyne/utils/spyne-utils-channel-window.js +1 -3
  33. package/src/spyne/utils/viewstream-observables.js +2 -3
  34. package/src/spyne/views/dom-element-template.js +2 -7
  35. package/src/spyne/views/dom-element.js +0 -19
  36. package/src/spyne/views/view-stream-broadcaster.js +5 -10
  37. package/src/spyne/views/view-stream-element.js +1 -18
  38. package/src/spyne/views/view-stream-payload.js +31 -37
  39. package/src/spyne/views/view-stream-selector.js +3 -8
  40. package/src/spyne/views/view-stream.js +281 -297
  41. package/src/tests/channels/channel-fetch.test.js +102 -0
  42. package/src/tests/channels/channel-payload-class.test.js +14 -5
  43. package/src/tests/channels/channel-payload-filter.test.js +3 -28
  44. package/src/tests/channels/channel.test.js +38 -0
  45. package/src/tests/index.js +0 -1
  46. package/src/tests/index.test.js +6 -0
  47. package/src/tests/spyne-app.test.js +27 -0
  48. package/src/tests/spyne-plugin.test.js +13 -9
  49. package/src/tests/utils/plugins-methods.test.js +103 -0
  50. package/src/tests/utils/spyne-app-properties.test.js +11 -0
  51. package/webpack.config.js +19 -34
  52. package/lib/channel-action-filter.test.3516417154.js +0 -20
  53. package/lib/channel-dom.test.104366832.js +0 -20
  54. package/lib/channel-fetch-util.test.3506167575.js +0 -20
  55. package/lib/channel-payload-class.test.1081032524.js +0 -20
  56. package/lib/channel-payload-filter.test.977308429.js +0 -20
  57. package/lib/channel-route.test.3513636042.js +0 -20
  58. package/lib/channel-stream-item.test.119388071.js +0 -20
  59. package/lib/channel-ui.test.3778619579.js +0 -20
  60. package/lib/channel-util-dom.test.908537750.js +0 -20
  61. package/lib/commons.js +0 -49268
  62. package/lib/dom-el-selectors.test.1268485916.js +0 -20
  63. package/lib/dom-el-template.test.842696987.js +0 -20
  64. package/lib/dom-el.test.2045076905.js +0 -20
  65. package/lib/frp-tools.test.2503042868.js +0 -20
  66. package/lib/import.test.2658619365.js +0 -20
  67. package/lib/index.test.2372977745.js +0 -20
  68. package/lib/route-utils.test.273346057.js +0 -20
  69. package/lib/runtime.js +0 -172
  70. package/lib/spyne-plugin.test.301647328.js +0 -20
  71. package/lib/spyne.js.map +0 -1
  72. package/lib/url-utils.test.1931189114.js +0 -20
  73. package/lib/view-stream-broadcaster.test.1306675435.js +0 -20
  74. package/lib/view-stream-enhancer-loader.test.3617829096.js +0 -20
  75. package/lib/view-stream-enhancer.test.1053738169.js +0 -20
  76. package/lib/view-stream.test.573231784.js +0 -20
  77. package/src/spyne/channels/lifestream-payload.js +0 -56
  78. package/src/spyne/utils/channel-data-packet-generator.js +0 -200
  79. package/src/spyne/utils/channel-data-packet.js +0 -59
  80. package/src/spyne/utils/viewstream-dom-utils.js +0 -51
  81. package/src/spyne/views/view-stream-enhancer-loader.js +0 -70
@@ -0,0 +1,102 @@
1
+ const {expect, assert} = require('chai');
2
+ const {ChannelFetch} = require('../../spyne/channels/channel-fetch-class')
3
+
4
+ describe('should test ChannelFetch', () => {
5
+ const mapFn = (p) => {
6
+ //console.log('mapping fetched data ', p);
7
+ return p;
8
+ };
9
+
10
+ const channelName = "CHANNEL_MY_FETCHED_DATA"
11
+ let url = 'https://jsonplaceholder.typicode.com/posts/1';
12
+
13
+
14
+ it('should return true for valid mapFn method', () => {
15
+ let props = {
16
+ mapFn,
17
+ url,
18
+ method: 'GET'
19
+ };
20
+
21
+ const mapMethodIsValid = ChannelFetch.validateMapMethod(props, channelName);
22
+ //console.log('mapFn method is valid ',{mapMethodIsValid})
23
+ expect(mapMethodIsValid).to.be.true;
24
+
25
+ });
26
+
27
+ it('should return true for valid map method', () => {
28
+ const map = mapFn;
29
+ let props = {
30
+ map,
31
+ url,
32
+ method: 'GET'
33
+ };
34
+
35
+ const mapMethodIsValid = ChannelFetch.validateMapMethod(props, channelName);
36
+ //console.log('map method is valid ',{mapMethodIsValid})
37
+ expect(mapMethodIsValid).to.be.true;
38
+
39
+ });
40
+
41
+ it('should return true non existing map methods', () => {
42
+ let props = {
43
+ url
44
+ };
45
+
46
+ const noMapMethodAdded = ChannelFetch.validateMapMethod(props, channelName);
47
+ //console.log('map methods not added and is valid ',{noMapMethodAdded})
48
+ expect(noMapMethodAdded).to.be.true;
49
+
50
+ });
51
+
52
+ it('should return false for map of wrong type', () => {
53
+ const map = 4;
54
+ let props = {
55
+ map,
56
+ url
57
+ };
58
+
59
+ const mapTypeIsCorrect = ChannelFetch.validateMapMethod(props, "MY_TEST_NAME", true);
60
+ //console.log('map methods is not of correct type added and is valid1 ',{mapTypeIsCorrect}) ; expect(mapTypeIsCorrect).to.be.false;
61
+
62
+ });
63
+
64
+ it('should return false for mapFn of wrong type', () => {
65
+ const mapFn = 'my str';
66
+ let props = {
67
+ mapFn,
68
+ url
69
+ };
70
+
71
+ const mapTypeIsCorrect = ChannelFetch.validateMapMethod(props, "MY_TEST_NAME_2", true);
72
+ //console.log('map methods is not of correct type added and is valid2 ',{mapTypeIsCorrect}) ; expect(mapTypeIsCorrect).to.be.false;
73
+
74
+ });
75
+
76
+ it('should return false for map of wrong type', () => {
77
+ const map = undefined;
78
+ let props = {
79
+ map,
80
+ url
81
+ };
82
+
83
+ const mapTypeUndefined = ChannelFetch.validateMapMethod(props, "MY_TEST_NAME", true);
84
+ //console.log('map methods is not of correct type added and is valid3 ',{mapTypeUndefined}) ; expect(mapTypeUndefined).to.be.false;
85
+
86
+ });
87
+
88
+ it('should return false for mapFn of wrong type', () => {
89
+ const mapFn = undefined;
90
+ let props = {
91
+ mapFn,
92
+ url
93
+ };
94
+
95
+ const mapTypeUndefined = ChannelFetch.validateMapMethod(props, "MY_TEST_NAME_2", true);
96
+ //console.log('map methods is not of correct type added and is valid4 ',{mapTypeUndefined}) ; expect(mapTypeUndefined).to.be.false;
97
+
98
+ });
99
+
100
+
101
+
102
+ });
@@ -11,11 +11,10 @@ const R = require('ramda');
11
11
  describe('should test Channel Payload Class', () => {
12
12
  const {srcElement, event, action} = ChannelPayloadToTestFilters;
13
13
  const channelName = "CHANNEL_ROUTE";
14
+ SpyneApp.init({debug:true}, true);
14
15
 
15
- beforeEach(()=>{
16
-
17
- const spyneApp = new SpyneApp({debug:true})
18
-
16
+ before(()=>{
17
+ const spyneApp = SpyneApp;
19
18
  spyneApp.registerChannel(new Channel("CHANNEL_MYCHANNEL"))
20
19
 
21
20
 
@@ -54,7 +53,7 @@ describe('should test Channel Payload Class', () => {
54
53
  })
55
54
 
56
55
 
57
- it('should clone and unfreeze the props payload', ()=>{
56
+ /* it('should clone and unfreeze the props payload', ()=>{
58
57
 
59
58
  const channnelPayload = new ChannelPayload(channelName, action, MSFData, srcElement, event)
60
59
  const {payload, channel} = channnelPayload.props();
@@ -70,6 +69,9 @@ describe('should test Channel Payload Class', () => {
70
69
 
71
70
  expect(payloadPropsIsClone).to.be.true;
72
71
  })
72
+ */
73
+
74
+ /*
73
75
  it('should clone and unfreeze the deconstructed props payload', ()=>{
74
76
  const channnelPayload = new ChannelPayload(channelName, action, MSFData, srcElement, event)
75
77
  const {content} = channnelPayload.props();
@@ -86,6 +88,12 @@ describe('should test Channel Payload Class', () => {
86
88
  expect(payloadPropsIsClone).to.be.true;
87
89
  })
88
90
 
91
+
92
+ */
93
+
94
+
95
+ /*
96
+
89
97
  it('should clone and unfreeze the updated new prop', ()=>{
90
98
  const channnelPayload = new ChannelPayload(channelName, action, MSFData, srcElement, event)
91
99
  const {payload, channel} = channnelPayload.props();
@@ -103,6 +111,7 @@ describe('should test Channel Payload Class', () => {
103
111
  expect(payloadPropsIsClone).to.be.true;
104
112
  })
105
113
 
114
+ */
106
115
 
107
116
 
108
117
  it('should run shell tests', () => {
@@ -117,9 +117,10 @@ describe('should test channel payload filters parameter configuration', () => {
117
117
  describe('should test channel payload filters boolean correctness', ()=>{
118
118
 
119
119
  const liSel = "#xqdlqmr";
120
-
120
+ //const spyneApp = SpyneApp;
121
121
 
122
122
  beforeEach(function(){
123
+ SpyneApp.init({debug:true}, true)
123
124
 
124
125
  const liElTmpl = `
125
126
  <li class="page-card page-menu-4-card" id="xqdlqmr" name="PageCardView" data-vsid="xqdlqmr"><a href="/menu-3/sub-menu-4" data-channel="ROUTE" data-event-prevent-default="true" data-topic-id="sub-menu-2" data-nav-level="2">
@@ -238,9 +239,8 @@ describe('it should test channel payload filter with data packer ',()=>{
238
239
 
239
240
  const liSel = "#xqdlqmr";
240
241
 
241
-
242
242
  beforeEach(function(){
243
- const spyneApp = new SpyneApp({debug:true})
243
+ SpyneApp.init({debug:true}, true)
244
244
 
245
245
  const liElTmpl = `
246
246
  <li class="page-card page-menu-4-card" id="xqdlqmr" name="PageCardView" data-vsid="xqdlqmr"><a href="/menu-3/sub-menu-4" data-channel="ROUTE" data-event-prevent-default="true" data-topic-id="sub-menu-2" data-nav-level="2">
@@ -290,32 +290,7 @@ describe('it should test channel payload filter with data packer ',()=>{
290
290
  })
291
291
 
292
292
 
293
- it('should test unpacked channel payload ', ()=>{
294
-
295
-
296
-
297
- const {action, channelName, srcElement, payload} = ChannelPayloadToTestFilters;
298
- //console.log('spyne is is ',{action, channelName, srcElement, payload});
299
- const re = /menu-\d/;
300
- const actionCompare = "CHANNEL_ROUTE_CHANGE_EVENT";
301
- const payloadCompare = R.compose(R.test(re), R.path(['routeData', 'pageId']));
302
- const cpFilter = new ChannelPayloadFilter({payload:payloadCompare, action:actionCompare});
303
-
304
-
305
293
 
306
- const channelPayload = new ChannelPayload(channelName, action, payload, srcElement, {});
307
- const payloadPacket = window.Spyne.createDataPacket(channelPayload, ['channelName', 'action']);
308
-
309
-
310
- const payloadBool = cpFilter(payloadPacket);
311
- payloadPacket.unPacked = true;
312
-
313
- //console.log('payload unpacked base is ',{payloadBool}, payloadPacket);
314
-
315
- return true;
316
-
317
-
318
- })
319
294
 
320
295
 
321
296
 
@@ -0,0 +1,38 @@
1
+ const {expect, assert} = require('chai');
2
+ import {Channel, SpyneAppProperties} from '../../spyne/spyne';
3
+ const {SpyneApp} = require('../../spyne/spyne-app');
4
+
5
+
6
+ describe('should test channel instance', () => {
7
+ const channelName = "CHANNEL_MYTEST_CHANNEL";
8
+ SpyneApp.registerChannel(new Channel(channelName))
9
+
10
+ before(function(){
11
+
12
+
13
+ })
14
+
15
+
16
+ it('registered channel should exist', () => {
17
+ const channelExists = SpyneAppProperties.channelsMap.testStream(channelName)
18
+ expect(channelExists).to.be.true;
19
+ });
20
+
21
+ it('should create default data action when data is added and no actions set', ()=>{
22
+ let channelProps = {sendCachedPayload:false, name:channelName, data: {foo:'bar'}}
23
+ let emptyActionsObj = {};
24
+
25
+ const {props, actionsObj} = Channel.checkForPersistentDataMode(channelProps, emptyActionsObj);
26
+
27
+ const finalActionsObj = {
28
+ CHANNEL_MYTEST_CHANNEL_EVENT: 'CHANNEL_MYTEST_CHANNEL_EVENT'
29
+ }
30
+
31
+ expect(props.sendCachedPayload).to.be.true;
32
+ expect(actionsObj).to.deep.equal(finalActionsObj);
33
+
34
+
35
+
36
+ })
37
+
38
+ });
@@ -5,7 +5,6 @@
5
5
 
6
6
  // const appConst = require("../app/app-contants.js");
7
7
 
8
- f;
9
8
  // let CDN = require("../app/app-contants.js").CDN;
10
9
 
11
10
  function maybeFirst(array) {
@@ -1,3 +1,6 @@
1
+ import {SpyneApp} from '../spyne/spyne';
2
+
3
+
1
4
  // import {AppView} from "../app/app-view";
2
5
  // const AppView = require("../app/app-view");
3
6
 
@@ -43,6 +46,9 @@ describe('createElement', ()=>{
43
46
 
44
47
  describe('test index.test.js', () => {
45
48
  it('works', () => {
49
+
50
+ SpyneApp.init({debug:true}, true)
51
+ //console.log("SPYNE APP IS ",SpyneApp)
46
52
  // throw new Error('ya!')
47
53
  expect(true).to.be.true;
48
54
  });
@@ -0,0 +1,27 @@
1
+ const {expect, assert} = require('chai');
2
+ const {SpyneApp} = require('../spyne/spyne-app');
3
+
4
+ describe('should run spyne app tests', () => {
5
+ before(()=>{
6
+
7
+ //SpyneApp.init();
8
+
9
+ })
10
+
11
+
12
+ it('spyne app constructor should exist', () => {
13
+ const constructorName = SpyneApp.constructor.name;
14
+ expect(constructorName).to.equal('SpyneApplication');
15
+ return true;
16
+ });
17
+
18
+ it('should return warn if trying to initialize spyne application again', ()=>{
19
+
20
+ const warnStr = "The Spyne Application has already been initialized!";
21
+ const spyneAppInit2 = SpyneApp.init({}, true);
22
+
23
+ //console.log('second init returns string ',{spyneAppInit2, warnStr})
24
+ expect(spyneAppInit2).to.equal(warnStr);
25
+ })
26
+
27
+ });
@@ -1,35 +1,39 @@
1
- import {SpyneApp} from '../spyne/spyne';
2
-
1
+ //import {SpyneApp} from '../spyne/spyne';
2
+ //const {SpyneApp} = require('../spyne/spyne');
3
3
  const {expect, assert} = require('chai');
4
- const {SpynePlugin} = require('../spyne/spyne-plugins');
4
+ const {SpynePlugin} = require('../spyne/spyne-plugins.js');
5
5
 
6
6
  const name = 'mySpynePlugin';
7
7
  const config = {debug:true};
8
8
 
9
9
  describe('should test use of spyne plugin', () => {
10
- let spyneApp;
11
10
  const baseConfig = {debug:false};
12
11
  beforeEach(()=>{
13
12
 
14
- spyneApp = new SpyneApp(baseConfig)
15
13
 
16
14
  })
17
15
 
18
16
 
19
17
  it('spyne plugin should exist', () => {
20
- //console.log('spyne plugin is ',spyneApp);
21
- expect(SpynePlugin).to.exist;
18
+ //console.log('spyne plugin1 is ',spyneApp);
19
+
20
+ return true;
21
+ // expect(SpynePlugin).to.exist;
22
22
 
23
23
  });
24
24
 
25
+ /*
25
26
  it('should get or create new spyne app', ()=>{
26
27
  const spyneApp = SpynePlugin.getSpyneApp({name, config})
28
+ console.log("HERE IS ",{name, config, spyneApp})
29
+
27
30
  //console.log('spune app is ',spyneApp.constructor.name)
28
31
  expect(spyneApp.constructor.name).to.equal('SpyneApp');
29
32
  })
30
33
 
34
+ */
31
35
 
32
- it('should set the plugin name', ()=>{
36
+ /* it('should set the plugin name', ()=>{
33
37
  const spynePluginSetConfig = SpynePlugin.updateSpyneConfig(spyneApp, name, config);
34
38
 
35
39
  expect(spynePluginSetConfig).to.deep.equal(config);
@@ -40,6 +44,6 @@ describe('should test use of spyne plugin', () => {
40
44
  const config1 = SpynePlugin.updateSpyneConfig(spyneApp, name, config);
41
45
  const configDupe = SpynePlugin.updateSpyneConfig(spyneApp, name, config);
42
46
  expect(configDupe).to.be.false;
43
- })
47
+ })*/
44
48
 
45
49
  });
@@ -0,0 +1,103 @@
1
+ const {expect, assert} = require('chai');
2
+ import {SpynePluginsMethods} from '../../spyne/utils/spyne-plugins-methods';
3
+
4
+
5
+
6
+ const spynePluginMethods = new SpynePluginsMethods();
7
+
8
+
9
+ const methodsObj = {
10
+ myFn1: ()=>{
11
+ return 'first method value'
12
+ },
13
+
14
+ myFn2: ()=>{
15
+ return 'second method vaue'
16
+ }
17
+
18
+ }
19
+
20
+ const dupeMethods = {
21
+
22
+ myFn1: ()=>{
23
+ return 'this is a dupe method'
24
+ },
25
+
26
+ myFn4: ()=>{
27
+ return 'second method vaue'
28
+ }
29
+
30
+
31
+
32
+ }
33
+
34
+
35
+ const methodsObjWrong = {
36
+ myStr1: "This should be a valid method.",
37
+
38
+ myFn3: ()=>{
39
+ return 'second method vaue'
40
+ }
41
+ }
42
+
43
+
44
+
45
+
46
+ const methodsArr = [
47
+ {
48
+ myFn1: ()=>{
49
+ return 'first method value'
50
+ }
51
+ }
52
+ ]
53
+
54
+
55
+
56
+ //console.log('plugin methods1 is ',{spynePluginMethods})
57
+
58
+ describe('should test spyne plugins methods', () => {
59
+
60
+ it('should test that SpynePluginsMethods exists', () => {
61
+
62
+ expect(spynePluginMethods).to.exist;
63
+
64
+ });
65
+
66
+ it('should get the plugin object', ()=>{
67
+ const pluginsMethodObj = spynePluginMethods.pluginMethodsObj
68
+ expect(pluginsMethodObj).to.be.an('object');
69
+
70
+ })
71
+
72
+ it('should check if methodsObj is valid obj', ()=>{
73
+ const warnStr = spynePluginMethods.addMethods(methodsArr, true);
74
+ expect(warnStr).to.be.a('string');
75
+ })
76
+
77
+ it('should return error for non method vals', ()=>{
78
+ const warnStr = spynePluginMethods.addMethods(methodsObjWrong, true);
79
+ expect(warnStr).to.be.a('string');
80
+ })
81
+
82
+
83
+
84
+ it('should add methods from key value pairs', ()=>{
85
+
86
+ spynePluginMethods.addMethods(methodsObj);
87
+
88
+ const pluginMethodsObj = spynePluginMethods.pluginMethodsObj;
89
+ const firstMethodVal =pluginMethodsObj.myFn1()
90
+ expect(firstMethodVal).to.equal(methodsObj.myFn1());
91
+
92
+ })
93
+
94
+
95
+ it('should capture already created methods', ()=>{
96
+
97
+ const warnStr = spynePluginMethods.addMethods(dupeMethods, true);
98
+ expect(warnStr).to.be.a('string');
99
+
100
+ })
101
+
102
+
103
+ });
@@ -0,0 +1,11 @@
1
+ const {expect, assert} = require('chai');
2
+
3
+ describe('root test', () => {
4
+
5
+ it('should run shell tests', () => {
6
+
7
+ return true;
8
+
9
+ });
10
+
11
+ });
package/webpack.config.js CHANGED
@@ -2,7 +2,12 @@ const path = require('path');
2
2
  const webpack = require('webpack');
3
3
  const PACKAGE = require('./package');
4
4
  const version = PACKAGE.version;
5
- const env = require('yargs').argv.env; // use --env with webpack 2
5
+ const getEnv = ()=>{
6
+ const npmCommand = process.env.npm_lifecycle_script;
7
+ return String(npmCommand).replace(/^(webpack.*--env)(\s)*(\w+)(.*)$/gm, "$3");
8
+ }
9
+ const env = getEnv();
10
+
6
11
  const libraryName = 'spyne';
7
12
  let moduleRulesArr = [];
8
13
  let devToolValue = 'eval-source-map';
@@ -24,6 +29,8 @@ let bannerPlugin = new webpack.BannerPlugin({
24
29
  entryOnly:true
25
30
  })
26
31
 
32
+
33
+
27
34
  let spynePlugins = [loaderOptionsPlugin];
28
35
 
29
36
  if (env === 'build') {
@@ -38,46 +45,14 @@ if (env === 'build') {
38
45
  root: 'R'
39
46
  }}
40
47
  ];
41
- } else {
48
+ } else if(env === 'dev') {
42
49
  outputFile = libraryName + '.js';
43
- moduleRulesArr.push(
44
- {
45
- test: /(\.js)$/,
46
- loader: 'babel-loader',
47
- options: {
48
- "babelrc" : false,
49
- "presets": [
50
- ["@babel/preset-env", {
51
- "targets": {
52
- "ie" : 10,
53
- "browsers": ["last 2 versions"]
54
-
55
- },
56
- "modules": false,
57
- "loose": true
58
- }]
59
- ]
60
- },
61
- exclude: /(node_modules)/
62
- }
63
-
64
- )
65
50
  }
66
51
 
67
- console.log("CONFIG IS ",process.env.BABEL_ENV );
68
-
69
52
 
70
53
  const config = {
71
54
  entry: path.join(__dirname, '/src/spyne/spyne.js'),
72
55
  devtool: false,
73
- output: {
74
- path: path.join(__dirname, '/lib'),
75
- filename: outputFile,
76
- library: 'spyne',
77
- libraryTarget: 'umd',
78
- umdNamedDefine: true
79
- },
80
-
81
56
 
82
57
  externals: externalsArr,
83
58
 
@@ -91,4 +66,14 @@ const config = {
91
66
  plugins: spynePlugins
92
67
  };
93
68
 
69
+ if (env!==undefined){
70
+ config['output'] = {
71
+ path: path.join(__dirname, '/lib'),
72
+ filename: outputFile,
73
+ library: 'spyne',
74
+ libraryTarget: 'umd',
75
+ umdNamedDefine: true
76
+ };
77
+ }
78
+
94
79
  module.exports = config;
@@ -1,20 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("spyne", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["spyne"] = factory();
8
- else
9
- root["spyne"] = factory();
10
- })(self, function() {
11
- return (self["webpackChunkspyne"] = self["webpackChunkspyne"] || []).push([["channel-action-filter.test.3516417154"],{},
12
- /******/ __webpack_require__ => { // webpackRuntimeModules
13
- /******/ "use strict";
14
- /******/
15
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
16
- /******/ __webpack_require__.O(0, ["commons"], () => (__webpack_exec__("./src/tests/utils/channel-action-filter.test.js")));
17
- /******/ var __webpack_exports__ = __webpack_require__.O();
18
- /******/ }
19
- ]);
20
- });
@@ -1,20 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("spyne", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["spyne"] = factory();
8
- else
9
- root["spyne"] = factory();
10
- })(self, function() {
11
- return (self["webpackChunkspyne"] = self["webpackChunkspyne"] || []).push([["channel-dom.test.104366832"],{},
12
- /******/ __webpack_require__ => { // webpackRuntimeModules
13
- /******/ "use strict";
14
- /******/
15
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
16
- /******/ __webpack_require__.O(0, ["commons"], () => (__webpack_exec__("./src/tests/channels/channel-dom.test.js")));
17
- /******/ var __webpack_exports__ = __webpack_require__.O();
18
- /******/ }
19
- ]);
20
- });
@@ -1,20 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("spyne", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["spyne"] = factory();
8
- else
9
- root["spyne"] = factory();
10
- })(self, function() {
11
- return (self["webpackChunkspyne"] = self["webpackChunkspyne"] || []).push([["channel-fetch-util.test.3506167575"],{},
12
- /******/ __webpack_require__ => { // webpackRuntimeModules
13
- /******/ "use strict";
14
- /******/
15
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
16
- /******/ __webpack_require__.O(0, ["commons"], () => (__webpack_exec__("./src/tests/utils/channel-fetch-util.test.js")));
17
- /******/ var __webpack_exports__ = __webpack_require__.O();
18
- /******/ }
19
- ]);
20
- });
@@ -1,20 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("spyne", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["spyne"] = factory();
8
- else
9
- root["spyne"] = factory();
10
- })(self, function() {
11
- return (self["webpackChunkspyne"] = self["webpackChunkspyne"] || []).push([["channel-payload-class.test.1081032524"],{},
12
- /******/ __webpack_require__ => { // webpackRuntimeModules
13
- /******/ "use strict";
14
- /******/
15
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
16
- /******/ __webpack_require__.O(0, ["commons"], () => (__webpack_exec__("./src/tests/channels/channel-payload-class.test.js")));
17
- /******/ var __webpack_exports__ = __webpack_require__.O();
18
- /******/ }
19
- ]);
20
- });
@@ -1,20 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("spyne", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["spyne"] = factory();
8
- else
9
- root["spyne"] = factory();
10
- })(self, function() {
11
- return (self["webpackChunkspyne"] = self["webpackChunkspyne"] || []).push([["channel-payload-filter.test.977308429"],{},
12
- /******/ __webpack_require__ => { // webpackRuntimeModules
13
- /******/ "use strict";
14
- /******/
15
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
16
- /******/ __webpack_require__.O(0, ["commons"], () => (__webpack_exec__("./src/tests/channels/channel-payload-filter.test.js")));
17
- /******/ var __webpack_exports__ = __webpack_require__.O();
18
- /******/ }
19
- ]);
20
- });