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-dotnetnuke

v1.0.1

Published

Scaffolds DNN Extensions

Downloads

3

Readme

Yeoman generator for various DNN extensions

Yeoman is a "scaffolding tool" for just about anything. There are generators to help you scaffold out all kinds of applications. This generator will scaffold out DNN Platform extensions. The project can consist of one or more components. So it allows you to create complex solutions that can be rolled up into one installation zip file for DNN.

Extension types

The following extension types can be created with this tool:

  • MVC module
  • PersonaBar module
  • Skin
  • Container
  • Library

To support these extensions you can add these front-end components:

  • React (Typescript)
  • Scss (Sass)

Getting started

You'll need to install Yeoman first. Run the following in a terminal:

$ npm i -g yo

This will install Yeoman globally so you can run it in any directory. Now install the generator:

$ npm i -g generator-dotnetnuke

Now you can begin to use the templates. Create an empty project folder and run

$ yo dotnetnuke

and let the magic begin. You'll be prompted to select a project type first. When running the generator for the first time in a new project directory run the "Master Project" first! This sets up the basics for the project like name, company name and which version of DNN you'd like to target. It will create a solution file to which other projects will be added.

Philosophy

Develop outside the DNN installation

Note that this generator will create a solution that is not meant to be created inside your DNN development installation. Instead a file watcher will copy over relevant files when they change. This allows you to keep all your project's files in one place and not have them scattered and intermingled with DNN's own files.

Anticipate compound solutions

The generator will create a solution that can package any number of extensions into a single zip file that can be uploaded into DNN. The zip file has a single manifest that contains all the relevant information about the extensions. You can package multiple modules, skins, etc into a single release with a single release version.

Manifests should be created on the fly

DNN manifests can be hard to craft and maintain. Over the years tons of features have been added and everything needs to be spelled out in the manifest or your work will not install correctly. The templates used in this tool include a build system that does this (see below). The manifests are based on dnn.json files in the solution (which loosely follow DNN's XML manifests) and the package.json which holds the global information for all projects like project owner and version. Note that the individual dnn.json files can override these values.

Automation for ease of maintenance

You should be able to release a new version of your solution with the least amount of work. This means you'll rely on automation. With the created solution all you need to do is to change the version number of your solution in the package.json and during the build process all assemblies will be updated with this new version number. Once tuned to your scenario you can release in minutes.

Build system

The generated solution uses CakeBuild to create the installable zip file. This in turn relies on Dnn.CakeUtils to create the right manifest for your package. Run the following in Powershell to kick off the build process:

$ .\build.ps1

With this build system you can have assemblies automatically added to the manifest with their correct version numbers. Similarly SQL scripts can be added automatically as well.

File watching

To use the file watcher create a file called local.json in the root of your project. In it add this json:

{
  "dnn": {
    "pathsAndFiles": {
      "devSiteUrl": "http://mydevsiteurl",
      "devSitePath": "C:\\Path\\To\\Root\\Of\\DNNDevSite"
    }
  }
}

Now in a shell run the following command to begin file watching:

$ npm run watch-server