mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
FIX: minor updates
This commit is contained in:
parent
3701437f6c
commit
d52c250076
@ -23,6 +23,7 @@ git clone https://github.com/a2nt/silverstripe-webpack.git
|
|||||||
cd silverstripe-webpack
|
cd silverstripe-webpack
|
||||||
composer install
|
composer install
|
||||||
npm install
|
npm install
|
||||||
|
npm install --only=dev
|
||||||
cp ./env-dist ./.env
|
cp ./env-dist ./.env
|
||||||
```
|
```
|
||||||
Those steps depends on your environment:
|
Those steps depends on your environment:
|
||||||
|
2
app/client/dist/css/app.css
vendored
2
app/client/dist/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
app/client/dist/icons/.cache
vendored
2
app/client/dist/icons/.cache
vendored
@ -1 +1 @@
|
|||||||
{"hash":"3deb17371acdc75398d81da38fad464c","version":"0.0.9","optionHash":"c067d9b2d6a96a86192ece0162f1b1ac","result":{"outputFilePrefix":"/icons/","html":["<meta name=\"mobile-web-app-capable\" content=\"yes\">","<meta name=\"theme-color\" content=\"#fff\">","<meta name=\"application-name\" content=\"Webpack App\">","<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"app/client/dist//icons/apple-touch-icon-57x57.png\">","<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"app/client/dist//icons/apple-touch-icon-60x60.png\">","<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"app/client/dist//icons/apple-touch-icon-72x72.png\">","<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"app/client/dist//icons/apple-touch-icon-76x76.png\">","<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"app/client/dist//icons/apple-touch-icon-114x114.png\">","<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"app/client/dist//icons/apple-touch-icon-120x120.png\">","<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"app/client/dist//icons/apple-touch-icon-144x144.png\">","<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"app/client/dist//icons/apple-touch-icon-152x152.png\">","<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"app/client/dist//icons/apple-touch-icon-180x180.png\">","<meta name=\"apple-mobile-web-app-capable\" content=\"yes\">","<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">","<meta name=\"apple-mobile-web-app-title\" content=\"Webpack App\">","<link rel=\"icon\" type=\"image/png\" sizes=\"228x228\" href=\"app/client/dist//icons/coast-228x228.png\">","<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"app/client/dist//icons/favicon-32x32.png\">","<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"app/client/dist//icons/favicon-16x16.png\">","<link rel=\"shortcut icon\" href=\"app/client/dist//icons/favicon.ico\">","<meta name=\"msapplication-TileColor\" content=\"#fff\">","<meta name=\"msapplication-TileImage\" content=\"mstile-144x144.png\">","<meta name=\"msapplication-config\" content=\"browserconfig.xml\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-320x460.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x920.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x1096.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-750x1294.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1182x2208.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1242x2148.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-748x1024.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-768x1004.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1496x2048.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1536x2008.png\">"],"files":["/icons/android-chrome-36x36.png","/icons/android-chrome-48x48.png","/icons/android-chrome-72x72.png","/icons/android-chrome-96x96.png","/icons/android-chrome-144x144.png","/icons/android-chrome-192x192.png","/icons/android-chrome-256x256.png","/icons/android-chrome-384x384.png","/icons/android-chrome-512x512.png","/icons/apple-touch-icon-57x57.png","/icons/apple-touch-icon-60x60.png","/icons/apple-touch-icon-72x72.png","/icons/apple-touch-icon-76x76.png","/icons/apple-touch-icon-114x114.png","/icons/apple-touch-icon-120x120.png","/icons/apple-touch-icon-144x144.png","/icons/apple-touch-icon-167x167.png","/icons/apple-touch-icon-152x152.png","/icons/apple-touch-icon-180x180.png","/icons/apple-touch-icon.png","/icons/apple-touch-icon-precomposed.png","/icons/coast-228x228.png","/icons/yandex-browser-50x50.png","/icons/favicon-16x16.png","/icons/favicon-32x32.png","/icons/favicon.ico","/icons/mstile-144x144.png","/icons/mstile-150x150.png","/icons/mstile-70x70.png","/icons/mstile-310x310.png","/icons/mstile-310x150.png","/icons/apple-touch-startup-image-640x920.png","/icons/apple-touch-startup-image-640x1096.png","/icons/apple-touch-startup-image-320x460.png","/icons/apple-touch-startup-image-748x1024.png","/icons/apple-touch-startup-image-768x1004.png","/icons/apple-touch-startup-image-750x1294.png","/icons/apple-touch-startup-image-1242x2148.png","/icons/apple-touch-startup-image-1182x2208.png","/icons/apple-touch-startup-image-1536x2008.png","/icons/apple-touch-startup-image-1496x2048.png","/icons/firefox_app_60x60.png","/icons/firefox_app_128x128.png","/icons/firefox_app_512x512.png","/icons/manifest.json","/icons/yandex-browser-manifest.json","/icons/browserconfig.xml","/icons/manifest.webapp"]}}
|
{"hash":"3deb17371acdc75398d81da38fad464c","version":"0.0.9","optionHash":"c067d9b2d6a96a86192ece0162f1b1ac","result":{"outputFilePrefix":"/icons/","html":["<meta name=\"mobile-web-app-capable\" content=\"yes\">","<meta name=\"theme-color\" content=\"#fff\">","<meta name=\"application-name\" content=\"Webpack App\">","<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"app/client/dist//icons/apple-touch-icon-57x57.png\">","<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"app/client/dist//icons/apple-touch-icon-60x60.png\">","<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"app/client/dist//icons/apple-touch-icon-72x72.png\">","<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"app/client/dist//icons/apple-touch-icon-76x76.png\">","<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"app/client/dist//icons/apple-touch-icon-114x114.png\">","<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"app/client/dist//icons/apple-touch-icon-120x120.png\">","<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"app/client/dist//icons/apple-touch-icon-144x144.png\">","<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"app/client/dist//icons/apple-touch-icon-152x152.png\">","<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"app/client/dist//icons/apple-touch-icon-180x180.png\">","<meta name=\"apple-mobile-web-app-capable\" content=\"yes\">","<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">","<meta name=\"apple-mobile-web-app-title\" content=\"Webpack App\">","<link rel=\"icon\" type=\"image/png\" sizes=\"228x228\" href=\"app/client/dist//icons/coast-228x228.png\">","<meta name=\"msapplication-TileColor\" content=\"#fff\">","<meta name=\"msapplication-TileImage\" content=\"mstile-144x144.png\">","<meta name=\"msapplication-config\" content=\"browserconfig.xml\">","<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"app/client/dist//icons/favicon-32x32.png\">","<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"app/client/dist//icons/favicon-16x16.png\">","<link rel=\"shortcut icon\" href=\"app/client/dist//icons/favicon.ico\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-320x460.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x920.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x1096.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-750x1294.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1182x2208.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1242x2148.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-748x1024.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-768x1004.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1496x2048.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1536x2008.png\">"],"files":["/icons/android-chrome-36x36.png","/icons/android-chrome-72x72.png","/icons/android-chrome-96x96.png","/icons/android-chrome-48x48.png","/icons/android-chrome-192x192.png","/icons/android-chrome-144x144.png","/icons/android-chrome-256x256.png","/icons/android-chrome-384x384.png","/icons/android-chrome-512x512.png","/icons/apple-touch-icon-57x57.png","/icons/apple-touch-icon-72x72.png","/icons/apple-touch-icon-60x60.png","/icons/apple-touch-icon-76x76.png","/icons/apple-touch-icon-114x114.png","/icons/apple-touch-icon-152x152.png","/icons/apple-touch-icon-167x167.png","/icons/apple-touch-icon-120x120.png","/icons/apple-touch-icon-144x144.png","/icons/apple-touch-icon-180x180.png","/icons/apple-touch-icon.png","/icons/apple-touch-icon-precomposed.png","/icons/coast-228x228.png","/icons/yandex-browser-50x50.png","/icons/mstile-70x70.png","/icons/mstile-144x144.png","/icons/mstile-150x150.png","/icons/mstile-310x150.png","/icons/mstile-310x310.png","/icons/favicon-16x16.png","/icons/favicon-32x32.png","/icons/favicon.ico","/icons/apple-touch-startup-image-320x460.png","/icons/apple-touch-startup-image-640x920.png","/icons/apple-touch-startup-image-640x1096.png","/icons/apple-touch-startup-image-768x1004.png","/icons/apple-touch-startup-image-750x1294.png","/icons/apple-touch-startup-image-748x1024.png","/icons/apple-touch-startup-image-1182x2208.png","/icons/apple-touch-startup-image-1242x2148.png","/icons/apple-touch-startup-image-1496x2048.png","/icons/apple-touch-startup-image-1536x2008.png","/icons/firefox_app_60x60.png","/icons/firefox_app_128x128.png","/icons/firefox_app_512x512.png","/icons/manifest.json","/icons/yandex-browser-manifest.json","/icons/browserconfig.xml","/icons/manifest.webapp"]}}
|
4
app/client/dist/js/app.js
vendored
4
app/client/dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -19,9 +19,12 @@ const LayoutUI = ($ => {
|
|||||||
console.log(`Initializing: ${NAME}`);
|
console.log(`Initializing: ${NAME}`);
|
||||||
// your custom UI
|
// your custom UI
|
||||||
|
|
||||||
|
// Fire further js when layout is ready
|
||||||
|
$(W).trigger(Events.LODEDANDREADY);
|
||||||
|
|
||||||
// Custom fonts
|
// Custom fonts
|
||||||
$Body.append(
|
$Body.append(
|
||||||
'<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,700,700i&display=swap" rel="stylesheet">',
|
'<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,700,700i&display=swap" rel="stylesheet" />',
|
||||||
);
|
);
|
||||||
|
|
||||||
/*google analytics */
|
/*google analytics */
|
||||||
|
@ -10,8 +10,8 @@ import 'bootstrap/js/dist/button';
|
|||||||
import 'bootstrap/js/dist/carousel';
|
import 'bootstrap/js/dist/carousel';
|
||||||
import 'bootstrap/js/dist/collapse';
|
import 'bootstrap/js/dist/collapse';
|
||||||
|
|
||||||
import 'hammerjs/hammer';
|
//import 'hammerjs/hammer';
|
||||||
import 'jquery-hammerjs/jquery.hammer';
|
//import 'jquery-hammerjs/jquery.hammer';
|
||||||
|
|
||||||
// Routie
|
// Routie
|
||||||
//import 'pouchdb/dist/pouchdb';
|
//import 'pouchdb/dist/pouchdb';
|
||||||
@ -96,3 +96,4 @@ const fontAwesome = importAll(
|
|||||||
|
|
||||||
// Google Analytics
|
// Google Analytics
|
||||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_google.track.external.links';
|
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_google.track.external.links';
|
||||||
|
//import MarkerClusterer from '@google/markerclusterer/src/markerclusterer.js';
|
||||||
|
@ -7,10 +7,10 @@ en:
|
|||||||
PASSWORDRESETSENTHEADER: 'Password reset link sent'
|
PASSWORDRESETSENTHEADER: 'Password reset link sent'
|
||||||
PASSWORDRESETSENTTEXT: 'Thank you. A reset link has been sent, provided an account exists for this email address.'
|
PASSWORDRESETSENTTEXT: 'Thank you. A reset link has been sent, provided an account exists for this email address.'
|
||||||
Page:
|
Page:
|
||||||
LOADINGTEXT: "LOADING .."
|
LOADINGTEXT: 'LOADING ..'
|
||||||
JAVASCRIPTREQUIRED: "Please, enable javascript!"
|
JAVASCRIPTREQUIRED: 'Please, enable javascript!'
|
||||||
UPGRADEBROWSER: "Upgrade your browser"
|
UPGRADEBROWSER: 'Upgrade your browser'
|
||||||
OUTDATEDBROWSER: "You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today."
|
OUTDATEDBROWSER: 'You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.'
|
||||||
SilverShop\Model\Address:
|
SilverShop\Model\Address:
|
||||||
db_Surname: 'Last Name'
|
db_Surname: 'Last Name'
|
||||||
SilverShop\Model\Order:
|
SilverShop\Model\Order:
|
||||||
@ -18,9 +18,14 @@ en:
|
|||||||
SilverShop\Page\CheckoutPage:
|
SilverShop\Page\CheckoutPage:
|
||||||
ProceedToPayment: 'Send Order to Store'
|
ProceedToPayment: 'Send Order to Store'
|
||||||
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
|
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
|
||||||
EMPTY: "Please prove you are human - check the Captcha box."
|
EMPTY: 'Please prove you are human - check the Captcha box.'
|
||||||
NOSCRIPT: "You must enable JavaScript to submit this form"
|
NOSCRIPT: 'You must enable JavaScript to submit this form'
|
||||||
VALIDATE_ERROR: "Captcha could not be validated"
|
VALIDATE_ERROR: 'Captcha could not be validated'
|
||||||
Dynamic\FlexSlider\Model\SlideImage:
|
Dynamic\FlexSlider\Model\SlideImage:
|
||||||
SINGULARNAME: 'Slide'
|
SINGULARNAME: 'Slide'
|
||||||
PLURALNAME: 'Slides'
|
PLURALNAME: 'Slides'
|
||||||
|
Addressable:
|
||||||
|
SUBURB: 'City'
|
||||||
|
Symbiote\AddressableAddressable:
|
||||||
|
SUBURB: 'City'
|
||||||
|
|
||||||
|
@ -86,6 +86,11 @@ class MapPin extends DataObject
|
|||||||
$lng = $this->getField('Lng');
|
$lng = $this->getField('Lng');
|
||||||
$lat = $this->getField('Lat');
|
$lat = $this->getField('Lat');
|
||||||
|
|
||||||
|
|
||||||
|
if (!$this->getField('Country')) {
|
||||||
|
$this->setField('Country', 'us');
|
||||||
|
}
|
||||||
|
|
||||||
// geocode
|
// geocode
|
||||||
try {
|
try {
|
||||||
// reverse geocoding get address
|
// reverse geocoding get address
|
||||||
|
@ -1,19 +1,7 @@
|
|||||||
<div class="page-content page-content-main">
|
<div class="page-content page-content-main">
|
||||||
<div class="
|
<% if not $ExcludeHeader %>
|
||||||
element
|
<% include PageHeader %>
|
||||||
page-header-element
|
<% end_if %>
|
||||||
<% if $ElementalArea.Elements.Count < 1 %>
|
|
||||||
d-block no-elements
|
|
||||||
<% else_if not $ElementalArea.Elements.First.ShowTitle && $ElementalArea.Elements.First.ClassName != Site\Elements\SliderElement %>
|
|
||||||
d-block
|
|
||||||
<% end_if %>
|
|
||||||
">
|
|
||||||
<div class="$DefaultContainer">
|
|
||||||
<h1 class="page-header">
|
|
||||||
$Title
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if $CurrentElement %>
|
<% if $CurrentElement %>
|
||||||
<div class="current-element">
|
<div class="current-element">
|
||||||
|
@ -8,7 +8,7 @@ $MetaTags
|
|||||||
<meta name="mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
|
||||||
<%-- OpenGraph --%>
|
<%-- OpenGraph --%>
|
||||||
<meta property="og:url" content="{$AbsoluteBaseURL}" />
|
<meta property="og:url" content="{$AbsoluteLink}" />
|
||||||
<meta property="og:site_name" content="{$SiteConfig.Title}" />
|
<meta property="og:site_name" content="{$SiteConfig.Title}" />
|
||||||
<meta property="og:locale" content="$ContentLocale.ATT" />
|
<meta property="og:locale" content="$ContentLocale.ATT" />
|
||||||
<% if $MetaTitle %>
|
<% if $MetaTitle %>
|
||||||
@ -18,9 +18,13 @@ $MetaTags
|
|||||||
<% if $MetaDescription %>
|
<% if $MetaDescription %>
|
||||||
<meta property="og:description" content="{$MetaDescription}" />
|
<meta property="og:description" content="{$MetaDescription}" />
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if $MetaImage %>
|
<% if $MetaImage %>
|
||||||
<meta property="og:image" content="{$MetaImage.Link}" />
|
<meta property="og:image" content="{$MetaImage.Link}" />
|
||||||
|
<% else_if $MetaImageLink %>
|
||||||
|
<meta property="og:image" content="{$MetaImageLink}" />
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if $FacebookAppID %>
|
<% if $FacebookAppID %>
|
||||||
<meta property="fb:app_id" content="{$FacebookAppID}" />
|
<meta property="fb:app_id" content="{$FacebookAppID}" />
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
15
app/templates/Includes/PageHeader.ss
Normal file
15
app/templates/Includes/PageHeader.ss
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<div class="
|
||||||
|
element
|
||||||
|
page-header-element
|
||||||
|
<% if $ElementalArea.Elements.Count < 1 %>
|
||||||
|
d-block no-elements
|
||||||
|
<% else_if not $ElementalArea.Elements.First.ShowTitle && $ElementalArea.Elements.First.ClassName != Site\Elements\SliderElement %>
|
||||||
|
d-block
|
||||||
|
<% end_if %>
|
||||||
|
">
|
||||||
|
<div class="element-container $DefaultContainer">
|
||||||
|
<h1 class="page-header">
|
||||||
|
$Title
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -4,7 +4,7 @@
|
|||||||
<% if $FeaturedImage %>
|
<% if $FeaturedImage %>
|
||||||
<div id="CarouselTop" class="carousel slide js-carousel d-none d-sm-block">
|
<div id="CarouselTop" class="carousel slide js-carousel d-none d-sm-block">
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
<div class="carousel-item">
|
<div class="carousel-item active">
|
||||||
<img class="d-block w-100" src="$FeaturedImage.Fill(1200,400).URL" alt="$Title">
|
<img class="d-block w-100" src="$FeaturedImage.Fill(1200,400).URL" alt="$Title">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1 +1,11 @@
|
|||||||
<% include Content %>
|
<% include PageHeader %>
|
||||||
|
|
||||||
|
<% include Content ExcludeHeader=true %>
|
||||||
|
|
||||||
|
<%-- div class="page-content page-content-main page-content-extra">
|
||||||
|
<div class="element">
|
||||||
|
<div class="element-container $DefaultContainer">
|
||||||
|
<!-- Some exta page type specific content -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div --%>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@a2nt/meta-lightbox": "^1.2.2",
|
"@a2nt/meta-lightbox": "^1.2.2",
|
||||||
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.7.3",
|
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.7.6",
|
||||||
"browserslist": "^4.8.6",
|
"browserslist": "^4.8.6",
|
||||||
"caniuse-lite": "^1.0.30001025",
|
"caniuse-lite": "^1.0.30001025",
|
||||||
"inputmask": "^5.0.3",
|
"inputmask": "^5.0.3",
|
||||||
@ -38,13 +38,13 @@
|
|||||||
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
|
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
|
||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.8.4",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
||||||
"@babel/plugin-transform-react-jsx": "*",
|
"@babel/plugin-transform-react-jsx": "^7.8.3",
|
||||||
"@babel/preset-env": "^7.8.4",
|
"@babel/preset-env": "^7.8.4",
|
||||||
"babel-eslint": "^8.2.6",
|
|
||||||
"babel-loader": "^8.0.6",
|
|
||||||
"@google/markerclusterer": "^1.0.3",
|
"@google/markerclusterer": "^1.0.3",
|
||||||
"animate.css": "^3.7.0",
|
"animate.css": "^3.7.0",
|
||||||
"autoprefixer": "^9.7.4",
|
"autoprefixer": "^9.7.4",
|
||||||
|
"babel-eslint": "^8.2.6",
|
||||||
|
"babel-loader": "^8.0.6",
|
||||||
"bootbox": "^4.4.0",
|
"bootbox": "^4.4.0",
|
||||||
"bootstrap": "^4.4.1",
|
"bootstrap": "^4.4.1",
|
||||||
"bootstrap-confirmation2": "^4.1.0",
|
"bootstrap-confirmation2": "^4.1.0",
|
||||||
|
@ -11,153 +11,162 @@ const filesystem = require('fs');
|
|||||||
|
|
||||||
const includes = {};
|
const includes = {};
|
||||||
const modules = [
|
const modules = [
|
||||||
path.resolve(__dirname, 'public'),
|
path.resolve(__dirname, 'public'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'src'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'js'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'js'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'scss'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'scss'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'img'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'img'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'thirdparty'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'thirdparty'),
|
||||||
path.resolve(__dirname, conf.APPDIR, 'client', 'node_modules'),
|
path.resolve(__dirname, conf.APPDIR, 'client', 'node_modules'),
|
||||||
path.resolve(__dirname, 'node_modules')
|
path.resolve(__dirname, 'node_modules'),
|
||||||
];
|
];
|
||||||
|
|
||||||
const _addAppFiles = (theme) => {
|
const _addAppFiles = theme => {
|
||||||
|
const dirPath = path.resolve(__dirname, theme);
|
||||||
|
const themeName = path.basename(theme);
|
||||||
|
|
||||||
const dirPath = path.resolve(__dirname, theme);
|
if (filesystem.existsSync(path.join(dirPath, conf.SRC, 'js', 'app.js'))) {
|
||||||
const themeName = path.basename(theme);
|
includes[`${themeName}`] = path.join(dirPath, conf.SRC, 'js', 'app.js');
|
||||||
|
} else if (
|
||||||
|
filesystem.existsSync(path.join(dirPath, conf.SRC, 'scss', 'app.scss'))
|
||||||
|
) {
|
||||||
|
includes[`${themeName}`] = path.join(
|
||||||
|
dirPath,
|
||||||
|
conf.SRC,
|
||||||
|
'scss',
|
||||||
|
'app.scss',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (filesystem.existsSync(path.join(dirPath, conf.SRC, 'js', 'app.js'))) {
|
modules.push(path.join(dirPath, 'client', 'src', 'js'));
|
||||||
includes[`${themeName}`] = path.join(dirPath, conf.SRC, 'js', 'app.js');
|
modules.push(path.join(dirPath, 'client', 'src', 'scss'));
|
||||||
} else if (filesystem.existsSync(path.join(dirPath, conf.SRC, 'scss', 'app.scss'))) {
|
modules.push(path.join(dirPath, 'client', 'src', 'img'));
|
||||||
includes[`${themeName}`] = path.join(dirPath, conf.SRC, 'scss', 'app.scss');
|
modules.push(path.join(dirPath, 'client', 'src', 'thirdparty'));
|
||||||
}
|
|
||||||
|
|
||||||
modules.push(path.join(dirPath, 'client', 'src', 'js'));
|
const _getAllFilesFromFolder = function(dir, includeSubFolders = true) {
|
||||||
modules.push(path.join(dirPath, 'client', 'src', 'scss'));
|
const dirPath = path.resolve(__dirname, dir);
|
||||||
modules.push(path.join(dirPath, 'client', 'src', 'img'));
|
let results = [];
|
||||||
modules.push(path.join(dirPath, 'client', 'src', 'thirdparty'));
|
|
||||||
|
|
||||||
const _getAllFilesFromFolder = function(dir, includeSubFolders = true) {
|
filesystem.readdirSync(dirPath).forEach(file => {
|
||||||
const dirPath = path.resolve(__dirname, dir);
|
if (file.charAt(0) === '_') {
|
||||||
let results = [];
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
filesystem.readdirSync(dirPath).forEach((file) => {
|
const filePath = path.join(dirPath, file);
|
||||||
if (file.charAt(0) === '_') {
|
const stat = filesystem.statSync(filePath);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const filePath = path.join(dirPath, file);
|
if (stat && stat.isDirectory() && includeSubFolders) {
|
||||||
const stat = filesystem.statSync(filePath);
|
results = results.concat(
|
||||||
|
_getAllFilesFromFolder(filePath, includeSubFolders),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
results.push(filePath);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (stat && stat.isDirectory() && includeSubFolders) {
|
return results;
|
||||||
results = results.concat(_getAllFilesFromFolder(filePath, includeSubFolders));
|
};
|
||||||
} else {
|
|
||||||
results.push(filePath);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return results;
|
// add page specific scripts
|
||||||
};
|
const typesJSPath = path.join(theme, conf.TYPESJS);
|
||||||
|
if (filesystem.existsSync(typesJSPath)) {
|
||||||
|
const pageScripts = _getAllFilesFromFolder(typesJSPath, true);
|
||||||
|
pageScripts.forEach(file => {
|
||||||
|
includes[`${themeName}_${path.basename(file, '.js')}`] = file;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// add page specific scripts
|
// add page specific scss
|
||||||
const typesJSPath = path.join(theme, conf.TYPESJS);
|
const typesSCSSPath = path.join(theme, conf.TYPESSCSS);
|
||||||
if (filesystem.existsSync(typesJSPath)) {
|
if (filesystem.existsSync(typesSCSSPath)) {
|
||||||
const pageScripts = _getAllFilesFromFolder(typesJSPath, true);
|
const scssIncludes = _getAllFilesFromFolder(typesSCSSPath, true);
|
||||||
pageScripts.forEach((file) => {
|
scssIncludes.forEach(file => {
|
||||||
includes[`${themeName}_${path.basename(file, '.js')}`] = file;
|
includes[`${themeName}_${path.basename(file, '.scss')}`] = file;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// add page specific scss
|
|
||||||
const typesSCSSPath = path.join(theme, conf.TYPESSCSS);
|
|
||||||
if (filesystem.existsSync(typesSCSSPath)) {
|
|
||||||
const scssIncludes = _getAllFilesFromFolder(typesSCSSPath, true);
|
|
||||||
scssIncludes.forEach((file) => {
|
|
||||||
includes[`${themeName}_${path.basename(file, '.scss')}`] = file;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_addAppFiles(conf.APPDIR);
|
_addAppFiles(conf.APPDIR);
|
||||||
|
|
||||||
// add themes
|
// add themes
|
||||||
commonVariables.themes.forEach((theme) => {
|
commonVariables.themes.forEach(theme => {
|
||||||
_addAppFiles(theme);
|
_addAppFiles(theme);
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: includes,
|
entry: includes,
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
externals: {
|
externals: {
|
||||||
'jquery': 'jQuery',
|
jquery: 'jQuery',
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
namedModules: true, // NamedModulesPlugin()
|
namedModules: true, // NamedModulesPlugin()
|
||||||
splitChunks: { // CommonsChunkPlugin()
|
splitChunks: {
|
||||||
name: 'vendor',
|
// CommonsChunkPlugin()
|
||||||
minChunks: 2
|
name: 'vendor',
|
||||||
},
|
minChunks: 2,
|
||||||
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
|
},
|
||||||
concatenateModules: true //ModuleConcatenationPlugin
|
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
|
||||||
},
|
concatenateModules: true, //ModuleConcatenationPlugin
|
||||||
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [
|
||||||
test: /\.jsx?$/,
|
{
|
||||||
exclude: /node_modules/,
|
test: /\.jsx?$/,
|
||||||
use: {
|
//exclude: /node_modules/,
|
||||||
loader: 'babel-loader',
|
use: {
|
||||||
options: {
|
loader: 'babel-loader',
|
||||||
presets: [
|
options: {
|
||||||
['es2015', {
|
presets: ['@babel/preset-env'], //Preset used for env setup
|
||||||
modules: false,
|
plugins: [
|
||||||
}],
|
['@babel/transform-react-jsx'],
|
||||||
['stage-2'],
|
['react-hot-loader/babel'],
|
||||||
],
|
],
|
||||||
plugins: [
|
},
|
||||||
['transform-react-jsx'],
|
},
|
||||||
['react-hot-loader/babel'],
|
},
|
||||||
],
|
{
|
||||||
},
|
test: /\.tsx?$/,
|
||||||
},
|
use: 'ts-loader',
|
||||||
}, {
|
exclude: /node_modules/,
|
||||||
test: /\.tsx?$/,
|
},
|
||||||
use: 'ts-loader',
|
{
|
||||||
exclude: /node_modules/,
|
test: /\.coffee?$/,
|
||||||
}, {
|
use: 'coffee-loader',
|
||||||
test: /\.coffee?$/,
|
},
|
||||||
use: 'coffee-loader',
|
{
|
||||||
}, {
|
test: /\.worker\.js$/,
|
||||||
test: /\.worker\.js$/,
|
use: {
|
||||||
use: {
|
loader: 'worker-loader',
|
||||||
loader: 'worker-loader',
|
},
|
||||||
},
|
},
|
||||||
}],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: modules,
|
modules: modules,
|
||||||
alias: {
|
alias: {
|
||||||
'jquery': require.resolve('jquery'),
|
jquery: require.resolve('jquery'),
|
||||||
'jQuery': require.resolve('jquery'),
|
jQuery: require.resolve('jquery'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
$: 'jquery',
|
$: 'jquery',
|
||||||
jQuery: 'jquery',
|
jQuery: 'jquery',
|
||||||
'window.jQuery': 'jquery',
|
'window.jQuery': 'jquery',
|
||||||
Popper: ['popper.js', 'default'],
|
Popper: ['popper.js', 'default'],
|
||||||
Util: 'exports-loader?Util!bootstrap/js/dist/util',
|
Util: 'exports-loader?Util!bootstrap/js/dist/util',
|
||||||
Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
|
Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
|
||||||
Button: 'exports-loader?Button!bootstrap/js/dist/button',
|
Button: 'exports-loader?Button!bootstrap/js/dist/button',
|
||||||
Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
|
Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
|
||||||
Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
|
Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
|
||||||
Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
|
Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
|
||||||
Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
|
Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
|
||||||
Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
|
Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
|
||||||
Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
|
Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
|
||||||
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
||||||
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
|
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Development assets generation
|
* Development assets generation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require("path");
|
const path = require('path');
|
||||||
const autoprefixer = require('autoprefixer');
|
const autoprefixer = require('autoprefixer');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
@ -14,7 +14,7 @@ const IP = process.env.IP || conf.HOSTNAME;
|
|||||||
const PORT = process.env.PORT || conf.PORT;
|
const PORT = process.env.PORT || conf.PORT;
|
||||||
|
|
||||||
const config = merge.strategy({
|
const config = merge.strategy({
|
||||||
entry: 'prepend'
|
entry: 'prepend',
|
||||||
})(common, {
|
})(common, {
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
|
|
||||||
@ -23,77 +23,75 @@ const config = merge.strategy({
|
|||||||
'react-hot-loader/patch',
|
'react-hot-loader/patch',
|
||||||
'webpack-dev-server/client?https://' + conf.HOSTNAME + ':' + conf.PORT,
|
'webpack-dev-server/client?https://' + conf.HOSTNAME + ':' + conf.PORT,
|
||||||
'webpack/hot/only-dev-server',
|
'webpack/hot/only-dev-server',
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname),
|
path: path.join(__dirname),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
// necessary for HMR to know where to load the hot update chunks
|
// necessary for HMR to know where to load the hot update chunks
|
||||||
publicPath: 'https://' + conf.HOSTNAME + ':' + conf.PORT + '/'
|
publicPath: 'https://' + conf.HOSTNAME + ':' + conf.PORT + '/',
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [
|
||||||
test: /\.s?css$/,
|
{
|
||||||
use: [{
|
test: /\.s?css$/,
|
||||||
loader: 'style-loader',
|
use: [
|
||||||
options: {
|
{
|
||||||
sourceMap: true
|
loader: 'style-loader',
|
||||||
}
|
options: {
|
||||||
}, {
|
sourceMap: true,
|
||||||
loader: 'css-loader',
|
},
|
||||||
options: {
|
|
||||||
sourceMap: true
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
options: {
|
|
||||||
sourceMap: true,
|
|
||||||
plugins: [
|
|
||||||
autoprefixer({
|
|
||||||
// If we want to use the same browser list for more tools
|
|
||||||
// this list should be moved to package.json
|
|
||||||
// https://evilmartians.com/chronicles/autoprefixer-7-browserslist-2-released
|
|
||||||
browsers: [
|
|
||||||
'ie >= 11',
|
|
||||||
'ie_mob >= 11',
|
|
||||||
'Safari >= 10',
|
|
||||||
'Android >= 4.4',
|
|
||||||
'Chrome >= 44', // Retail
|
|
||||||
'Samsung >= 4'
|
|
||||||
]
|
|
||||||
})
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
loader: 'resolve-url-loader'
|
|
||||||
}, {
|
|
||||||
loader: 'sass-loader',
|
|
||||||
options: {
|
|
||||||
sourceMap: true
|
|
||||||
}
|
|
||||||
}, ]
|
|
||||||
}, {
|
|
||||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
|
||||||
use: [{
|
|
||||||
loader: 'url-loader'
|
|
||||||
}]
|
|
||||||
}, {
|
|
||||||
test: /\.(gif|png|jpg|jpeg|ttf|otf|eot|svg|woff(2)?)$/,
|
|
||||||
use: [{
|
|
||||||
loader: 'file-loader',
|
|
||||||
options: {
|
|
||||||
name(file) {
|
|
||||||
return 'public/[path][name].[ext]';
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
}]
|
loader: 'css-loader',
|
||||||
}]
|
options: {
|
||||||
|
sourceMap: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: true,
|
||||||
|
plugins: [autoprefixer()],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'resolve-url-loader',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'sass-loader',
|
||||||
|
options: {
|
||||||
|
sourceMap: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'url-loader',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(gif|png|jpg|jpeg|ttf|otf|eot|svg|woff(2)?)$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'file-loader',
|
||||||
|
options: {
|
||||||
|
name(file) {
|
||||||
|
return 'public/[path][name].[ext]';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
|
||||||
],
|
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
host: IP,
|
host: IP,
|
||||||
@ -111,11 +109,11 @@ const config = merge.strategy({
|
|||||||
//watchContentBase: true,
|
//watchContentBase: true,
|
||||||
overlay: {
|
overlay: {
|
||||||
warnings: true,
|
warnings: true,
|
||||||
errors: true
|
errors: true,
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -154,6 +154,7 @@ commonVariables.themes.forEach(theme => {
|
|||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
optimization: {
|
optimization: {
|
||||||
|
removeAvailableModules: false,
|
||||||
namedModules: true, // NamedModulesPlugin()
|
namedModules: true, // NamedModulesPlugin()
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
// CommonsChunkPlugin()
|
// CommonsChunkPlugin()
|
||||||
@ -164,16 +165,40 @@ module.exports = merge(common, {
|
|||||||
concatenateModules: true, //ModuleConcatenationPlugin
|
concatenateModules: true, //ModuleConcatenationPlugin
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserPlugin({
|
new TerserPlugin({
|
||||||
parallel: true,
|
|
||||||
sourceMap: false,
|
|
||||||
terserOptions: {
|
terserOptions: {
|
||||||
parse: {
|
parse: {
|
||||||
|
// we want terser to parse ecma 8 code. However, we don't want it
|
||||||
|
// to apply any minfication steps that turns valid ecma 5 code
|
||||||
|
// into invalid ecma 5 code. This is why the 'compress' and 'output'
|
||||||
|
// sections only apply transformations that are ecma 5 safe
|
||||||
|
// https://github.com/facebook/create-react-app/pull/4234
|
||||||
ecma: 8,
|
ecma: 8,
|
||||||
},
|
},
|
||||||
|
compress: {
|
||||||
|
ecma: 5,
|
||||||
|
warnings: false,
|
||||||
|
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||||
|
// https://github.com/facebook/create-react-app/issues/2376
|
||||||
|
// Pending further investigation:
|
||||||
|
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||||
|
comparisons: false,
|
||||||
|
},
|
||||||
|
mangle: {
|
||||||
|
safari10: true,
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
ecma: 5,
|
ecma: 5,
|
||||||
|
comments: false,
|
||||||
|
// Turned on because emoji and regex is not minified properly using default
|
||||||
|
// https://github.com/facebook/create-react-app/issues/2488
|
||||||
|
ascii_only: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Use multi-process parallel running to improve the build speed
|
||||||
|
// Default number of concurrent runs: os.cpus().length - 1
|
||||||
|
parallel: true,
|
||||||
|
// Enable file caching
|
||||||
|
cache: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user