Add ramda and gulpfile

This commit is contained in:
Andros Fenollosa
2020-07-02 10:40:34 +02:00
parent f4f1ea6572
commit 6ad8220681
8 changed files with 4302 additions and 70 deletions

32
src/core.js Normal file
View File

@@ -0,0 +1,32 @@
//===
// VARIABLES
//===
const EVENTS = ['i-click', 'i-scroll-up', 'i-scroll-down', 'i-hover'];
//===
// FUNCTIONS
//===
function validateSyntax() {
// Get every items from EVENTS
// Check all event syntax
return EVENTS.map((event) => {
return R.map((element) => {
console.log(element.getAttribute(event));
return /^${event}/.test(element.getAttribute(event));
}, document.querySelectorAll(`[${event}]`)).every(item => item);
}).every(event => event);
}
//===
// LINTER
//===
//===
// INIT
//===
validateSyntax();