Skip to content

processing/p5-tern.yuidoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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

About

Generates p5 Tern def file from source

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.5%
  • HTML 9.5%