Merge branch 'update-compilation-2020' of github.com:locomotivemtl/locomotive-boilerplate into update-compilation-2020
This commit is contained in:
@@ -12,9 +12,5 @@ trim_trailing_whitespace = true
|
||||
[*.{md,markdown}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{*.yml,*.json}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[*.{ms,mustache}]
|
||||
insert_final_newline = false
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
| ---------- | ------- |
|
||||
| ---------- | -------- |
|
||||
| [Node] | > 14.15 |
|
||||
|
||||
[Node]: https://nodejs.org/en/
|
||||
|
||||
You can use [nvm](https://github.com/nvm-sh/nvm) to install the node version in `.nvmrc`.
|
||||
|
||||
@@ -7,7 +7,6 @@ export default class extends module {
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
const load = new modularLoad({
|
||||
enterDelay: 0,
|
||||
transitions: {
|
||||
|
||||
@@ -7,7 +7,6 @@ export default class extends module {
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
this.scroll = new LocomotiveScroll({
|
||||
el: this.el,
|
||||
smooth: true
|
||||
|
||||
@@ -9,18 +9,14 @@ export function concatVendors() {
|
||||
// Get all files in scripts/vendors/
|
||||
const files = fs.readdirSync(paths.scripts.vendors.src);
|
||||
|
||||
// Extract no-JS files
|
||||
var jsFiles = files.filter((f)=>{
|
||||
if(f.includes('.js')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
// Exclude files that are not JavaScript
|
||||
var jsFiles = files.filter((file) => {
|
||||
return file.includes('.js');
|
||||
});
|
||||
|
||||
// Add absolute path
|
||||
jsFiles = jsFiles.map((f) => {
|
||||
return `${paths.scripts.vendors.src + f}`;
|
||||
// Prepend absolute path
|
||||
jsFiles = jsFiles.map((file) => {
|
||||
return `${paths.scripts.vendors.src + file}`;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,14 @@ export function generateSpriteSVG() {
|
||||
console.time('Sprite generated in');
|
||||
|
||||
// Write sprite content on disk
|
||||
mixer([paths.svgs.src + '*.svg'], {spriteConfig: { usages: false }})
|
||||
.then((result) => {
|
||||
mixer([
|
||||
paths.svgs.src + '*.svg'
|
||||
], {
|
||||
spriteConfig: {
|
||||
usages: false
|
||||
}
|
||||
}).then((result) => {
|
||||
result.write(paths.svgs.dest + 'sprite.svg');
|
||||
message('SVG Sprite generated', 'success', 'Sprite generated in');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,19 +2,16 @@
|
||||
import kleur from 'kleur';
|
||||
|
||||
export default function message(text, type, timerId) {
|
||||
|
||||
if(type === 'success') {
|
||||
if (type === 'success') {
|
||||
console.log(kleur.bgGreen().black(`${text} ✅`));
|
||||
|
||||
if(timerId !== undefined) {
|
||||
if (timerId !== undefined) {
|
||||
console.timeEnd(timerId)
|
||||
}
|
||||
} else if (type === 'error') {
|
||||
console.log(kleur.red().underline(`${text} ❌`));
|
||||
|
||||
} else if (type === 'waiting') {
|
||||
|
||||
console.log(kleur.blue().italic(`${text} ⏱ `));
|
||||
console.log(kleur.blue().italic(`${text} ⏱`));
|
||||
} else {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user