Code Monkey home page Code Monkey logo

p5-tern.yuidoc's Introduction

Generates Tern def file for p5.js from source by using yuidoc. A fork of @angelozerr's tern.yuidoc.

Background info on the p5 Tern def project

Here

Use

  1. Clone the repository with git clone [email protected]:kaganjd/tern.yuidoc.git
  2. Install dependencies with npm install
  3. Put the p5.js data.json file in the project root
  4. Run grunt tasks with grunt
  5. One of the grunt tasks starts a local server. When the tasks are complete, manually kill the server with ctrl + c

Grunt tasks

  • grunt replace matches and removes <p> and </p> tags in the data.json, then saves the updated file in temp/
  • grunt file_append prepends "var yuiDoc =" to temp/data.json
  • grunt rename moves temp/data.json to generator/ and renames it yui.data.json.js so it can be read by the generator script
  • grunt connect starts a server so we can generate the Tern def file in the browser. A script in the HTML file automatically downloads the generated file.

Running just grunt automatically runs all four tasks, but you can choose to run one at a time.

Structure

The basic structure of the project is given in the following way:

  • data.json in the project root is the starting file; you can get it at https://p5js.org/reference/data.json
  • generator/ generates YUI tern plugin from yuidoc data.json by using HTML pages
  • lib/ scripts to transform yuidoc data.json to Tern def

p5-tern.yuidoc's People

Contributors

angelozerr avatar gamerson avatar kaganjd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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