-
Notifications
You must be signed in to change notification settings - Fork 8k
/
copy_source_task.ts
46 lines (43 loc) · 1.6 KB
/
copy_source_task.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { copyAll, Task } from '../lib';
export const CopySource: Task = {
description: 'Copying source into platform-generic build directory',
async run(config, log, build) {
await copyAll(config.resolveFromRepo(), build.resolvePath(), {
dot: false,
select: [
'yarn.lock',
'.npmrc',
'src/**',
'!src/**/*.{test,test.mocks,mock}.{js,ts,tsx}',
'!src/**/mocks.ts', // special file who imports .mock files
'!src/**/{target,__tests__,__snapshots__,__mocks__,integration_tests}/**',
'!src/core/server/core_app/assets/favicons/favicon.distribution.png',
'!src/core/server/core_app/assets/favicons/favicon.distribution.svg',
'!src/test_utils/**',
'!src/fixtures/**',
'!src/cli/repl/**',
'!src/cli/dev.js',
'!src/functional_test_runner/**',
'!src/dev/**',
'!**/jest.config.js',
'!src/plugins/telemetry/schema/**', // Skip telemetry schemas
// this is the dev-only entry
'!src/setup_node_env/index.js',
'!**/public/**/*.{js,ts,tsx,json,scss}',
'typings/**',
'config/kibana.yml',
'config/node.options',
'tsconfig*.json',
'.i18nrc.json',
'kibana.d.ts',
],
});
},
};