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

@ongov/ontario-frontend

v1.1.0

Published

<img src="../ontario-frontend/src/assets/img/ontario_ogp_image.png" alt="Ontario.ca Logo" width="200"/>

Downloads

10

Readme

@ongov/ontario-frontend

The ontario-frontend package is a part of the Ontario.ca Frontend monorepo and a core dependency for developing digital services within the Ontario Government's digital ecosystem. It provides developers with a robust set of tools, configurations, and templates aimed at facilitating the creation of accessible, efficient, and consistent web experiences. Built on top of popular web development tools such as Eleventy and Nunjucks, this framework offers a comprehensive solution for rapid development without sacrificing quality or performance.

Table of Contents

Features

  • Eleventy configurations: Optimized configurations for Eleventy, designed to streamline the development of static sites with enhanced performance and scalability.

  • Nunjucks templating: A rich set of Nunjucks templates and macros that promote reusability and maintainability across various projects, enabling developers to craft dynamic content with ease.

  • Custom filters: A collection of custom Nunjucks filters tailored to meet the unique requirements of government digital services, facilitating common tasks such as date formatting, text transformations, and more.

  • Utility functions: Handy utilities for common calculations, configurations, and other helper functions that simplify complex tasks and improve developer productivity.

Usage

This package is a core dependency for Ontario.ca Frontend applications and projects. As such, it is best to create a new Ontario.ca Frontend project using the ontario-frontend-cli's ontario-create-app command. This package will be automatically added to your Ontario.ca Frontend project when it is created that way.

It is possible to include this package and leverage the Eleventy configurations in an existing project not created with the Ontario.ca Frontend, but this is an unsupported method.

Usage prerequisites

Ensure you have Node.js and npm installed on your machine. This framework is built to work with Eleventy, so familiarity with Eleventy and Nunjucks is recommended.

Installation

  1. Add the framework as a dependency to your project:

    npm install @ongov/ontario-frontend
  2. Configure Eleventy to use the framework's settings and Nunjucks environment:

    // .eleventy.js
    const ontarioFrontendFramework = require('@ongov/ontario-frontend');
    
    module.exports = function(eleventyConfig) {
    // Apply the framework's configurations
    ontarioFrontendFramework.configureEleventy(eleventyConfig);
    };
  3. Start building your project with the provided templates and utilities.

Development

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Refer to the main monorepo README for detailed setup instructions and prerequisites.

Clone and install

  1. Clone the monorepo (if you haven't already):

    git clone -b main https://github.com/ongov/ontario-frontend.git
    cd ontario-frontend
  2. Navigate to the ontario-frontend package:

    cd packages/ontario-frontend
  3. Install dependencies using pnpm:

    pnpm install

Working locally

To work with this package locally as a dependency:

pnpm link

This will make the current local package accessible system-wide, or in another location.

Documentation

Explore the documentation to learn about every aspect of the toolkit--from installation and file structure to adding analytics and preparing for deployment. The documentation is available at developer.ontario.ca.

Contributing

Contributions to the Ontario.ca Frontend are welcome. Whether it's bug reports, feature requests, or contributions to code, we appreciate your input.

Check out our CONTRIBUTING.md file for guidelines on how to contribute.

License

This project is licensed under the Open Government Licence - Ontario. Feel free to use, modify, and distribute it as needed.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.