Skip to content

Instantly share code, notes, and snippets.

@YangShunGit
Created February 18, 2022 10:07
Show Gist options
  • Save YangShunGit/b93a53c0d21947151a7598dde58d620e to your computer and use it in GitHub Desktop.
Save YangShunGit/b93a53c0d21947151a7598dde58d620e to your computer and use it in GitHub Desktop.
关于react 引入 psd.js
import PSD from 'psd.js/dist/psd.min'
import demo from './demo.psd'
PSD.fromURL(demo).then(function(psd) {
console.log(psd.tree().export())
});
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