lesca-click
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -7,3 +7,3 @@ "use strict"; | ||
deviation: 30, | ||
init: function init() { | ||
install: function install() { | ||
var _this = this; | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "lesca-click", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "replace click / touch start on SPY page", | ||
@@ -22,24 +22,24 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.46", | ||
"@babel/core": "^7.0.0-beta.46", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.46", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46", | ||
"@babel/preset-env": "^7.0.0-beta.46", | ||
"@babel/preset-react": "^7.0.0-beta.46", | ||
"autoprefixer": "^10.0.2", | ||
"babel-loader": "^8.0.0-beta.0", | ||
"concurrently": "^5.3.0", | ||
"css-loader": "^1.0.0", | ||
"@babel/cli": "^7.16.0", | ||
"@babel/core": "^7.16.0", | ||
"@babel/plugin-proposal-class-properties": "^7.16.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.16.0", | ||
"@babel/preset-env": "^7.16.4", | ||
"@babel/preset-react": "^7.16.0", | ||
"autoprefixer": "^10.4.0", | ||
"babel-loader": "^8.2.3", | ||
"concurrently": "^6.4.0", | ||
"css-loader": "^6.5.1", | ||
"file-loader": "^6.2.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"less": "^3.12.2", | ||
"less-loader": "^7.1.0", | ||
"postcss": "^8.1.7", | ||
"postcss-loader": "^4.0.4", | ||
"react": "^16.14.0", | ||
"react-dom": "^16.14.0", | ||
"style-loader": "^0.23.1", | ||
"webpack": "^4.6.0", | ||
"webpack-cli": "^3.1.2", | ||
"webpack-dev-server": "^3.1.3" | ||
"html-webpack-plugin": "^5.5.0", | ||
"less": "^4.1.2", | ||
"less-loader": "^10.2.0", | ||
"postcss": "^8.3.11", | ||
"postcss-loader": "^6.2.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"style-loader": "^3.3.1", | ||
"webpack": "^5.64.1", | ||
"webpack-cli": "^4.9.1", | ||
"webpack-dev-server": "^4.5.0" | ||
}, | ||
@@ -46,0 +46,0 @@ "author": "jamehsu1125 <jameshsu1125@gmail.com>", |
@@ -14,3 +14,3 @@ [![dev by JamesHsu](https://img.shields.io/badge/Dev%20by-Jameshsu1125-green)](https://github.com/jameshsu1125/) [![made in Taiwan](https://img.shields.io/badge/Made%20in-Taiwan-orange)](https://github.com/jameshsu1125/) | ||
Click.init(true, true); | ||
Click.install(true, true); | ||
@@ -24,11 +24,11 @@ Click.add('.target', (e) => { | ||
| method | options | description | default | | ||
| :---------------------------- | :------------: | :--------------------------------: | ------: | | ||
| init(clickEventAlso, install) | clickEventAlso | click event combine also | true | | ||
| | install | set on window.Click | true | | ||
| add(target, execution) | target | selector => ".target" or "#target" | | | ||
| | execution | call when target clicked | | | ||
| remove(target) | target | selector => ".target" or "#target" | | | ||
| clear() | | clear all functions | | | ||
| destory() | | remove all event | | | ||
| method | options | description | default | | ||
| :------------------------------- | :------------: | :--------------------------------: | ------: | | ||
| install(clickEventAlso, install) | clickEventAlso | click event combine also | true | | ||
| | install | set on window.Click | true | | ||
| add(target, execution) | target | selector => ".target" or "#target" | | | ||
| | execution | call when target clicked | | | ||
| remove(target) | target | selector => ".target" or "#target" | | | ||
| clear() | | clear all functions | | | ||
| destory() | | remove all event | | | ||
@@ -35,0 +35,0 @@ # Properties |
@@ -12,2 +12,6 @@ import React from 'react'; | ||
setTimeout(() => { | ||
Click.preventDefault = false; | ||
}, 1000); | ||
function Demo() { | ||
@@ -14,0 +18,0 @@ return ( |
@@ -5,3 +5,3 @@ module.exports = { | ||
deviation: 30, | ||
init(clickEventAlso = true, install = true, ex_down = () => {}, ex_move = () => {}, ex_up = () => {}) { | ||
install(clickEventAlso = true, install = true, ex_down = () => {}, ex_move = () => {}, ex_up = () => {}) { | ||
this.px = this.mx = 0; | ||
@@ -8,0 +8,0 @@ this.py = this.my = 0; |
@@ -12,8 +12,23 @@ const path = require('path'); | ||
rules: [ | ||
{ test: /\.(js|jsx)$/, use: 'babel-loader', exclude: /node_modules/ }, | ||
{ test: /\.css$/, use: ['style-loader', 'css-loader', 'postcss-loader'] }, | ||
{ test: /\.less$/, use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader'] }, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
use: 'babel-loader', | ||
exclude: /node_modules/, | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ['style-loader', 'css-loader', 'postcss-loader'], | ||
}, | ||
{ | ||
test: /\.less$/, | ||
use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader'], | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/, | ||
use: [{ loader: 'file-loader', options: { name: 'img/[path][name].[ext]', context: 'src/docs' } }], | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { name: 'img/[path][name].[ext]', context: 'src/docs' }, | ||
}, | ||
], | ||
}, | ||
@@ -31,6 +46,4 @@ ], | ||
devServer: { | ||
contentBase: path.join(__dirname, 'docs'), | ||
port: 8000, | ||
stats: 'minimal', | ||
}, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16753
404