Coder Social home page Coder Social logo

blade's Introduction

Blade V0.0.1

Blade is a Sketch 3 plugin for automatically HTML generating. It will generate tag <div> for group, tag <p> for text , etc.

##Notice##

  • This plugin works for latest Sketch beta or version above 3.0.3(7882) !!!.
  • This version is more stable now, but may still have problem with mega size sketch file.
  • Please group all you layer in one group and place it at coordinate (0,0) as the demo shows. - It does not work with artboard for now.

##Quick start##

  • Clone or download the repo.
  • Place everything in dist folder into your sketch plugin folder.Where are sketch plugins?
  • Group all your layer in one group and run blade.
  • Blade will generate a new folder just in the same folder in which you put your sketch file.

##Amazing features##

I uploaded a demo sketch file and the generated HTML files which shows some magic. Have a quick look here:

###1. My sketch file:

You may notice the special layer names such as [btn] or input[text]. [***] is what I called directive, similar to AngularJS's directive. The directive will tell blade what kind of dom element should be generate or this layer. And some powerful directives may generate scripts to make element interactive.

###2. The Generated HTML:

As it shows, blade generate a input element for the layer which name is input[text] and a button for [btn].

###3. What does [case] do?:

Press shift key down on the web page, then you will see the green border and two tabs, each one was generated for the layer which has directive [case]. Click the tab(don't release the shift before click) then you can change which should show as below:

##What's next?##

build-in directives:

  • case
  • btn
  • center
  • width
  • height
  • ignore
  • a
  • checkbox
  • hover
  • alert
  • password
  • select
  • textarea
  • closeable

I will continue write magic tags for blade, and trying to integrate AngularJS to help build better prototype。

##How to contribute?##

  • Install nodejs and gulp.
  • Enter into the repo folder and run gulp, then gulp will watch all the files in src and automatically build it into dist folder.
  • please feel free to contact me at any time if you have problem.

blade's People

Contributors

sskyy avatar

Watchers

 avatar

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.