Coder Social home page Coder Social logo

protofarer / pixijs.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixijs/pixijs.com

0.0 0.0 0.0 94.11 MB

Home Page: https://pixijs.com

Shell 0.01% JavaScript 90.77% TypeScript 6.03% CSS 0.08% HTML 0.04% GLSL 0.91% SCSS 1.98% WGSL 0.18%

pixijs.com's Introduction

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ npm i

Local Development

$ npm start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ npm build

This command generates static content into the build directory and can be served using any static contents hosting service.

Working with Content

Core content on the website is within the working docs directory and can have various versions that were snapshot and copied over into the versioned_docs directory.

Core content consists of:

  • Guides
  • Examples
  • Tutorials

Guides

These are static markdown pages that can be added and edited directly within the docs/guides directory.

Examples

These are markdown compilations of the JS files on the src/examples directory. They are also versioned to match the versions of the docs snapshots. If the exact version of the example is not found, it will fallback to the best-matched most recent version of the examples. be Only the docs/examples/index.md entry point can be altered, but the examples themselves should be worked on from within the src/examples/{version} directories. Once updated, the command below can be called to generate out the markdown compilations of the examples.

$ npm run generate-example-docs

This command will trigger example markdowns generation on all of the docs directories altogether, both the working docs directory and the versioned docs directories.

Note: The examples within the docs version active on the website will be shown on the drop-down menu on the Playground page to serve as starting points for users to explore PixiJS features to their heart's content

Tutorials

These also markdown compilations of groups of files on the src/tutorials directory. Each tutorial group consists of a number of steps where each step contains a JS code file accompanied by an instruction markdown file, and a separate completed JS code file if there is a next step to proceed towards. These completed code can be toggled on/off from the instruction card of the corresponded step. Like the examples, these are also versioned to match the versions of the docs snapshots and will fallback to the best-matched most recent version of the tutorials if the exact version is not found. Only the docs/tutorials/index.md entry point can be altered, but the tutorial groups themselves should be worked on from within the src/tutorial/{version} directories. Once updated, the command below can be called to generate out the markdown compilations of the tutorial groups.

$ npm run generate-tutorial-docs

This command will trigger tutorial markdowns generation on all of the docs directories altogether, both the working docs directory and the versioned docs directories.

Workflow

$ npm start

The local development command will also trigger the generate-content command which, in turns, calls the generate-example-docs script and generate-tutorial-docs script respectively. Since the compiled markdown pages contain dynamic components, changes within the examples source or the tutorials source will be reflected on hot reloads.

However, when adding or removing tutorials or examples, please make sure to re-do npm start or run generate-content manually to keep the markdown pages of these content up-to-date.

Versioning

Docs versioning is native to Docusaurus, but to make it easier to manage it is coupled with the PixiJS version. A pixi-version.json is required on the working docs directory to create a versioned snapshot of the docs. This can be generated and altered using the following command:

$ npm run generate-pixi-version-config

The command will retrieve the up-to-date versions and tags from PixiJS and display out as an interactive list for selection.

Once satisfied with the state of the working docs and wanting to create a snapshot to make way for another upcoming version, the following command can be called:

$ npm run create-docs-version-snapshot

This will copy everything from the working docs into its own directory within the versioned_docs directory and named correspondingly to the version number from the encapsulated pixi-version.json, if chosen to be created as a specific version snapshot. If chosen to be snapshot as a generic version then the version key will be simplified to {major}.x (eg. 7.x). Generic version snapshot is recommended over the specific one for maintaining major docs, but for a major version where multiple versions of docs are needed then the ability to create specific version snapshots can be handy. The command will also trigger update-global-version-config script which adds the pixi version config to the master pixi-versions.json on the root and alter the version config on the docusaurus.config.js accordingly. Docusaurus will also add the version to its versions.json file on the root.

An existing docs snapshot can be removed using the following command:

$ npm run remove-docs-version-snapshot

Or can have its pixi version config altered to another version using the command:

$ npm run switch-snapshot-pixi-version-config

where both come with an interactive list of all the snapshots for selection to be actioned on accordingly.

The update-pixi-version-configs script is also called pre-build and pre-deploy to update all the outdated labels or metadata on the pixi-version.json config on all the docs directories.

pixijs.com's People

Contributors

zyie avatar baseten avatar goodboydigital avatar vikpe avatar cyberdex avatar bbazukun123 avatar bigtimebuddy avatar javitrek avatar supersodasea avatar naramdash avatar 3mdistal avatar korve avatar chriscoastal avatar eduardpeters avatar f-star avatar ganevdev avatar jcpurger avatar creativoma avatar sawyerpollard avatar thalys avatar aduros-alt avatar tisilent 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.