@finqu/cool 1.1.3 → 1.1.5

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.
package/.babelrc.js ADDED
@@ -0,0 +1,20 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ '@babel/env',
5
+ {
6
+ loose: true,
7
+ modules: false,
8
+ exclude: ['transform-typeof-symbol']
9
+ }
10
+ ]
11
+ ],
12
+ plugins: [
13
+ '@babel/plugin-proposal-object-rest-spread'
14
+ ],
15
+ env: {
16
+ test: {
17
+ plugins: [ 'istanbul' ]
18
+ }
19
+ }
20
+ };
@@ -0,0 +1,13 @@
1
+ # https://github.com/browserslist/browserslist#readme
2
+
3
+ >= 1%
4
+ last 1 major version
5
+ not dead
6
+ Chrome >= 60
7
+ Firefox >= 60
8
+ Edge >= 15.15063
9
+ Explorer 11
10
+ iOS >= 10
11
+ Safari >= 10
12
+ Android >= 6
13
+ not ExplorerMobile <= 11
@@ -9,54 +9,24 @@ const BUNDLE = process.env.BUNDLE === 'true'
9
9
  const ESM = process.env.ESM === 'true'
10
10
 
11
11
  let fileDest = `cool${ESM ? '.esm' : ''}`
12
- const external = []
12
+
13
13
  const plugins = [
14
- babel(ESM ?
15
- {
16
- // Only transpile our source code
17
- exclude: 'node_modules/**',
18
- babelrc: false,
19
- presets: [
20
- [
21
- '@babel/env',
22
- {
23
- loose: true,
24
- modules: false,
25
- targets: {
26
- browsers: [
27
- 'Chrome >= 60',
28
- 'Safari >= 10.1',
29
- 'iOS >= 10.3',
30
- 'Firefox >= 54',
31
- 'Edge >= 15'
32
- ]
33
- }
34
- }
35
- ]
36
- ]
37
- } :
38
- {
39
- // Only transpile our source code
40
- exclude: 'node_modules/**',
41
- // Include only required helpers
42
- externalHelpersWhitelist: [
43
- 'defineProperties',
44
- 'createClass',
45
- 'inheritsLoose',
46
- 'defineProperty',
47
- 'objectSpread'
48
- ]
49
- })
14
+ babel({
15
+ // Only transpile our source code
16
+ exclude: 'node_modules/**',
17
+ // Include only required helpers
18
+ externalHelpersWhitelist: [
19
+ 'defineProperties',
20
+ 'createClass',
21
+ 'inheritsLoose',
22
+ 'defineProperty',
23
+ 'objectSpread'
24
+ ]
25
+ })
50
26
  ]
51
- const globals = {
52
- }
53
27
 
54
28
  if (BUNDLE) {
55
29
  fileDest += '.bundle'
56
- // Remove last entry in external array to bundle Popper
57
- external.pop()
58
- // delete globals['popper.js']
59
- plugins.push(resolve())
60
30
  }
61
31
 
62
32
  const rollupConfig = {
@@ -64,10 +34,8 @@ const rollupConfig = {
64
34
  output: {
65
35
  banner,
66
36
  file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
67
- format: ESM ? 'esm' : 'umd',
68
- globals
37
+ format: ESM ? 'esm' : 'umd'
69
38
  },
70
- external,
71
39
  plugins
72
40
  }
73
41