Skip to content

Commit bdbbe73

Browse files
committed
autoformat existing config
1 parent bb6f865 commit bdbbe73

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

packages/browser/rollup.config.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import license from 'rollup-plugin-license';
44
import resolve from '@rollup/plugin-node-resolve';
55
import replace from '@rollup/plugin-replace';
66

7-
const commitHash = require('child_process')
8-
.execSync('git rev-parse --short HEAD', { encoding: 'utf-8' })
9-
.trim();
7+
const commitHash = require('child_process').execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
108

119
const terserInstance = terser({
1210
compress: {
@@ -109,10 +107,7 @@ export default [
109107
file: 'build/bundle.min.js',
110108
},
111109
// Uglify has to be at the end of compilation, BUT before the license banner
112-
plugins: bundleConfig.plugins
113-
.slice(0, -1)
114-
.concat(terserInstance)
115-
.concat(bundleConfig.plugins.slice(-1)),
110+
plugins: bundleConfig.plugins.slice(0, -1).concat(terserInstance).concat(bundleConfig.plugins.slice(-1)),
116111
},
117112
// ------------------
118113
// ES6 Browser Bundle
@@ -159,11 +154,7 @@ export default [
159154
},
160155
include: ['*.ts+(|x)', '**/*.ts+(|x)', '../**/*.ts+(|x)'],
161156
}),
162-
...plugins
163-
.slice(1)
164-
.slice(0, -1)
165-
.concat(terserInstance)
166-
.concat(bundleConfig.plugins.slice(-1)),
157+
...plugins.slice(1).slice(0, -1).concat(terserInstance).concat(bundleConfig.plugins.slice(-1)),
167158
],
168159
},
169160
// ------------------

packages/tracing/rollup.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import license from 'rollup-plugin-license';
44
import resolve from '@rollup/plugin-node-resolve';
55
import replace from '@rollup/plugin-replace';
66

7-
const commitHash = require('child_process')
8-
.execSync('git rev-parse --short HEAD', { encoding: 'utf-8' })
9-
.trim();
7+
const commitHash = require('child_process').execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
108

119
const terserInstance = terser({
1210
mangle: {
@@ -100,9 +98,6 @@ export default [
10098
file: 'build/bundle.tracing.min.js',
10199
},
102100
// Uglify has to be at the end of compilation, BUT before the license banner
103-
plugins: bundleConfig.plugins
104-
.slice(0, -1)
105-
.concat(terserInstance)
106-
.concat(bundleConfig.plugins.slice(-1)),
101+
plugins: bundleConfig.plugins.slice(0, -1).concat(terserInstance).concat(bundleConfig.plugins.slice(-1)),
107102
},
108103
];

packages/vue/rollup.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import license from 'rollup-plugin-license';
44
import resolve from '@rollup/plugin-node-resolve';
55
import replace from '@rollup/plugin-replace';
66

7-
const commitHash = require('child_process')
8-
.execSync('git rev-parse --short HEAD', { encoding: 'utf-8' })
9-
.trim();
7+
const commitHash = require('child_process').execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
108

119
const terserInstance = terser({
1210
mangle: {
@@ -100,9 +98,6 @@ export default [
10098
file: 'build/bundle.vue.min.js',
10199
},
102100
// Uglify has to be at the end of compilation, BUT before the license banner
103-
plugins: bundleConfig.plugins
104-
.slice(0, -1)
105-
.concat(terserInstance)
106-
.concat(bundleConfig.plugins.slice(-1)),
101+
plugins: bundleConfig.plugins.slice(0, -1).concat(terserInstance).concat(bundleConfig.plugins.slice(-1)),
107102
},
108103
];

0 commit comments

Comments
 (0)