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

create-ol-app

v1.2.0

Published

Initialize a new OpenLayers application

Downloads

955

Readme

create-ol-app

The create-ol-app program sets up a project directory with the dependencies required for developing an OpenLayers application. The program requires npx, distributed with Node (at least version 12), and git.

Using create-ol-app saves you from having to set up or configure tools like Vite, webpack, or Parcel. After setting up a new OpenLayers application, you can proceed with configuring the development environment to your liking – the create-ol-app program sets up the required tools, but doesn't lock you in to any specific configuration.

Creating a new application

To create a new OpenLayers application, choose a name for your application (my-app below) and run the following:

npx create-ol-app my-app

🐛 If you get an error like "could not find commit hash" when running create-ol-app, make sure that you have git installed.

This will create a new directory called my-app (choose a different name if you like) and install the dependencies for OpenLayers application development. By default, Vite is used for development and bundling. See below for other options.

💡 Tip – if you run npx create-ol-app with no additional arguments, the new application will be set up in the current directory.

After the step above completes, you can change into your new application directory and start a development server:

cd my-app
npm start

See the my-app/readme.md for more detail on working with the new application.

Choosing a bundler

The create-ol-app program supports a few different module bundlers. By default, an application is set up using Vite. To use a different bundler, pass the --template option to create-ol-app.

The default template uses Vite. This is equivalent to running the following:

npx create-ol-app my-app --template vite

To see what other templates are available, see the help output for the create-ol-app program:

npx create-ol-app --help

To use webpack instead of Vite, run the following:

npx create-ol-app my-app --template webpack

After creating a new application, see the included readme.md for more details on getting started.