cronus-theme 2.0.89 → 2.0.90
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/Gulpfile.js +4 -3
- package/README.md +1 -12
- package/default/b2b.yaml +2 -1
- package/default/b2c.yaml +2 -1
- package/default/catalog.yaml +2 -1
- package/default/login.yaml +2 -1
- package/default/templates/emails/basicmail/basicmail.mustache +2 -2
- package/default/templates/emails/basicmail/basicmailFooter.mustache +1 -1
- package/default/templates/emails/basicmail/basicmailHeader.mustache +1 -1
- package/default/templates/emails/footerText.mustache +12 -12
- package/default/templates/emails/ordermail/orderLines.mustache +5 -5
- package/default/templates/emails/ordermail/ordermail.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailDcOrder.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailDetails.mustache +17 -17
- package/default/templates/emails/ordermail/ordermailFooter.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailHeader.mustache +5 -5
- package/default/templates/emails/ordermail/ordermailIntro.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailIntroText.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailItem.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailItemHeadline.mustache +1 -1
- package/default/templates/emails/ordermail/ordermailItemList.mustache +1 -1
- package/default/templates/shop/item_statistics_account.mustache +1 -1
- package/default/website.yaml +2 -1
- package/package.json +1 -1
- package/child/404_de.html +0 -32
- package/child/404_en.html +0 -32
- package/child/Gulpfile.js +0 -463
- package/child/build/doc/doc.css +0 -21873
- package/child/build/favicons/android-chrome-192x192.png +0 -0
- package/child/build/favicons/android-chrome-512x512.png +0 -0
- package/child/build/favicons/apple-touch-icon.png +0 -0
- package/child/build/favicons/browserconfig.xml +0 -9
- package/child/build/favicons/favicon-16x16.png +0 -0
- package/child/build/favicons/favicon-32x32.png +0 -0
- package/child/build/favicons/favicon.ico +0 -0
- package/child/build/favicons/faviconData.json +0 -1
- package/child/build/favicons/mstile-144x144.png +0 -0
- package/child/build/favicons/mstile-150x150.png +0 -0
- package/child/build/favicons/mstile-310x150.png +0 -0
- package/child/build/favicons/mstile-310x310.png +0 -0
- package/child/build/favicons/mstile-70x70.png +0 -0
- package/child/build/favicons/safari-pinned-tab.svg +0 -36
- package/child/build/favicons/site.webmanifest +0 -19
- package/child/child.yaml +0 -137
- package/child/ck_styles.js +0 -90
- package/child/config.json +0 -37
- package/child/dist/css/addons/errorPages.css +0 -1
- package/child/dist/css/addons/fck.css +0 -1
- package/child/dist/css/addons/kss.css +0 -1
- package/child/dist/css/child.css +0 -1
- package/child/dist/css/child1734010270.css +0 -1
- package/child/dist/css/doc.css +0 -1
- package/child/dist/css/doc1734010270.css +0 -1
- package/child/dist/favicons/android-chrome-192x192.png +0 -0
- package/child/dist/favicons/android-chrome-512x512.png +0 -0
- package/child/dist/favicons/apple-touch-icon.png +0 -0
- package/child/dist/favicons/browserconfig.xml +0 -9
- package/child/dist/favicons/favicon-16x16.png +0 -0
- package/child/dist/favicons/favicon-32x32.png +0 -0
- package/child/dist/favicons/favicon.ico +0 -0
- package/child/dist/favicons/faviconData.json +0 -1
- package/child/dist/favicons/mstile-144x144.png +0 -0
- package/child/dist/favicons/mstile-150x150.png +0 -0
- package/child/dist/favicons/mstile-310x150.png +0 -0
- package/child/dist/favicons/mstile-310x310.png +0 -0
- package/child/dist/favicons/mstile-70x70.png +0 -0
- package/child/dist/favicons/safari-pinned-tab.svg +0 -36
- package/child/dist/favicons/site.webmanifest +0 -19
- package/child/dist/fonts/barlow-600.woff +0 -0
- package/child/dist/fonts/barlow-600.woff2 +0 -0
- package/child/dist/fonts/barlow-700.woff +0 -0
- package/child/dist/fonts/barlow-700.woff2 +0 -0
- package/child/dist/fonts/barlow-regular.woff +0 -0
- package/child/dist/fonts/barlow-regular.woff2 +0 -0
- package/child/dist/fonts/icons1689843011.woff +0 -0
- package/child/dist/fonts/icons1689843011.woff2 +0 -0
- package/child/dist/fonts/icons1689843343.woff +0 -0
- package/child/dist/fonts/icons1689843343.woff2 +0 -0
- package/child/dist/fonts/icons1734010270.woff +0 -0
- package/child/dist/fonts/icons1734010270.woff2 +0 -0
- package/child/dist/js/child.js +0 -2
- package/child/dist/js/child.js.map +0 -7
- package/child/dist/js/child1734010270.js +0 -2
- package/child/dist/snippets/css/child.html +0 -1
- package/child/dist/snippets/css/doc.html +0 -1
- package/child/dist/snippets/faviconmarkup.html +0 -9
- package/child/dist/snippets/iconfont.html +0 -1
- package/child/dist/snippets/js/child.html +0 -1
- package/child/frontend.php +0 -266
- package/child/homepage.md +0 -1
- package/child/kss-config.json +0 -17
- package/child/package.json +0 -65
- package/child/sample.jpg +0 -0
- package/child/src/favicon/favicon.svg +0 -1
- package/child/src/fonts/barlow-600.woff +0 -0
- package/child/src/fonts/barlow-600.woff2 +0 -0
- package/child/src/fonts/barlow-700.woff +0 -0
- package/child/src/fonts/barlow-700.woff2 +0 -0
- package/child/src/fonts/barlow-regular.woff +0 -0
- package/child/src/fonts/barlow-regular.woff2 +0 -0
- package/child/src/fonts/icons1689843011.woff +0 -0
- package/child/src/fonts/icons1689843011.woff2 +0 -0
- package/child/src/fonts/icons1689843343.woff +0 -0
- package/child/src/fonts/icons1689843343.woff2 +0 -0
- package/child/src/icons/icons1734010270.woff +0 -0
- package/child/src/icons/icons1734010270.woff2 +0 -0
- package/child/src/js/child.js +0 -0
- package/child/src/scss/_print.scss +0 -5
- package/child/src/scss/addons/errorPages.scss +0 -109
- package/child/src/scss/addons/fck.scss +0 -6
- package/child/src/scss/addons/kss.scss +0 -108
- package/child/src/scss/base/_fonts.scss +0 -27
- package/child/src/scss/base/_icons.scss +0 -968
- package/child/src/scss/base/_variables.scss +0 -0
- package/child/src/scss/child.scss +0 -11
- package/child/src/scss/doc.scss +0 -2
- package/child/src/scss/mixins/_breakpoints.scss +0 -127
- package/child/src/scss/mixins/_functions.scss +0 -273
- package/child/src/scss/mixins/_grid.scss +0 -85
- package/child/src/scss/mixins/_mixins.scss +0 -3
- package/child/src/scss/template/_icons.scss +0 -33
- package/child/src/snippets/faviconmarkup.html +0 -0
- package/child/src/snippets/includeCSS.html +0 -1
- package/child/src/snippets/includeFont.html +0 -1
- package/child/src/snippets/includeJS.html +0 -1
- package/child/styleguide/index.html +0 -119
- package/child/styleguide/item-base-button-link.html +0 -191
- package/child/styleguide/item-base-buttons.html +0 -244
- package/child/styleguide/item-base-fake-tables.html +0 -221
- package/child/styleguide/item-base-icons.html +0 -290
- package/child/styleguide/item-base-lists.html +0 -216
- package/child/styleguide/item-base-tables.html +0 -221
- package/child/styleguide/item-base-tags-group.html +0 -209
- package/child/styleguide/item-base-tags.html +0 -224
- package/child/styleguide/item-base.html +0 -171
- package/child/styleguide/item-colors-background.html +0 -305
- package/child/styleguide/item-colors-border.html +0 -263
- package/child/styleguide/item-colors-font.html +0 -304
- package/child/styleguide/item-colors.html +0 -159
- package/child/styleguide/item-components-action-icon.html +0 -244
- package/child/styleguide/item-components-actionbox.html +0 -195
- package/child/styleguide/item-components-alerts.html +0 -244
- package/child/styleguide/item-components-breadcrumb.html +0 -209
- package/child/styleguide/item-components-custom-select.html +0 -588
- package/child/styleguide/item-components-filegallery.html +0 -223
- package/child/styleguide/item-components-iconbar.html +0 -378
- package/child/styleguide/item-components-iconbox.html +0 -197
- package/child/styleguide/item-components-iconlist.html +0 -205
- package/child/styleguide/item-components-modals.html +0 -319
- package/child/styleguide/item-components-pagination.html +0 -215
- package/child/styleguide/item-components-processbar.html +0 -225
- package/child/styleguide/item-components-radio-list.html +0 -297
- package/child/styleguide/item-components-rating.html +0 -213
- package/child/styleguide/item-components-scrollbar.html +0 -327
- package/child/styleguide/item-components-searchbar.html +0 -204
- package/child/styleguide/item-components-share-links.html +0 -209
- package/child/styleguide/item-components-tags-group.html +0 -209
- package/child/styleguide/item-components-tags.html +0 -254
- package/child/styleguide/item-components-trust-infobar.html +0 -205
- package/child/styleguide/item-components-trustbar.html +0 -213
- package/child/styleguide/item-components-trustlist.html +0 -211
- package/child/styleguide/item-components.html +0 -261
- package/child/styleguide/item-form-checkboxes-switch.html +0 -195
- package/child/styleguide/item-form-checkboxes.html +0 -195
- package/child/styleguide/item-form-file-input.html +0 -252
- package/child/styleguide/item-form-infield-input-groups.html +0 -215
- package/child/styleguide/item-form-input-groups-addons.html +0 -286
- package/child/styleguide/item-form-input-groups.html +0 -210
- package/child/styleguide/item-form-inputs.html +0 -398
- package/child/styleguide/item-form-label-left-input-groups.html +0 -201
- package/child/styleguide/item-form-radioboxes-switch.html +0 -211
- package/child/styleguide/item-form.html +0 -189
- package/child/styleguide/item-navigations-mainnav.html +0 -239
- package/child/styleguide/item-navigations-nav.html +0 -215
- package/child/styleguide/item-navigations-navgroup.html +0 -538
- package/child/styleguide/item-navigations-subnav.html +0 -295
- package/child/styleguide/item-navigations-toggle-navigation.html +0 -216
- package/child/styleguide/item-navigations.html +0 -171
- package/child/styleguide/item-shop-accountbox.html +0 -318
- package/child/styleguide/item-shop-amount-lines.html +0 -243
- package/child/styleguide/item-shop-attributes-icons.html +0 -205
- package/child/styleguide/item-shop-categorybox.html +0 -227
- package/child/styleguide/item-shop-categorylist-itempreview.html +0 -247
- package/child/styleguide/item-shop-categorylist.html +0 -257
- package/child/styleguide/item-shop-checkout-buttons.html +0 -205
- package/child/styleguide/item-shop-filter.html +0 -707
- package/child/styleguide/item-shop-history-list-item.html +0 -213
- package/child/styleguide/item-shop-inventory.html +0 -300
- package/child/styleguide/item-shop-list-type-switch.html +0 -207
- package/child/styleguide/item-shop-order-history-list.html +0 -254
- package/child/styleguide/item-shop-orderboxsummary.html +0 -267
- package/child/styleguide/item-shop-orderbutton.html +0 -297
- package/child/styleguide/item-shop-orderitemlist.html +0 -263
- package/child/styleguide/item-shop-prices-list-graduated.html +0 -247
- package/child/styleguide/item-shop-prices-list.html +0 -217
- package/child/styleguide/item-shop-prices.html +0 -199
- package/child/styleguide/item-shop-promotions.html +0 -201
- package/child/styleguide/item-shop-quantity-spinner.html +0 -366
- package/child/styleguide/item-shop-sorting.html +0 -271
- package/child/styleguide/item-shop-state.html +0 -279
- package/child/styleguide/item-shop-variantselection.html +0 -199
- package/child/styleguide/item-shop.html +0 -243
- package/child/styleguide/item-siteparts-filegallery.html +0 -223
- package/child/styleguide/item-siteparts-scrollbar.html +0 -294
- package/child/styleguide/item-siteparts-slidecontent.html +0 -217
- package/child/styleguide/item-siteparts.html +0 -159
- package/child/styleguide/item-structure-containers.html +0 -234
- package/child/styleguide/item-structure-grid.html +0 -373
- package/child/styleguide/item-structure-margins.html +0 -307
- package/child/styleguide/item-structure-paddings.html +0 -307
- package/child/styleguide/item-structure.html +0 -165
- package/child/styleguide/item-typo-alignment-transform.html +0 -274
- package/child/styleguide/item-typo-headlines.html +0 -225
- package/child/styleguide/item-typo-link-with-icon.html +0 -254
- package/child/styleguide/item-typo-links.html +0 -224
- package/child/styleguide/item-typo-text.html +0 -214
- package/child/styleguide/item-typo.html +0 -165
- package/child/styleguide/kss-assets/WARNING.txt +0 -2
- package/child/styleguide/kss-assets/github-fork--black.png +0 -0
- package/child/styleguide/kss-assets/kss-fullscreen.js +0 -60
- package/child/styleguide/kss-assets/kss-guides.js +0 -27
- package/child/styleguide/kss-assets/kss-markup.js +0 -42
- package/child/styleguide/kss-assets/kss.css +0 -1
- package/child/styleguide/kss-assets/kss.js +0 -53
- package/child/styleguide/kss-assets/kss.scss +0 -746
- package/child/styleguide/kss-assets/noise-low.png +0 -0
- package/child/styleguide/kss-assets/sample-inline.png +0 -0
- package/child/styleguide/kss-assets/sample-inline.svg +0 -3
- package/child/styleguide/kss-assets/sample.png +0 -0
- package/child/styleguide/kss-assets/sample.svg +0 -3
- package/child/styleguide/kss-assets/scrollspy.js +0 -147
- package/child/styleguide/section-base.html +0 -784
- package/child/styleguide/section-colors.html +0 -743
- package/child/styleguide/section-components.html +0 -3375
- package/child/styleguide/section-form.html +0 -1383
- package/child/styleguide/section-navigations.html +0 -1194
- package/child/styleguide/section-shop.html +0 -3333
- package/child/styleguide/section-siteparts.html +0 -605
- package/child/styleguide/section-structure.html +0 -1002
- package/child/styleguide/section-typo.html +0 -698
package/child/Gulpfile.js
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
const yargs = require('yargs');
|
|
2
|
-
const shopconfig = require('./config.json');
|
|
3
|
-
let type = shopconfig.type;
|
|
4
|
-
|
|
5
|
-
const argv = yargs
|
|
6
|
-
.option('print-config', {
|
|
7
|
-
alias: 'p',
|
|
8
|
-
description: 'print config comment with config keys and exit',
|
|
9
|
-
type: 'boolean',
|
|
10
|
-
default: false
|
|
11
|
-
})
|
|
12
|
-
.option('type', {
|
|
13
|
-
alias: 't',
|
|
14
|
-
description: 'Set type to use',
|
|
15
|
-
type: 'string'
|
|
16
|
-
})
|
|
17
|
-
.option('layoutcode', {
|
|
18
|
-
alias: 'l',
|
|
19
|
-
description: 'Set layoutcode to use',
|
|
20
|
-
type: 'string'
|
|
21
|
-
})
|
|
22
|
-
.argv;
|
|
23
|
-
|
|
24
|
-
if (typeof argv.type !== 'undefined') {
|
|
25
|
-
type = argv.type;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (argv['print-config']) {
|
|
29
|
-
console.log(shopconfig.__comment);
|
|
30
|
-
process.exit(0);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const config = shopconfig;
|
|
34
|
-
|
|
35
|
-
const layoutcode = config.layout.code;
|
|
36
|
-
const layoutpath = "/layout/frontend/" + layoutcode + "/";
|
|
37
|
-
let srcdir = config.layout.src;
|
|
38
|
-
let builddir = config.layout.build;
|
|
39
|
-
let distdir = config.layout.dist;
|
|
40
|
-
const iconfontName = config.icons.name;
|
|
41
|
-
const favicon = config.favicon;
|
|
42
|
-
const browserSyncOptions = shopconfig.browsersync;
|
|
43
|
-
const faviconColor = favicon.color.toLowerCase();
|
|
44
|
-
const faviconBackground = favicon.background.toLowerCase();
|
|
45
|
-
const timestamp = Math.round(Date.now() / 1000).toString();
|
|
46
|
-
|
|
47
|
-
let nameIconfont = iconfontName;
|
|
48
|
-
let browserSyncProxy = browserSyncOptions.proxy;
|
|
49
|
-
|
|
50
|
-
if(config.browserSyncProxy && config.browserSyncProxy !== ""){
|
|
51
|
-
browserSyncProxy = config.browserSyncProxy;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
console.log("layoutcode: " + config.layout.code);
|
|
55
|
-
console.log("timestamp: " + timestamp);
|
|
56
|
-
console.log("srcdir: " + srcdir);
|
|
57
|
-
console.log("builddir: " + builddir);
|
|
58
|
-
console.log("distdir: " + distdir);
|
|
59
|
-
console.log("proxy: " + browserSyncProxy);
|
|
60
|
-
|
|
61
|
-
const gulp = require('gulp');
|
|
62
|
-
const sass = require('gulp-dart-sass');
|
|
63
|
-
const sourcemaps = require('gulp-sourcemaps');
|
|
64
|
-
const clean = require('gulp-clean');
|
|
65
|
-
const iconfont = require('gulp-iconfont');
|
|
66
|
-
const iconfontCss = require('gulp-iconfont-css');
|
|
67
|
-
const minifyCSS = require('dc-gulp-clean-css');
|
|
68
|
-
const realFavicon = require('gulp-real-favicon');
|
|
69
|
-
const fs = require('fs');
|
|
70
|
-
const autoprefixer = require('gulp-autoprefixer');
|
|
71
|
-
const replace = require('gulp-replace');
|
|
72
|
-
const git = require('gulp-git');
|
|
73
|
-
const gulpEsbuild = require("gulp-esbuild");
|
|
74
|
-
const rename = require("gulp-rename");
|
|
75
|
-
const tap = require("gulp-tap");
|
|
76
|
-
const template = require("gulp-template");
|
|
77
|
-
const run = require('gulp-run');
|
|
78
|
-
const browserSyncServer = require('browser-sync').create();
|
|
79
|
-
|
|
80
|
-
function cleanDist() {
|
|
81
|
-
return gulp.src(
|
|
82
|
-
distdir,
|
|
83
|
-
builddir + "/css",
|
|
84
|
-
builddir + "/snippets"
|
|
85
|
-
)
|
|
86
|
-
.on('error', onErrorHide)
|
|
87
|
-
.pipe(clean());
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function cleanIcons() {
|
|
91
|
-
return gulp.src(
|
|
92
|
-
srcdir + "/icons"
|
|
93
|
-
)
|
|
94
|
-
.on('error', onErrorHide)
|
|
95
|
-
.pipe(clean());
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function copy() {
|
|
99
|
-
return gulp.src(srcdir + '/fonts/**/*')
|
|
100
|
-
.pipe(gulp.dest(distdir + '/fonts/')),
|
|
101
|
-
gulp.src(srcdir + '/images/**/*')
|
|
102
|
-
.pipe(gulp.dest(distdir + '/images/')),
|
|
103
|
-
gulp.src(srcdir + '/icons/**/*')
|
|
104
|
-
.pipe(gulp.dest(distdir + '/fonts/')),
|
|
105
|
-
gulp.src(builddir + '/favicons/**/*')
|
|
106
|
-
.pipe(gulp.dest(distdir + '/favicons/'));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function sassSourcemaps() {
|
|
110
|
-
if (browserSyncOptions.start) {
|
|
111
|
-
return gulp.src([
|
|
112
|
-
srcdir + "/scss/*.scss"
|
|
113
|
-
])
|
|
114
|
-
.pipe(sourcemaps.init())
|
|
115
|
-
.pipe(sass({
|
|
116
|
-
includePaths: ["node_modules"]
|
|
117
|
-
}).on('error', sass.logError))
|
|
118
|
-
.pipe(sourcemaps.write("."))
|
|
119
|
-
.pipe(gulp.dest(distdir + '/css/'))
|
|
120
|
-
.pipe(browserSyncServer.stream());
|
|
121
|
-
} else {
|
|
122
|
-
return gulp.src([
|
|
123
|
-
srcdir + "/scss/*.scss"
|
|
124
|
-
])
|
|
125
|
-
.pipe(sourcemaps.init())
|
|
126
|
-
.pipe(sass({
|
|
127
|
-
includePaths: ["node_modules"]
|
|
128
|
-
}).on('error', sass.logError))
|
|
129
|
-
.pipe(sourcemaps.write("."))
|
|
130
|
-
.pipe(gulp.dest(distdir + '/css'));
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function sassStyle() {
|
|
135
|
-
return gulp.src([
|
|
136
|
-
srcdir + "/scss/*.scss"
|
|
137
|
-
])
|
|
138
|
-
.pipe(sass({
|
|
139
|
-
includePaths: ["node_modules"]
|
|
140
|
-
}).on('error', sass.logError))
|
|
141
|
-
.pipe(gulp.dest(distdir + '/css'));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function sassAddons() {
|
|
145
|
-
return gulp.src(srcdir + "/scss/addons/*.scss")
|
|
146
|
-
.pipe(sass({
|
|
147
|
-
includePaths: ["node_modules"]
|
|
148
|
-
}).on('error', sass.logError))
|
|
149
|
-
.pipe(replace('../fonts/', '../../fonts/'))
|
|
150
|
-
.pipe(gulp.dest(distdir + "/css/addons"));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function autoprefixCSS() {
|
|
154
|
-
return gulp.src(distdir + '/css/*.css')
|
|
155
|
-
.pipe(autoprefixer()).on('error', onError)
|
|
156
|
-
.pipe(gulp.dest(distdir + '/css'));
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function minifyStyleCSS() {
|
|
160
|
-
return gulp.src(distdir + '/css/**/*.css')
|
|
161
|
-
.pipe(minifyCSS({level: {1: {specialComments: 0}}}))
|
|
162
|
-
.pipe(gulp.dest(distdir + '/css'));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function renameCSSFiles() {
|
|
166
|
-
return gulp.src(distdir + '/css/*.css')
|
|
167
|
-
.pipe(rename({
|
|
168
|
-
suffix: timestamp
|
|
169
|
-
}))
|
|
170
|
-
.pipe(gulp.dest(distdir + '/css'));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function renameJSFiles() {
|
|
174
|
-
return gulp.src(distdir + '/js/*.js')
|
|
175
|
-
.pipe(rename({
|
|
176
|
-
suffix: timestamp
|
|
177
|
-
}))
|
|
178
|
-
.pipe(gulp.dest(distdir + '/js'));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function generateIconfont() {
|
|
182
|
-
return gulp.src(config.icons.src)
|
|
183
|
-
.pipe(iconfontCss({
|
|
184
|
-
fontName: nameIconfont,
|
|
185
|
-
path: config.icons.template,
|
|
186
|
-
targetPath: config.icons.buildScss,
|
|
187
|
-
fontPath: config.icons.fontPath,
|
|
188
|
-
}).on('error', onError))
|
|
189
|
-
.pipe(iconfont({
|
|
190
|
-
fontName: nameIconfont,
|
|
191
|
-
prependUnicode: true,
|
|
192
|
-
formats: ['woff', 'woff2'],
|
|
193
|
-
fontSize: 1000
|
|
194
|
-
}).on('error', onError))
|
|
195
|
-
.pipe(gulp.dest(srcdir + '/icons/'));
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function generateIconfontTimestamp() {
|
|
199
|
-
nameIconfont = nameIconfont + timestamp;
|
|
200
|
-
return gulp.src(config.icons.src)
|
|
201
|
-
.pipe(iconfontCss({
|
|
202
|
-
fontName: nameIconfont,
|
|
203
|
-
path: config.icons.template,
|
|
204
|
-
targetPath: config.icons.buildScss,
|
|
205
|
-
fontPath: config.icons.fontPath,
|
|
206
|
-
}).on('error', onError))
|
|
207
|
-
.pipe(iconfont({
|
|
208
|
-
fontName: nameIconfont,
|
|
209
|
-
prependUnicode: true,
|
|
210
|
-
formats: ['woff', 'woff2'],
|
|
211
|
-
fontSize: 1000
|
|
212
|
-
}).on('error', onError))
|
|
213
|
-
.pipe(gulp.dest(srcdir + '/icons/'));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function generateFontHtml() {
|
|
217
|
-
return gulp.src([
|
|
218
|
-
srcdir + "/snippets/includeFont.html"
|
|
219
|
-
])
|
|
220
|
-
.pipe(replace('%linkIconfontWoff2%', layoutpath + distdir + "/fonts/" + nameIconfont))
|
|
221
|
-
.on('error', onError)
|
|
222
|
-
.pipe(rename("iconfont.html"))
|
|
223
|
-
.pipe(gulp.dest(distdir + "/snippets/"));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function generateCSSHtml() {
|
|
227
|
-
return gulp.src([
|
|
228
|
-
distdir + "/css/*.css"
|
|
229
|
-
])
|
|
230
|
-
.pipe(
|
|
231
|
-
tap(function (file) {
|
|
232
|
-
let fileName = file.basename.replace(/\.[^/.]+$/, "");
|
|
233
|
-
let htmlName = fileName.replace(timestamp, "");
|
|
234
|
-
gulp.src(srcdir + '/snippets/includeCSS.html')
|
|
235
|
-
.pipe(template())
|
|
236
|
-
.pipe(replace('%linkCSS%', layoutpath + distdir + "/css/" + fileName))
|
|
237
|
-
.pipe(rename(htmlName + ".html"))
|
|
238
|
-
.pipe(gulp.dest(distdir + "/snippets/css"));
|
|
239
|
-
|
|
240
|
-
})
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function generateJSHtml() {
|
|
245
|
-
return gulp.src([
|
|
246
|
-
distdir + "/js/*.js"
|
|
247
|
-
])
|
|
248
|
-
.pipe(tap(function (file) {
|
|
249
|
-
let fileName = file.basename.replace(/\.[^/.]+$/, "");
|
|
250
|
-
let htmlName = fileName.replace(timestamp, "");
|
|
251
|
-
gulp.src(srcdir + '/snippets/includeJS.html')
|
|
252
|
-
.pipe(template())
|
|
253
|
-
.pipe(replace('%linkJS%', layoutpath + distdir + "/js/" + fileName))
|
|
254
|
-
.pipe(rename(htmlName + ".html"))
|
|
255
|
-
.pipe(gulp.dest(distdir + "/snippets/js"));
|
|
256
|
-
|
|
257
|
-
}));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function generateFaviconHtml() {
|
|
261
|
-
return gulp.src(srcdir + "/snippets/faviconmarkup.html")
|
|
262
|
-
.pipe(realFavicon.injectFaviconMarkups(JSON.parse(fs.readFileSync(builddir + favicon.distdir + "/faviconData.json")).favicon.html_code))
|
|
263
|
-
.pipe(replace('<html><head>', ''))
|
|
264
|
-
.pipe(replace('</head><body></body></html>', ''))
|
|
265
|
-
.pipe(replace('./layout/frontend/', '/layout/frontend/'))
|
|
266
|
-
.pipe(gulp.dest(distdir + "/snippets/"));
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const esbuild = (options) => {
|
|
270
|
-
let baseOptions = {
|
|
271
|
-
bundle: true,
|
|
272
|
-
target: [
|
|
273
|
-
'firefox100',
|
|
274
|
-
'chrome100',
|
|
275
|
-
'edge100',
|
|
276
|
-
'safari15',
|
|
277
|
-
'ios14'
|
|
278
|
-
]
|
|
279
|
-
}
|
|
280
|
-
return gulp.src(
|
|
281
|
-
srcdir + '/js/*.js',
|
|
282
|
-
srcdir + '/js/*.ts'
|
|
283
|
-
)
|
|
284
|
-
.pipe(gulpEsbuild({...baseOptions, ...options}))
|
|
285
|
-
.on('error', onError)
|
|
286
|
-
.pipe(gulp.dest(distdir + '/js'));
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function esbuildSourcemaps() {
|
|
290
|
-
return esbuild({
|
|
291
|
-
sourcemap: true,
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function esbuildPublic() {
|
|
296
|
-
return esbuild({
|
|
297
|
-
sourcemap: true,
|
|
298
|
-
minify: true
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
function watchFiles() {
|
|
303
|
-
gulp.watch([
|
|
304
|
-
srcdir + "/scss/**/*.scss"
|
|
305
|
-
], gulp.series(
|
|
306
|
-
gulp.parallel(sassSourcemaps)
|
|
307
|
-
));
|
|
308
|
-
gulp.watch([
|
|
309
|
-
srcdir + "/js/**/*.js",
|
|
310
|
-
srcdir + "/js/**/*.ts"
|
|
311
|
-
], gulp.series(
|
|
312
|
-
esbuildSourcemaps,
|
|
313
|
-
browsersyncReload
|
|
314
|
-
));
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function onError(err) {
|
|
318
|
-
console.error(err);
|
|
319
|
-
this.emit('end');
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
function onErrorHide(err) {
|
|
323
|
-
this.emit('end');
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
function browsersyncServe(cb) {
|
|
327
|
-
if (browserSyncOptions.start) {
|
|
328
|
-
browserSyncServer.init({
|
|
329
|
-
port: browserSyncOptions.port,
|
|
330
|
-
open: browserSyncOptions.open,
|
|
331
|
-
proxy: browserSyncProxy
|
|
332
|
-
});
|
|
333
|
-
cb();
|
|
334
|
-
}else{
|
|
335
|
-
cb();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function browsersyncReload(cb) {
|
|
340
|
-
if (browserSyncOptions.start) {
|
|
341
|
-
browserSyncServer.reload();
|
|
342
|
-
}
|
|
343
|
-
cb();
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// TASKS
|
|
347
|
-
|
|
348
|
-
gulp.task('default', gulp.series(
|
|
349
|
-
gulp.parallel(
|
|
350
|
-
cleanIcons,
|
|
351
|
-
cleanDist
|
|
352
|
-
),
|
|
353
|
-
gulp.parallel(
|
|
354
|
-
browsersyncServe,
|
|
355
|
-
generateIconfont
|
|
356
|
-
),
|
|
357
|
-
gulp.parallel(
|
|
358
|
-
copy,
|
|
359
|
-
sassSourcemaps,
|
|
360
|
-
sassAddons,
|
|
361
|
-
esbuildSourcemaps
|
|
362
|
-
),
|
|
363
|
-
gulp.parallel(
|
|
364
|
-
generateCSSHtml,
|
|
365
|
-
generateJSHtml,
|
|
366
|
-
generateFontHtml,
|
|
367
|
-
generateFaviconHtml
|
|
368
|
-
),
|
|
369
|
-
watchFiles
|
|
370
|
-
));
|
|
371
|
-
|
|
372
|
-
gulp.task('public', gulp.series(
|
|
373
|
-
gulp.parallel(
|
|
374
|
-
cleanIcons,
|
|
375
|
-
cleanDist
|
|
376
|
-
),
|
|
377
|
-
generateIconfontTimestamp,
|
|
378
|
-
gulp.parallel(
|
|
379
|
-
copy,
|
|
380
|
-
sassStyle,
|
|
381
|
-
sassAddons,
|
|
382
|
-
esbuildPublic
|
|
383
|
-
),
|
|
384
|
-
autoprefixCSS,
|
|
385
|
-
minifyStyleCSS,
|
|
386
|
-
gulp.parallel(
|
|
387
|
-
renameCSSFiles,
|
|
388
|
-
renameJSFiles
|
|
389
|
-
),
|
|
390
|
-
gulp.parallel(
|
|
391
|
-
generateCSSHtml,
|
|
392
|
-
generateJSHtml,
|
|
393
|
-
generateFontHtml,
|
|
394
|
-
generateFaviconHtml
|
|
395
|
-
)
|
|
396
|
-
));
|
|
397
|
-
|
|
398
|
-
gulp.task('generate-favicon', function (done) {
|
|
399
|
-
realFavicon.generateFavicon({
|
|
400
|
-
masterPicture: srcdir + "/" + favicon.masterpicture_path + "/" + favicon.masterpicture_filename,
|
|
401
|
-
dest: builddir + favicon.distdir + '/',
|
|
402
|
-
iconsPath: layoutpath + distdir + favicon.distdir + '/',
|
|
403
|
-
design: {
|
|
404
|
-
ios: {
|
|
405
|
-
pictureAspect: 'backgroundAndMargin',
|
|
406
|
-
backgroundColor: faviconBackground,
|
|
407
|
-
margin: '18%',
|
|
408
|
-
assets: {
|
|
409
|
-
ios6AndPriorIcons: false,
|
|
410
|
-
ios7AndLaterIcons: false,
|
|
411
|
-
precomposedIcons: false,
|
|
412
|
-
declareOnlyDefaultIcon: true
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
desktopBrowser: {
|
|
416
|
-
design: 'raw'
|
|
417
|
-
},
|
|
418
|
-
windows: {
|
|
419
|
-
pictureAspect: 'noChange',
|
|
420
|
-
backgroundColor: faviconBackground,
|
|
421
|
-
onConflict: 'override',
|
|
422
|
-
assets: {
|
|
423
|
-
windows80Ie10Tile: false,
|
|
424
|
-
windows10Ie11EdgeTiles: {
|
|
425
|
-
small: false,
|
|
426
|
-
medium: true,
|
|
427
|
-
big: false,
|
|
428
|
-
rectangle: false
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
androidChrome: {
|
|
433
|
-
pictureAspect: 'noChange',
|
|
434
|
-
themeColor: faviconBackground,
|
|
435
|
-
manifest: {
|
|
436
|
-
name: favicon.title,
|
|
437
|
-
display: 'standalone',
|
|
438
|
-
orientation: 'notSet',
|
|
439
|
-
onConflict: 'override',
|
|
440
|
-
declared: true
|
|
441
|
-
},
|
|
442
|
-
assets: {
|
|
443
|
-
legacyIcon: false,
|
|
444
|
-
lowResolutionIcons: false
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
safariPinnedTab: {
|
|
448
|
-
pictureAspect: 'silhouette',
|
|
449
|
-
themeColor: faviconColor
|
|
450
|
-
}
|
|
451
|
-
},
|
|
452
|
-
settings: {
|
|
453
|
-
scalingAlgorithm: 'Mitchell',
|
|
454
|
-
errorOnImageTooSmall: false,
|
|
455
|
-
readmeFile: false,
|
|
456
|
-
htmlCodeFile: false,
|
|
457
|
-
usePathAsIs: false
|
|
458
|
-
},
|
|
459
|
-
markupFile: builddir + "/favicons/faviconData.json"
|
|
460
|
-
}, function () {
|
|
461
|
-
done();
|
|
462
|
-
});
|
|
463
|
-
});
|