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 SRC_PATH = 'src/';
|
||||||
const DIST_PATH = 'dist/';
|
const DIST_PATH = 'dist/';
|
||||||
const DIST_JS = 'ffnm.min.js';
|
const DIST_JS = 'ffnm.min.js';
|
||||||
const SRC_JS_VENDORS = [
|
|
||||||
'./node_modules/ramda/dist/ramda.min.js'
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
//===
|
//===
|
||||||
// TASKS
|
// TASKS
|
||||||
@ -24,7 +20,7 @@ const SRC_JS_VENDORS = [
|
|||||||
|
|
||||||
// JS concat + sourcemaps + babel + min
|
// JS concat + sourcemaps + babel + min
|
||||||
function js(cb) {
|
function js(cb) {
|
||||||
return src(SRC_JS_VENDORS.concat([SRC_PATH + 'core.js']))
|
return src([SRC_PATH + 'core.js'])
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(concat(DIST_JS))
|
.pipe(concat(DIST_JS))
|
||||||
.pipe(babel({
|
.pipe(babel({
|
||||||
|
@ -8,12 +8,7 @@
|
|||||||
"gulp-babel": "^8.0.0",
|
"gulp-babel": "^8.0.0",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-sourcemaps": "^2.6.5",
|
"gulp-sourcemaps": "^2.6.5",
|
||||||
"gulp-uglify": "^3.0.2",
|
"gulp-uglify": "^3.0.2"
|
||||||
"ramda": "^0.27.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.10.4",
|
|
||||||
"@babel/preset-env": "^7.10.4"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"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
|
// Check all event syntax
|
||||||
return EVENTS.map((event) => {
|
return EVENTS.map((event) => {
|
||||||
// Check element FUNCTION_TREE
|
// Check element FUNCTION_TREE
|
||||||
return R.map((element) => {
|
return [...document.querySelectorAll(`[${event}]`)].map((element) => {
|
||||||
// Check KEY FUNCTION_TREE
|
// Check KEY FUNCTION_TREE
|
||||||
return R.map((key) => {
|
return Object.keys(FUNCTION_TREE).map((key) => {
|
||||||
// Check METHODS FUNCTION_TREE
|
// 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));
|
return RegExp(`^${key}:${method}\\('\\w+', *'[#,.,a-zA-Z]\\w*'\\)$`).test(element.getAttribute(event));
|
||||||
}, FUNCTION_TREE[key]).some(method => method);
|
}).some(method => method);
|
||||||
}, Object.keys(FUNCTION_TREE)).every(key => key);
|
}).every(key => key);
|
||||||
}, document.querySelectorAll(`[${event}]`)).every(item => item);
|
}).every(item => item);
|
||||||
}).every(event => event);
|
}).every(event => event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user