GithubHelp home page GithubHelp logo

uwings / style-dictionary-web Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stevenpetryk/style-dictionary-web

0.0 0.0 0.0 103 KB

Making Style Dictionary run in the browser

TypeScript 68.03% HTML 31.97%

style-dictionary-web's Introduction

Style Dictionary Web

A really simple example of running Style Dictionary live, in the browser, using Parcel.

The main strategy for getting it to run is the following:

  • Alias all Node-specific packages to browser-friendly polyfills
    • Notably, memfs is used to replace fs so that we can give Style Dictionary a fake filesystem to work with, and allowing us to extract what was written.
  • Patch Style Dictionary to avoid JSON5 (using patch-package)

This felt a lot easier than the approach recommended by the creators of Style-Dictionary-Play, mostly because it doesn't require a fork of Style Dictionary.

The Style Dictionary itself is really simple—just a single token.

Scripts

  • yarn start-node builds the Style Dictionary from Node (the normal way).
  • yarn start-web starts a live-reloading webapp that runs Style Dictionary on the frontend.

style-dictionary-web's People

Contributors

stevenpetryk 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.