Remove Ramba

This commit is contained in:
Andros Fenollosa 2020-07-04 16:23:54 +02:00
parent 58c4b546bb
commit d92f72fc73
4 changed files with 9 additions and 18 deletions

2
dist/ffnm.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -13,10 +13,6 @@ const concat = require('gulp-concat');
const SRC_PATH = 'src/';
const DIST_PATH = 'dist/';
const DIST_JS = 'ffnm.min.js';
const SRC_JS_VENDORS = [
'./node_modules/ramda/dist/ramda.min.js'
];
//===
// TASKS
@ -24,7 +20,7 @@ const SRC_JS_VENDORS = [
// JS concat + sourcemaps + babel + min
function js(cb) {
return src(SRC_JS_VENDORS.concat([SRC_PATH + 'core.js']))
return src([SRC_PATH + 'core.js'])
.pipe(sourcemaps.init())
.pipe(concat(DIST_JS))
.pipe(babel({

View File

@ -8,12 +8,7 @@
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify": "^3.0.2",
"ramda": "^0.27.0"
},
"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4"
"gulp-uglify": "^3.0.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"

View File

@ -17,15 +17,15 @@ function validateSyntax() {
// Check all event syntax
return EVENTS.map((event) => {
// Check element FUNCTION_TREE
return R.map((element) => {
return [...document.querySelectorAll(`[${event}]`)].map((element) => {
// Check KEY FUNCTION_TREE
return R.map((key) => {
return Object.keys(FUNCTION_TREE).map((key) => {
// Check METHODS FUNCTION_TREE
return R.map((method) => {
return FUNCTION_TREE[key].map((method) => {
return RegExp(`^${key}:${method}\\('\\w+', *'[#,.,a-zA-Z]\\w*'\\)$`).test(element.getAttribute(event));
}, FUNCTION_TREE[key]).some(method => method);
}, Object.keys(FUNCTION_TREE)).every(key => key);
}, document.querySelectorAll(`[${event}]`)).every(item => item);
}).some(method => method);
}).every(key => key);
}).every(item => item);
}).every(event => event);
}