Home

Awesome

@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:

ExampleCodeDemoSandboxOverview
TodoMVCLinkLinkLinkReference implementation of TodoMVC built using Dojo packages.
TodoMVC (kitchen sink)LinkLinkLinkFeature-enhanced version of TodoMVC built using Dojo packages.
iCache BasicLinkLinkLinkBasic example of icache middleware usage
iCache AdvancedLinkLinkLinkExample of getOrSet icache API and typed icache
Resize MiddlewareLinkLinkLinkDemonstrates working with an element that changes dimensions
HNPWALinkLinkLinkReference implementation of HNPWA built using Dojo packages.
Custom Element ShowcaseLinkLinkShowcase of widgets from @dojo/widgets compiled as custom elements.
Custom Element MenuLinkLinkDemonstration of a menu widget compiled as a custom element.
Real-world ApplicationLinkLinkLinkA real-world implementation of an existing site using Dojo packages: conduit.
Intersection ObserverLinkLinkLinkDemonstration of the Intersection meta and how it can be used to create an infinite scrolling list.
Resize ObserverLinkLinkDemonstration of the Resize meta and how it can be used to create responsive components.
Dgrid WrapperLinkLinkDemonstration of the Dgrid Wrapper for running dgrid in a reactive way in a modern Dojo application.
World ClockLinkLinkDemonstration of i18n in an application built using Dojo packages.
Static BlogLinkLinkLinkTemplate for creating a blog using dojo with build time rendering and blocks
Store ArraysLinkLinkLinkDemonstrates 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 |