-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecl-builder.config.js
69 lines (64 loc) · 5.83 KB
/
ecl-builder.config.js
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const path = require('path');
const pkg = require('./package.json');
const isProd = process.env.NODE_ENV === 'production';
const outputFolder = __dirname;
const nodeModules = __dirname + '/node_modules';
// SCSS includePaths
const includePaths = [nodeModules];
const style_options = {
includePaths,
sourceMap: isProd ? 'none' : true,
};
module.exports = {
styles: [
{
entry: path.resolve(__dirname, 'sass/style-ec.scss'),
dest: path.resolve(outputFolder, 'css/style-ec.css'),
options: style_options,
},
{
entry: path.resolve(__dirname, 'sass/style-eu.scss'),
dest: path.resolve(outputFolder, 'css/style-eu.css'),
options: style_options,
},
],
copy: [
{ from: path.resolve(nodeModules, '@ecl/ec-preset-editor/dist'), to: path.resolve(outputFolder, 'dist') },
{ from: path.resolve(nodeModules, '@ecl/ec-preset-legacy-website/dist'), to: path.resolve(outputFolder, 'dist/ec') },
{ from: path.resolve(nodeModules, '@ecl/eu-preset-legacy-website/dist'), to: path.resolve(outputFolder, 'dist/eu') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-accordion2/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-blockquote/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-breadcrumb/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-button/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-card/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-description-list/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-dropdown-legacy/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-expandable/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-fact-figures/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-file/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-footer/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-gallery/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-hero-banner/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-icon/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-inpage-navigation/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-language-list/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-link/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-media-container/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-menu-legacy/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-message/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-page-banner/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-page-header/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-pagination/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-radio/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-search-form/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-site-header/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-skip-link/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-social-media-follow/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-social-media-share/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-table/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-tag/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-text-input/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, '@ecl-twig'), patterns: 'ec-component-timeline/*.twig', to: path.resolve(outputFolder, 'components') },
{ from: path.resolve(nodeModules, 'svg4everybody/dist'), patterns: 'svg4everybody.min.js', to: path.resolve(outputFolder, 'dist/js') },
]
};