Code Monkey home page Code Monkey logo

picasso's Issues

使用master版本,编译picasso-parse后把结果覆盖到@wubafe,结果和编译前不一致

复现步骤:
1.下载master版本 npm i (3.9下载)
2.在sketch导出html,可以看到html有多层的树结构(能区分出多个Row)
image

3.进入picasso-package/packages/picasso-parse
4.npm run tsc 后,把dist内的内容,覆盖到 node_modules/@wubafe/picasso-parse/dist
5.重新导出html,发现不能区分多个Row了

image

怀疑是否原@wubafe内的源代码和master下的代码不一致,求前辈帮忙!
非常感谢!

picasso项目md文档 应该有截图

md文档只有文字表述,没有截图及产品界面,或者简单gif动画 怎么操作,让用户git clone前 可以看到怎么工作运行的

自行构建picasso-package下的包,打包后报错

尝试了自行构建picasso-package下的包,以替换主工程使用的 @wubafe/picasso-parse依赖,结果构建完插件,运行报了如下错误:
微信图片_20220210162257
操作步骤如下:
1、进入picasso-package,跑lerna bootstrap 和 lerna run build命令构建完各依赖包
2、进入到主工程的package.json下修改 dependencies的@wubafe/picasso-parse:"0.0.35" 为
微信图片_20220210162549
3、运行 npm run dev构建插件
构建完成后安装插件使用报最上面错误
其中第二步试过用npm link也会报一样的错误

环境:
node 12.16.2
sketch 82

React Native 属性使用

Sketch 转出来的代码,样式中有嵌套,实际RN是不支持嵌套的,这个你们实际使用是怎么用的呢?
const styles = StyleSheet.create({
"submit": {
"textStyle": {
"lineHeight": scaleSize(22),
"textAlign": "left",
"color": {
"alpha": 1,
"red": 51,
"green": 51,
"blue": 51
},
"fontSize": scaleSize(16),
"fontFamily": "Avenir-Medium",
"fontWeight": 500
},
"marginTop": scaleSize(-23)
}
})

[Feature Request] 直接解析 sketch 文件而不是使用 sketch 插件

个人感觉开发更习惯使用代码操作
如果可以直接解析 sketch 文件,可以配合脚本进行自动化操作

skeditor 是使用 jszip 解析 sketch 文件然后借助 skia 将图层使用 canvas 画到网页上。
我看源码部分,很多逻辑是和 sketch 运行环境强相关,没有解耦开,不是很好处理
咱们后续是否有计划支持直接解析 sketch 文件呀?

XML code re-inverted to sketch file.

Thanks for your excellent work.
After I achieved the XML or HTML code from Picasso, how to re-converted it to sketch file.

Thanks in advance.

Installed on Ubuntu but not working

  • Installation
$ npm install -g @wubafe/picasso
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
$HOME/bin/picasso -> $HOME/lib/node_modules/@wubafe/picasso/bin/index.js

> [email protected] install $HOME/lib/node_modules/@wubafe/picasso/node_modules/images
> node scripts/nothing.js


> [email protected] install $HOME/lib/node_modules/@wubafe/picasso/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-64_binding.node
...
gyp info ok
Installed to $HOME/lib/node_modules/@wubafe/picasso/node_modules/node-sass/vendor/linux-x64-64/binding.node
+ @wubafe/[email protected]
added 221 packages from 182 contributors in 1478.519s
  • Try it
$ picasso -s ../mysample.sketch
sketch源文件路径 $HOME/mysample.sketch
解析生成代码存放目录 $HOME
/bin/sh: 1: /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool: not found
(node:15122) UnhandledPromiseRejectionWarning: Error: Command failed: /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool -v
/bin/sh: 1: /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool: not found

    at checkExecSyncError (child_process.js:629:11)
    at Object.execSync (child_process.js:666:13)
    at module.exports ($HOME/lib/node_modules/@wubafe/picasso/src/index.js:158:41)
    at $HOME/lib/node_modules/@wubafe/picasso/bin/index.js:44:11
    at Object.<anonymous> ($HOME/lib/node_modules/@wubafe/picasso/bin/index.js:45:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
(node:15122) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:15122) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.