Comments (4)
Update, I get the same error using the latest version of the files too, ie:
https://github.com/One-com/one-color/blob/master/one-color.js
https://github.com/bebraw/colorjoe/blob/master/dist/colorjoe.js
ERROR in ./src/js/colorjoe.js
Module not found: Error: Can't resolve 'ONECOLOR' in 'C:\Users\Me\Documents\my_repo\src\js'
@ ./src/js/colorjoe.js 9:8-11:10
So I tried using the following src
files instead of the dist
file:
https://github.com/bebraw/colorjoe/blob/master/src/colorjoe.js
https://github.com/bebraw/colorjoe/blob/master/src/extras.js
https://github.com/bebraw/colorjoe/blob/master/src/utils.js
Import statements are now:
import one from './one-color';
import extras from './extras';
import utils from './utils';
import colorjoe from './colorjoe';
And now I get error on frontend in chrome dev tools:
Uncaught ReferenceError: extras is not defined at eval (webpack:///./src/js/colorjoe.js?:75)
Relevant code there is:
for (var k in extras) {
colorjoe.registerExtra(k, extras[k]);
}
https://github.com/bebraw/colorjoe/blob/master/src/colorjoe.js#L73
from colorjoe.
I'm not sure if this is the issue as I know very little about webpack
...
I saw in the above code snippet, extras
hadn't been defined, so I just copied all content from the extras
file and pasted it at the top of the colorjoe
file (in https://github.com/bebraw/colorjoe/tree/master/src).
The error went away, but I'm still not sure if colorjoe will work as I am still troubleshooting other issues.
from colorjoe.
Now I get errors like:
Uncaught TypeError: _colorjoe2.default.hsl is not a function
triggered by the webpack
generated code:
global.joe = _colorjoe2.default.hsl('hslPicker', color, ['currentColor', ['fields', { space: 'RGB', limit: 255, fix: 2 }]]);
which is like this in the source:
global.joe = colorjoe.hsl('hslPicker', color, ['currentColor', ['fields', { space: 'RGB', limit: 255, fix: 2 }]]);
from colorjoe.
Hi,
I repackaged the whole thing. You should be able to consume it from npm directly now. It comes with the extras too although the API can likely be improved further.
from colorjoe.
Related Issues (20)
- Include onecolor via require()? HOT 2
- findPos incorrect offset when used with perfectScrollbar HOT 17
- Enter hex number in HTML form HOT 2
- Hex et RGB color HOT 8
- How to access colorjoe without using a global variable? HOT 3
- Rightjs color picker site in Readme gives 404 Error
- one.color undefined HOT 5
- Feature: allow transparent (null) values HOT 1
- PALETTE BUG!!! Wrong CMYK code of colors in palette HOT 3
- Renamed onecolor to ONECOLOR but not everywhere HOT 6
- demo gives Uncaught TypeError: ONECOLOR is not a function HOT 3
- Added non-passive event listener to a scroll-blocking 'touchstart' event HOT 1
- Propose Logo HOT 10
- Issue when using the MVC/Bootstrap default template HOT 2
- Change CMYKA input not working HOT 1
- Import colorjoe using 'import' keyword HOT 1
- Issue with function RGB_BG for HSL HOT 1
- Click is not working always on HSL HOT 4
- Orientation of sliders HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorjoe.