rasti 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rasti",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Minimalistic JavaScript MV library for building user interfaces.",
5
5
  "main": "lib/index.js",
6
6
  "jsnext:main": "es/index.js",
@@ -12,11 +12,11 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "clean": "rimraf lib dist es",
15
- "build": "npm run build:commonjs && npm run build:umd && npm run build:umd:min && npm run build:es",
15
+ "build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
16
16
  "prepare": "npm run clean && npm run test && npm run build",
17
17
  "posttest": "npm run lint",
18
18
  "lint": "eslint src test",
19
- "test": "cross-env BABEL_ENV=commonjs mocha --require babel-core/register --require jsdom-global/register --reporter nyan test/*.js",
19
+ "test": "cross-env BABEL_ENV=commonjs mocha --require @babel/register --require jsdom-global/register --reporter nyan test/*.js",
20
20
  "build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
21
21
  "build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
22
22
  "build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack",
@@ -37,40 +37,40 @@
37
37
  "author": "Alberto Masuelli <alberto.masuelli@gmail.com> (https://github.com/8tentaculos)",
38
38
  "license": "MIT",
39
39
  "devDependencies": {
40
- "babel-cli": "^6.26.0",
41
- "babel-core": "^6.26.3",
42
- "babel-eslint": "^8.2.6",
43
- "babel-loader": "^7.1.5",
44
- "babel-plugin-check-es2015-constants": "^6.22.0",
45
- "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
46
- "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
47
- "babel-plugin-transform-es2015-block-scoping": "^6.26.0",
48
- "babel-plugin-transform-es2015-classes": "^6.24.1",
49
- "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
50
- "babel-plugin-transform-es2015-destructuring": "^6.23.0",
51
- "babel-plugin-transform-es2015-for-of": "^6.23.0",
52
- "babel-plugin-transform-es2015-function-name": "^6.24.1",
53
- "babel-plugin-transform-es2015-literals": "^6.22.0",
54
- "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
55
- "babel-plugin-transform-es2015-object-super": "^6.24.1",
56
- "babel-plugin-transform-es2015-parameters": "^6.24.1",
57
- "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
58
- "babel-plugin-transform-es2015-spread": "^6.22.0",
59
- "babel-plugin-transform-es2015-sticky-regex": "^6.24.1",
60
- "babel-plugin-transform-es2015-template-literals": "^6.22.0",
61
- "babel-plugin-transform-es2015-unicode-regex": "^6.24.1",
62
- "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
63
- "babel-plugin-transform-es3-property-literals": "^6.22.0",
64
- "chai": "^4.3.6",
65
- "cross-env": "^5.2.0",
66
- "eslint": "^8.25.0",
67
- "jsdoc-to-markdown": "^7.0.0",
68
- "jsdom": "20.0.1",
40
+ "@babel/cli": "^7.22.5",
41
+ "@babel/core": "^7.22.5",
42
+ "@babel/eslint-parser": "^7.22.5",
43
+ "@babel/plugin-transform-arrow-functions": "^7.22.5",
44
+ "@babel/plugin-transform-block-scoped-functions": "^7.22.5",
45
+ "@babel/plugin-transform-block-scoping": "^7.22.5",
46
+ "@babel/plugin-transform-classes": "^7.22.5",
47
+ "@babel/plugin-transform-computed-properties": "^7.22.5",
48
+ "@babel/plugin-transform-destructuring": "^7.22.5",
49
+ "@babel/plugin-transform-for-of": "^7.22.5",
50
+ "@babel/plugin-transform-function-name": "^7.22.5",
51
+ "@babel/plugin-transform-literals": "^7.22.5",
52
+ "@babel/plugin-transform-member-expression-literals": "^7.22.5",
53
+ "@babel/plugin-transform-modules-commonjs": "^7.22.5",
54
+ "@babel/plugin-transform-object-super": "^7.22.5",
55
+ "@babel/plugin-transform-parameters": "^7.22.5",
56
+ "@babel/plugin-transform-property-literals": "^7.22.5",
57
+ "@babel/plugin-transform-shorthand-properties": "^7.22.5",
58
+ "@babel/plugin-transform-spread": "^7.22.5",
59
+ "@babel/plugin-transform-sticky-regex": "^7.22.5",
60
+ "@babel/plugin-transform-template-literals": "^7.22.5",
61
+ "@babel/plugin-transform-unicode-regex": "^7.22.5",
62
+ "@babel/register": "^7.22.5",
63
+ "babel-loader": "^9.1.2",
64
+ "chai": "^4.3.7",
65
+ "cross-env": "^5.2.1",
66
+ "eslint": "^8.43.0",
67
+ "jsdoc-to-markdown": "^8.0.0",
68
+ "jsdom": "^22.1.0",
69
69
  "jsdom-global": "3.0.2",
70
- "mocha": "^10.0.0",
71
- "rimraf": "^3.0.2",
72
- "webpack": "^4.34.0",
73
- "webpack-cli": "^3.3.4"
70
+ "mocha": "^10.2.0",
71
+ "rimraf": "^5.0.1",
72
+ "webpack": "^5.88.1",
73
+ "webpack-cli": "^5.1.4"
74
74
  },
75
75
  "directories": {
76
76
  "example": "example",
package/src/View.js CHANGED
@@ -247,10 +247,9 @@ export default class View extends Emitter {
247
247
 
248
248
  Object.keys(eventTypes).forEach(type => {
249
249
  let self = this;
250
- let typeListener = function(event) {
251
- eventTypes[type].forEach(function({ selector, listener }) {
252
- if ((!selector && self.el === event.target) ||
253
- (indexOf.call(self.el.querySelectorAll(selector), event.target) > -1)) {
250
+ let typeListener = function (event) {
251
+ eventTypes[type].forEach(function ({ selector, listener }) {
252
+ if (indexOf.call(selector ? self.el.querySelectorAll(selector) : [self.el], event.target) > -1) {
254
253
  listener(event, self);
255
254
  }
256
255
  });