Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For PSD.js, publish dist folder instead of CoffeeScript for portability #293

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lancejpollard
Copy link

@lancejpollard lancejpollard commented Feb 1, 2024

This will fix #287 I think, or something like this.

@@ -38,6 +38,7 @@ module.exports = class PSD extends Module
# the PSD object. However, if you already have the PSD data stored as a Uint8Array,
# you can instantiate the PSD object directly.
constructor: (data) ->
super()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to do this to resolve errors such as:

ERROR in ./lib/psd/blend_mode.coffee
Module build failed (from ./node_modules/coffee-loader/dist/cjs.js):
CoffeeScriptError: ./psd.js/lib/psd/blend_mode.coffee:43:5: error: Can't reference 'this' before calling super in derived class constructors
    @blendKey = null
    ^
    at Object.loader (./psd.js/node_modules/coffee-loader/dist/index.js:33:14)
 @ ./lib/psd/layer/blend_modes.coffee 3:12-43
 @ ./lib/psd/layer.coffee 71:17-54
 @ ./lib/psd/layer_mask.coffee 7:8-33
 @ ./lib/psd.coffee 34:12-46

@lancejpollard
Copy link
Author

lancejpollard commented Feb 1, 2024

I'm getting {} when logging Psd from import Psd from '@lancejpollard/psd' when I try this, so not sure, any recommendations after seeing what my PR tries to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can I use psd.js directly in my browser?
1 participant