mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 05:44:24 +00:00
feat: Add module support with new dist files
- `/dist/color-thief.umd.js`: UMD module. For simple script tag loading that exposes a global variable or for RequireJS AMD support. - `/dist/color-thief.js`: CommonJS module. Entry point for Node.js and Browserify. - `/dist/color-thief.mjs`: ES6 module. For modern browsers as well as Webpack and Rollup. - `/dist/color-thief.min.js`: Duplicate of `/dist/color-thief.umd.js`. Kept around to maintain backwards compatibility.
This commit is contained in:
11
package.json
11
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "colorthief",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"author": {
|
||||
"name": "Lokesh Dhakar",
|
||||
"email": "lokesh.dhakar@gmail.com",
|
||||
@@ -22,18 +22,23 @@
|
||||
"url": "https://github.com/lokesh/color-thief.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"source": "src/color-thief.js",
|
||||
"main": "dist/color-thief.js",
|
||||
"module": "dist/color-thief.mjs",
|
||||
"umd:main": "dist/color-thief.umd.js",
|
||||
"amdName": "ColorThief",
|
||||
"scripts": {
|
||||
"build": "node ./build/build.js",
|
||||
"build": "microbundle; node ./build/build.js",
|
||||
"dev": "./node_modules/http-server/bin/http-server",
|
||||
"test": "./node_modules/.bin/cypress open"
|
||||
},
|
||||
"main": "dist/color-thief.min.js",
|
||||
"devDependencies": {
|
||||
"@node-minify/core": "^4.0.5",
|
||||
"@node-minify/uglify-es": "^4.0.5",
|
||||
"cypress": "^3.4.0",
|
||||
"eslint": "^5.16.0",
|
||||
"http-server": "^0.11.1",
|
||||
"microbundle": "^0.11.0",
|
||||
"mustache": "^3.0.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user