Skip to content

dojo/examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@dojo/examples

Build Status

This repository contains example applications built using Dojo.

For current progress on Dojo, contribution guidelines and other information, please visit dojo/meta.

Examples

Here is a table of the current examples available in this repository complete with code and a hosted demonstration:

Example Code Demo Sandbox Overview
TodoMVC Link Link Link Reference implementation of TodoMVC built using Dojo packages.
TodoMVC (kitchen sink) Link Link Link Feature-enhanced version of TodoMVC built using Dojo packages.
iCache Basic Link Link Link Basic example of icache middleware usage
iCache Advanced Link Link Link Example of getOrSet icache API and typed icache
Resize Middleware Link Link Link Demonstrates working with an element that changes dimensions
HNPWA Link Link Link Reference implementation of HNPWA built using Dojo packages.
Custom Element Showcase Link Link Showcase of widgets from @dojo/widgets compiled as custom elements.
Custom Element Menu Link Link Demonstration of a menu widget compiled as a custom element.
Real-world Application Link Link Link A real-world implementation of an existing site using Dojo packages: conduit.
Intersection Observer Link Link Link Demonstration of the Intersection meta and how it can be used to create an infinite scrolling list.
Resize Observer Link Link Demonstration of the Resize meta and how it can be used to create responsive components.
Dgrid Wrapper Link Link Demonstration of the Dgrid Wrapper for running dgrid in a reactive way in a modern Dojo application.
World Clock Link Link Demonstration of i18n in an application built using Dojo packages.
Static Blog Link Link Link Template for creating a blog using dojo with build time rendering and blocks
Store Arrays Link Link Link Demonstrates working with arrays in @dojo/stores

How Do I Contribute?

We appreciate your interest!

Adding an Example

To add an example to the project, create the example in the packages directory. In order to build and deploy the application there are a few required.

Npm Scripts

There are two required npm scripts:

build:deploy

The build:deploy script needs to install node modules at the beginning and remove them at the end after successfully building the example. E.g.

"build:deploy": "npm install && dojo build --dojorc .dojorc-deploy && shx rm -rf node_modules",

package

The package script needs move the built output into the correct directory in the main output/dist directory. E.g.

"package": "shx cp -r output/dist/ ../../output/dist/hnpwa/",

.dojorc-deploy file

A .dojorc-deploy file that extends the base .dojorc but specifies a base of the examples directory name. E.g.

{
	"extends": ".dojorc",
	"build-app": {
		"base": "/hnpwa/"
	}
}

Installation & Testing

Refer to each README.md for details on installing and testing the examples:

Building all Examples

From the root directory, run npm install and then npm run build. The built examples are output into the output/dist directory at the of the product.

Licensing Information

© 2018 JS Foundation. New BSD license.

Link |