mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 05:44:24 +00:00
build: resolve Quantize dep issue, upgrade Cypress
This commit is contained in:
13
cypress.config.js
Normal file
13
cypress.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { defineConfig } = require('cypress')
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
return require('./cypress/plugins/index.js')(on, config)
|
||||
},
|
||||
|
||||
experimentalRunAllSpecs: true,
|
||||
},
|
||||
})
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -8,7 +8,7 @@ function rgbCount(text) {
|
||||
return vals.length / 3
|
||||
}
|
||||
|
||||
describe('getColor()', function() {
|
||||
describe('getColor()', { testIsolation: false }, function() {
|
||||
before(function() {
|
||||
cy.visit('http://localhost:8080/cypress/test-pages/index.html');
|
||||
})
|
||||
BIN
cypress/videos/api.cy.js.mp4
Normal file
BIN
cypress/videos/api.cy.js.mp4
Normal file
Binary file not shown.
BIN
cypress/videos/cors.cy.js.mp4
Normal file
BIN
cypress/videos/cors.cy.js.mp4
Normal file
Binary file not shown.
BIN
cypress/videos/module.cy.js.mp4
Normal file
BIN
cypress/videos/module.cy.js.mp4
Normal file
Binary file not shown.
2
dist/color-thief.js
vendored
2
dist/color-thief.js
vendored
@@ -1,5 +1,5 @@
|
||||
const getPixels = require('get-pixels');
|
||||
const quantize = require('quantize');
|
||||
const quantize = require('@lokesh.dhakar/quantize');
|
||||
|
||||
function createPixelArray(imgData, pixelCount, quality) {
|
||||
const pixels = imgData;
|
||||
|
||||
2
dist/color-thief.min.js
vendored
2
dist/color-thief.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/color-thief.mjs
vendored
2
dist/color-thief.mjs
vendored
File diff suppressed because one or more lines are too long
1
dist/color-thief.modern.mjs
vendored
Normal file
1
dist/color-thief.modern.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/color-thief.umd.js
vendored
2
dist/color-thief.umd.js
vendored
File diff suppressed because one or more lines are too long
14774
package-lock.json
generated
14774
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@@ -32,23 +32,24 @@
|
||||
"watch": "microbundle watch --no-sourcemap",
|
||||
"dev": "http-server",
|
||||
"test": "mocha && cypress run --config video=false",
|
||||
"test:browser": "cypress open",
|
||||
"test:node": "mocha"
|
||||
"test:browser": "./node_modules/.bin/cypress run --headed --browser chrome",
|
||||
"test:node": "mocha",
|
||||
"cypress": "./node_modules/.bin/cypress open"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@node-minify/core": "^4.0.5",
|
||||
"@node-minify/uglify-es": "^4.0.5",
|
||||
"chai": "^4.2.0",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"cypress": "^3.4.0",
|
||||
"cypress": "^12.6.0",
|
||||
"eslint": "^5.16.0",
|
||||
"http-server": "^0.11.1",
|
||||
"microbundle": "^0.11.0",
|
||||
"microbundle": "^0.15.0",
|
||||
"mocha": "^6.2.0",
|
||||
"mustache": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"get-pixels": "^3.3.2",
|
||||
"quantize": "github:lokesh/quantize"
|
||||
"@lokesh.dhakar/quantize": "^1.3.0",
|
||||
"get-pixels": "^3.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const getPixels = require('get-pixels');
|
||||
const quantize = require('quantize');
|
||||
const quantize = require('@lokesh.dhakar/quantize');
|
||||
|
||||
function createPixelArray(imgData, pixelCount, quality) {
|
||||
const pixels = imgData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import quantize from '../node_modules/quantize/dist/index.mjs';
|
||||
import quantize from '../node_modules/@lokesh.dhakar/quantize/dist/index.mjs';
|
||||
import core from './core.js';
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user