npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

whs-plugin

v1.0.8

Published

Simple whitestormjs plugin

Downloads

8

Readme

Whitestorm.js plugin workflow

INSTRUCTION: Installation

  1. Fork this repository. (Or clone) or Duplicate it.
  2. Run npm install to install all dependencies.
  3. Rename this (forked) repository.
  4. Now you need to manage a package.json file:
  • Rename this package.

  • Reset version of package.

  • Write a description of your new plugin.

  • Change the author.

  • Don't forget to save it;)

INSTRUCTION: Development

  1. Run gulp dev in repo folder. This will watch all files you edit in src-examples(watched by examples:watch) and src(watched by webpack dev server) and automatically compile them.
  2. Open http://localhost:8080/basic/basic/ in browser. Now you should see a basic plugin that creates dynamic sphere shape with green material.
  1. Configure webpack with your new name. In webpack.config.babel.js:

  • filename is how webpack will name compiled file.
  • library is how webpack will export your plugin. We recommend using ['WHS', 'PluginName'] structure.
  1. Edit layout.html file in src-examples. It should point script tag to file compiled by webpack. (see step #4).


6. Edit files in src-examples folder.

  • They have structure [/ExamplesCategory/ExampleName/index.html].
  • index.html points to script.js file that is a WhitestormJS app.
  • All .html files + "script.js" are using swig for templating.
  • You can write es6 code. All "script.js" files are compiled by babel with es2015 perset.
  • You can use import for importing additional libraries from npm. If you want to import file from example's directory or assets folder - start import url from "./" where this folder means src-examples folder. Example: "./assets/terrain/default_terrain".
  • Folders libs and assets in src-examples are reserved.
    • libs folder contains additional scripts that your plugin depends for testing.
    • assets - additional images/models/sounds, etc.

INSTRUCTION: Publishing

As your package.json file is complete and plugin is written - you can publish it to NPM.

  1. Run npm publish.
  2. Profit!

FAQ

Q: I have already forked once and i want to create my second plugin but i'm not able to fork it again. How to deal with it?

A: Gtihub provides an instruction of duplicating repo In git:


$ git clone --bare https://github.com/WhitestormJS/whs-plugin.js.git
# Make a bare clone of the repository

$ cd whs-plugin.js.git
$ git push --mirror https://github.com/username/whs-newplugin.git
# Mirror-push to the new repository

$ git add remote upstream https://github.com/WhitestormJS/whs-plugin.js.git
# Add original as additional remotes for getting patches and updates.

$ cd ../
$ rm -rf whs-plugin.js.git

Then, if you want to apply new updates from whs-plugin.js, do:

$ git fetch upstream
$ git cherry-pick <sha1>
# <sha1> is a commit with update