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

generator-dojo

v0.3.0

Published

A generator for Yeoman

Downloads

7

Readme

Dojo generator Build Status

A Dojo application generator for Yeoman.

Getting started

  • Make sure you have yo and generator-dojo installed:

    npm install -g yo generator-dojo
  • Make a new directory and traverse into it:

    mkdir my-app && cd $_
  • Run yo dojo, optionally passing an application name (the application name and AMD package will default to the directory you are currently in):

    yo dojo [app-name]

Application layout

generator-dojo will scaffold out a Dojo application using best practices for web development. This means the directory structure for development will be in the same structure as it would be after building for production:

src/
    dojo/
    dijit/
    dgrid/
    ...
    my-app/
    index.html

Because of this structure, a Dojo application is completely agnostic to the server which delivers it in both development and production environments and requires little to no configuration of the server. It will work equally as well with nginx as it would with Apache Tomcat.

Generators

Dojo

Sets up a new Dojo application, generating all of the boilerplate to get started. The application generator also optionally installs Dijit, DojoX, dgrid, and Stylus.

Example:

yo dojo

Test

Generates a unit or functional test for Intern and places it in src/<appname>/tests/<test name>.{js,html}. Optionally receives a --functional flag. If the flag is passed, a functional test is generated, otherwise a unit test is generated.

Example:

yo dojo:test --functional widgets/functional/MyWidget

Produces src/<appname>/tests/widgets/functional/MyWidget.js and src/<appname>/tests/widgets/functional/MyWidget.html.

Example:

yo dojo:test widgets/MyWidget

Produces src/<appname>/tests/widgets/MyWidget.js.

Grunt tasks

The default Gruntfile.js defines some common tasks for your Dojo application:

default

Compiles and watches for changes to changes in stylus files, compiling them if necessary.

build

Compiles your application into the dist directory using the Dojo build tool. The dist directory can then be copied, zipped, tarred, warred, etc. to a production server without the need for complex configuration of the server: it's just a directory of static files!

server

Serves up the src directory as the root directory of localhost:8888 (this can be configured using the connect.options.port option in Gruntfile.js). This also watches for changes to stylus files, compiling them if necessary.

server also takes an optional target flag. If this flag is dist, a build will run and the dist directory will be served as the root directory of localhost:8888:

grunt server:dist

intern

Runs unit and functional tests using Intern. Intern allows web developers to run unit and functional tests in various versions of browsers from the command line.

This task takes an optional target flag. If this flag is local, only local non-browser tests will be run. If this flag is remote, only remote tests will be run using Selenium (via SauceLabs or your own Selenium server). If this flag is not passed, both non-browser and remote tests will be run.

clean

Removes the dist directory (if one exists) to clean up after a build.

License

generator-dojo is available under the terms of the New BSD License. All code, with the exception of portions generated from Yeoman's generator-generator, is developed under the terms of the Dojo Foundation CLA.

© 2013 Bryan Forbes http://www.reigndropsfall.net All rights reserved.