Skip to content

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

Open
lancejpollard wants to merge 2 commits into
meltingice:masterfrom
lancejpollard:publish-dist
Open

For PSD.js, publish dist folder instead of CoffeeScript for portability#293
lancejpollard wants to merge 2 commits into
meltingice:masterfrom
lancejpollard:publish-dist

Conversation

@lancejpollard

@lancejpollard lancejpollard commented Feb 1, 2024

Copy link
Copy Markdown

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

Comment thread lib/psd.coffee
# 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
Copy Markdown
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

lancejpollard commented Feb 1, 2024

Copy link
Copy Markdown
Author

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