This repository was archived by the owner on Nov 4, 2020. It is now read-only.
File tree 3 files changed +21
-18
lines changed
3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 1
1
import should from './es6/should' ;
2
+ import root from 'root' ;
2
3
3
4
var defaultProto = Object . prototype ;
4
5
var defaultProperty = 'should' ;
10
11
} catch ( e ) {
11
12
//ignore errors
12
13
}
14
+
15
+ if ( typeof define === 'function' && define . amd ) {
16
+ define ( [ ] , function ( ) { return should } ) ;
17
+ } else if ( typeof module === 'object' && module . exports ) {
18
+ module . exports = should ;
19
+ } else {
20
+ root . Should = should ;
21
+
22
+ Object . defineProperty ( root , 'should' , {
23
+ enumerable : false ,
24
+ configurable : true ,
25
+ value : should
26
+ } ) ;
27
+ }
Original file line number Diff line number Diff line change 23
23
"eslint" : " ^2.4.0" ,
24
24
"mocha" : " latest" ,
25
25
"mocha-better-spec-reporter" : " latest" ,
26
- "rollup" : " ^0.26.3 " ,
26
+ "rollup" : " ^0.29.0 " ,
27
27
"rollup-plugin-node-resolve" : " ^1.5.0" ,
28
28
"zuul" : " latest"
29
29
},
Original file line number Diff line number Diff line change @@ -14,31 +14,19 @@ const banner = `/*!
14
14
*/
15
15
` ;
16
16
17
- const outro = `
18
- if (typeof define === 'function' && define.amd) {
19
- define([], function() { return should });
20
- } else if (typeof module === 'object' && module.exports) {
21
- module.exports = should;
22
- } else {
23
- this.Should = should;
24
-
25
- Object.defineProperty(this, 'should', {
26
- enumerable: false,
27
- configurable: true,
28
- value: should
29
- });
30
- }` ;
31
-
32
17
module . exports = {
33
18
entry : 'browser-entry.js' ,
34
19
banner,
35
- outro,
36
20
format : 'iife' ,
37
21
plugins : [
38
22
nodeResolve ( {
39
23
jsnext : true ,
40
24
main : true ,
41
25
preferBuiltins : false
42
26
} )
43
- ]
27
+ ] ,
28
+ external : [ 'root' ] ,
29
+ globals : {
30
+ root : 'this'
31
+ }
44
32
} ;
You can’t perform that action at this time.
0 commit comments