Created
February 18, 2022 10:07
-
-
Save YangShunGit/b93a53c0d21947151a7598dde58d620e to your computer and use it in GitHub Desktop.
关于react 引入 psd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PSD from 'psd.js/dist/psd.min' | |
import demo from './demo.psd' | |
PSD.fromURL(demo).then(function(psd) { | |
console.log(psd.tree().export()) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install psd.js (直接npm install psd 引入的时候会报错) | |
link: https://github.com/meltingice/psd.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment