|
1 |
| -import * as fs from 'fs'; |
2 |
| - |
3 | 1 | import commonjs from '@rollup/plugin-commonjs';
|
4 | 2 |
|
5 | 3 | import { insertAt, makeBaseBundleConfig, makeConfigVariants } from '../../rollup.config';
|
6 | 4 |
|
7 | 5 | const builds = [];
|
8 | 6 |
|
9 |
| -const integrationSourceFiles = fs.readdirSync('./src').filter(file => file != 'index.ts'); |
| 7 | +const file = process.env.INTEGRATION_FILE; |
10 | 8 |
|
11 |
| -integrationSourceFiles.forEach(file => { |
12 |
| - const baseBundleConfig = makeBaseBundleConfig({ |
13 |
| - input: `src/${file}`, |
14 |
| - isAddOn: true, |
15 |
| - jsVersion: 'es5', |
16 |
| - licenseTitle: '@sentry/integrations', |
17 |
| - // TODO this doesn't currently need to be a template string, but soon will need to be, so leaving it in that form |
18 |
| - // for now |
19 |
| - outputFileBase: `${file.replace('.ts', '')}`, |
20 |
| - }); |
| 9 | +const baseBundleConfig = makeBaseBundleConfig({ |
| 10 | + input: `src/${file}`, |
| 11 | + isAddOn: true, |
| 12 | + jsVersion: 'es5', |
| 13 | + licenseTitle: '@sentry/integrations', |
| 14 | + // TODO this doesn't currently need to be a template string, but soon will need to be, so leaving it in that form |
| 15 | + // for now |
| 16 | + outputFileBase: `${file.replace('.ts', '')}`, |
| 17 | +}); |
21 | 18 |
|
22 |
| - // TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out. |
23 |
| - baseBundleConfig.plugins = insertAt(baseBundleConfig.plugins, -2, commonjs()); |
| 19 | +// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out. |
| 20 | +baseBundleConfig.plugins = insertAt(baseBundleConfig.plugins, -2, commonjs()); |
24 | 21 |
|
25 |
| - builds.push(...makeConfigVariants(baseBundleConfig)); |
26 |
| -}); |
| 22 | +builds.push(...makeConfigVariants(baseBundleConfig)); |
27 | 23 |
|
28 | 24 | export default builds;
|
0 commit comments