DNN Project Templates

Featuring Yeoman, Gulp, and a long list of supporting characters

npm

  • JavaScript package manager
  • Install project-specific components
  • Install machine-wide utilities

choco outdated
choco upgrade nodejs -y
npm install --global yo
npm outdated -g
npm set @engage:registry=https://www.myget.org/F/engage-software/npm/
npm install @engage/generator-dnn-project -g

Yeoman Templates

  • Consistent
  • Easy to Use
  • Updateable
  • Configurable

Templates

  • Project (default)
  • Module
  • Theme

Gulp task runner

  • CSS
  • JavaScript
  • Images
  • Build
  • Package

CSS

  • Less.js
  • Autoprefixer (last 2 version, IE >= 8)
  • cssnano
  • Bless
  • Source Maps
  • Browsersync

JS

  • JSCS
  • JSHint
  • ESLint
  • Babel
  • UglifyJS
  • Rename
  • Source Maps

Images

  • Imagemin
    • Progressive JPEG
    • Interlaced GIF
    • Optimize SVG, PNG, JPEG, GIF
  • Experimental
    • Resize
    • Intensive optimization

Build

  • NuGet restore
  • MSBuild

Package

  • NAnt

npm scripts

  • npm start
  • npm run package

What's in a Project?


cd C:\inetpub\wwwroot\
mkdir xyza.local
cd xyza.local
git init
yo @engage/dnn-project
git add -A
git commit -m 'add build workflow'
yo @engage/dnn-project:theme
  • \
    • package.json
    • .gitignore
    • .editorconfig
    • .eslintrc
    • .jshintrc
    • .jscsrc
    • .babelrc
    • .yo-rc.json
    • gulpfile.js
  • \gulp\
    • Project.js
    • options.js
    • errorHandler.js
    • build-task.js
    • css-task.js
    • images-task.js
    • js-task.js
    • nuget-download-task.js
    • package-task.js

What Else?

  • yo dnn-project:theme
  • yo dnn-project:module
  • Website\Portals\_default\
    • xyza Themes.build
    • Skins\Abc\
      • Abc Theme.dnn
      • Upgrade.Cleanup.txt
      • Admin.ascx
      • popUpSkin.ascx
      • controls\
        • Footer.ascx
        • Header.ascx
        • CommonResources.ascx
      • js\
        • skin.js
      • styles\
        • skin.less
        • variables.less
  • Website\Portals\_default\
    • Skins\Abc\styles\
      • base\
        • _base.less
        • clickables.less
        • lists.less
        • tables.less
        • text.less
      • modules\
        • _modules.less
        • containers.less
        • navigation.less
        • social-media.less
    • Skins\Abc\menus\mainNav\
      • menudef.xml
      • menu.cshtml
    • Containers\Abc\
      • No Title.ascx
  • Website\DesktopModules\xyza\
    • xyza.sln
    • xyza.sln.DotSettings
    • xyza.csproj
    • xyza.build
    • Correctness, Design, Globalization, and Security.ruleset
    • CustomDictionary.xml
    • ReleaseNotes_00.01.00.htm
    • packages.config
    • GlobalSuppressions.cs
    • web.config
    • .nuget\nuget.config
    • SQL\
      • 0.1.0.sql
      • Uninstall.sql
    • Properties\AssemblyInfo.cs
  • Website\DesktopModules\xyza\Uvw\
    • Uvw.dnn
    • UvwSettings.cs
    • FeaturesController.cs
    • module.less
    • ViewUvw\
      • IViewUvwView.cs
      • ViewUvw.ascx
      • ViewUvw.ascx.cs
      • ViewUvw.ascx.designer.cs
      • ViewUvwPresenter.cs
      • ViewUvwViewModel.cs
      • App_LocalResources\ViewDef.ascx.resx
    • Settings\
      • ISettingsView.cs
      • Settings.ascx
      • Settings.ascx.cs
      • Settings.ascx.designer.cs
      • SettingsPresenter.cs
      • SettingsViewModel.cs
      • UpdatingSettingsEventArgs.cs
      • App_LocalResources\Settings.ascx.resx

What else?

Discussion & Questions

DNN Project Templates

By Brian Dukes

DNN Project Templates

Featuring Yeoman, Gulp, and a long list of supporting characters

  • 1,805