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

dilithium

v0.2.3

Published

Dart project generator

Downloads

83

Readme

==< dilithium: li2 >==

dilithium

Dart Library - use yaml to configure play_phaser assets.

Dart Framework Classes

  • Dilithium - Game application class

  • Li2Assets - * load assets listed in config.yaml

  • Li2Boot - * set device params, load splash screen

  • Li2Button - Button+Text component

  • Li2Config - ** Wraps the config.yaml

  • Li2State - Add dilithium methods to the State class

  • Li2Template - Wraps the embedded Liquid Template engine

    • = Auto invoked by dilithium ** = Populated by dilithium

li2

A project template generator using Liquid templates. Li2 was created to generate dilithium projects but could be used for many other programming languages.

Think jekyll, but for code.

Currently, there are 5 templates:

  • default - a port of phaser_tutorial_02 to dart
  • dartemis - a port of phaser_tutorial_02 using dartemis
  • dilithium - an empty scaffold using dilithium
  • match3 - demo game using dilithium
  • coffee/pirate - demo in coffee-script

Quickstart

Install

$ sudo npm install dilithium -g

Create a new Dart project

$ li2 create game -t default
$ cd game
$ pub get
$ pub serve

Inject yaml config into application:

void main() {

  Dilithium
  .using("packages/appname/res")
  .then((config) => new App(config));

}

class App extends Dilithium {

  App(config) : super(config);

}

Usage

Usage:
  li2 create PATH [project -t name | <path>]
  li2 set --option "value"
  li2 set --source +.java --source -.dart

  set values are saved in ~/.dilithium.json

Options:
  -h  [--help]        # display this message
  -t  [--template]    # new project template, defaults to 'default'
  -v  [--version]     # display version
  -a  [--author]      # set author
  -c  [--copyright]   # set copyright
  -d  [--description] # set description
  -l  [--license]     # set license text
  -s  [--source]      # set filetype to be source template
  -w  [--webpage]     # set home page

What Next?

Copy /usr/lib/node_modules/dilithium/templates/default somewhere, and make your own template. Use flag --template path/to/template to specify your custom template.

Templates use Liquid syntax. The following variables are available:

  • project.name
  • project.libname
  • project.author
  • project.copyright
  • project.description
  • project.homepage
  • project.license
  • project.source

Templates can be used in path names. For example, in a project named 'Demo', a template file named {{project.name}}.dart is transformed into Demo.dart