Remove Ramba
This commit is contained in:
parent
58c4b546bb
commit
d92f72fc73
2
dist/ffnm.min.js
vendored
2
dist/ffnm.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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({
|
||||
|
@ -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"
|
||||
|
12
src/core.js
12
src/core.js
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user