-
-
Notifications
You must be signed in to change notification settings - Fork 42
Update to use npm vite #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tksheppard
wants to merge
35
commits into
nvisionative:develop
Choose a base branch
from
tksheppard:update-to-use-npm-vite
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
0b3a3ef
Initial setup
tksheppard 57fe287
Merge branch 'nvisionative:develop' into update-to-use-npm-vite
tksheppard cfe32cf
File placement and name updates
tksheppard 35f7779
Add new dependencies
tksheppard 4896a7e
Increment major version
tksheppard 262db8f
Update deprecated use of `name`
tksheppard 1ed0432
Add browser-sync config
tksheppard 25e4dab
Add serve function
tksheppard 5f1d5d1
Add helpers to minimize code repeat
tksheppard d380da2
Replace REGEX with xml parse and replacement
tksheppard b7367c6
Merge branch 'update-to-use-npm-vite' of https://github.com/tksheppar…
tksheppard 0bc0a1b
Update to use lib to output different filenames
tksheppard cdc69a8
Remove chokidar and use vite watch to trigger browser-sync
tksheppard 2bcfc8c
Properly deal with manifest, use helpers, packaging tweeks
tksheppard 5376c39
Load proper files
tksheppard 82daeb8
Strip tokens and leave blank for value adding
tksheppard 427ddf0
Remove manifest updates from regular build
tksheppard 5eea334
Add customMenu to compilation order
tksheppard 81560a1
Remove comments, add to docs
tksheppard 5fa1906
Add vite config docs
tksheppard 4856395
Update sass
tksheppard 9e4b7aa
Disable dependency deprecation warnings
tksheppard 88f0172
Updates for CSS5
tksheppard 8b6e5e9
Restructured and simplified and also setup for CSS5
tksheppard 1069b04
Self contain all DNN CSS
tksheppard c31cdce
Shift back to import for correct overrides
tksheppard 6f44cb7
Filter warnings from autoload and bootstrap
tksheppard cedd1e5
Revert (mostly) to original
tksheppard 7f603d3
Reverted back to (almost) original
tksheppard bac22c0
Add back github files
tksheppard 80731e2
Fix cutoff name tags
tksheppard f832e5b
Move fontawesome and bootstrap to dependencies
tksheppard deabeb1
Move to github folder for cleanliness
tksheppard 8f26634
Changed to generic url
tksheppard 8608f4f
Change to theme version
tksheppard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,225 @@ | ||
| # nvQuickTheme | ||
|
|
||
| A modern DNN (DotNetNuke) theme development framework built on **Bootstrap 5**, **Vite**, and **SCSS**. nvQuickTheme provides a fast, opinionated starting point for building professional DNN skins with a streamlined build pipeline. | ||
|
|
||
| --- | ||
|
|
||
| ## Requirements | ||
|
|
||
| - [Node.js](https://nodejs.org/) v18 or higher | ||
| - A running local DNN installation (v9.0.0 or higher) | ||
| - npm v9 or higher | ||
|
|
||
| --- | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### 1. Clone the repository | ||
|
|
||
| ```bash | ||
| git clone https://github.com/nvisionative/nvQuickTheme.git | ||
| cd nvQuickTheme | ||
| ``` | ||
|
|
||
| ### 2. Install dependencies | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| ### 3. Configure your project | ||
|
|
||
| Edit `project-details.json` with your project's information: | ||
|
|
||
| ```json | ||
| { | ||
| "project": "MyTheme", | ||
| "version": "1.0.0", | ||
| "author": "Your Name", | ||
| "company": "Your Company", | ||
| "url": "www.yoursite.com", | ||
| "email": "you@yoursite.com", | ||
| "description": "A custom DNN theme" | ||
| } | ||
| ``` | ||
|
|
||
| ### 4. Configure your local DNN site | ||
|
|
||
| Edit `serve.config.js` to point to your local DNN installation: | ||
|
|
||
| ```js | ||
| export default { | ||
| dnnUrl: 'http://yoursite.loc', // ← change this to your local DNN URL | ||
| port: 3000, | ||
| watchPaths: ['dist/**/*', 'containers/**/*', '*.ascx'], | ||
| sourcePaths: ['src/**/*'], | ||
| debounce: 300, | ||
| }; | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| nvQuickTheme/ | ||
| ├── containers/ # DNN container files | ||
| ├── dist/ # Compiled output (generated, do not edit) | ||
| ├── partials/ # DNN skin partials (.ascx) | ||
| │ ├── _header.ascx | ||
| │ ├── _footer.ascx | ||
| │ ├── _includes.ascx | ||
| │ └── _registers.ascx | ||
| ├── scripts/ # Build system scripts | ||
| │ ├── build.js | ||
| │ ├── clean.js | ||
| │ ├── helpers.js | ||
| │ ├── package.js | ||
| │ ├── postbuild.js | ||
| │ ├── serve.js | ||
| │ ├── utils.js | ||
| │ └── watch.js | ||
| ├── src/ | ||
| │ ├── fonts/ # Custom web fonts | ||
| │ ├── images/ # Theme images | ||
| │ ├── js/ # JavaScript source files | ||
| │ │ └── custom.js # Main JS entry point | ||
| │ └── scss/ # SCSS source files | ||
| │ ├── style.scss # Main SCSS entry point | ||
| │ ├── variables/ # Colors, fonts, type settings | ||
| │ ├── mixins/ # SCSS mixins | ||
| │ ├── components/ # Component styles (nav, buttons, etc.) | ||
| │ └── sections/ # Section styles (header, footer) | ||
| ├── default.ascx # Main DNN skin layout | ||
| ├── manifest.template.dnn | ||
| ├── project-details.json | ||
| ├── serve.config.js | ||
| └── vite.config.js | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## npm Scripts | ||
|
|
||
| | Command | Description | | ||
| |---|---| | ||
| | `npm run watch` | Watch for file changes and rebuild automatically | | ||
| | `npm run serve` | Start Browser-Sync dev server with live reload | | ||
| | `npm run build` | Build theme for production | | ||
| | `npm run clean` | Remove all build output directories | | ||
| | `npm run package` | Build and create a DNN install package | | ||
|
|
||
| --- | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| ### Option A — Watch mode (build only) | ||
|
|
||
| If you're deploying files directly to a DNN installation on your local filesystem: | ||
|
|
||
| ```bash | ||
| npm run watch | ||
| ``` | ||
|
|
||
| Vite will watch your `src/` files and rebuild to `dist/` on every change. You'll need to refresh your browser manually. | ||
|
|
||
| ### Option B — Dev server with live reload | ||
|
|
||
| For a full live-reload experience via Browser-Sync: | ||
|
|
||
| ```bash | ||
| npm run serve | ||
| ``` | ||
|
|
||
| This proxies your local DNN site (configured in `serve.config.js`) and automatically refreshes the browser whenever built files change. Your DNN site must be running before starting the server. | ||
|
|
||
| --- | ||
|
|
||
| ## Building for Production | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| This compiles and minifies all SCSS and JS, copies fonts, FontAwesome assets, Bootstrap JS, and images to `dist/`, and generates `manifest.dnn` from `manifest.template.dnn`. | ||
|
|
||
| --- | ||
|
|
||
| ## Creating a DNN Install Package | ||
|
|
||
| ```bash | ||
| npm run package | ||
| ``` | ||
|
|
||
| This runs a full production build and then packages everything into a DNN-installable zip file at: | ||
|
|
||
| ``` | ||
| build/MyTheme_1.0.0_install.zip | ||
| ``` | ||
|
|
||
| The package includes the compiled `dist/` assets, containers, skin partials, and the generated manifest — ready to install via the DNN Extensions module. | ||
|
|
||
| --- | ||
|
|
||
| ## Customization | ||
|
|
||
| ### Colors | ||
|
|
||
| Edit `src/scss/variables/_colors.scss` to define your color palette. Colors are exposed as CSS custom properties and available throughout SCSS via the `color()` function: | ||
|
|
||
| ```scss | ||
| $colors: ( | ||
| "main-shade": #ec3d46, | ||
| "main-accent": #462a2b, | ||
| // ... | ||
| ); | ||
| ``` | ||
|
|
||
| ```scss | ||
| // Usage in SCSS | ||
| background-color: colors.color('main-shade'); | ||
| ``` | ||
|
|
||
| ### Typography | ||
|
|
||
| Edit `src/scss/variables/_type.scss` for base font size, line height, and font stack settings. Custom font files belong in `src/fonts/` and should be declared in `src/scss/variables/_fonts.scss`. | ||
|
|
||
| ### Bootstrap Overrides | ||
|
|
||
| Bootstrap variables (colors, breakpoints, spacing, etc.) can be overridden in `src/scss/variables/_bs-overrides.scss` before Bootstrap is compiled in. | ||
|
|
||
| ### JavaScript | ||
|
|
||
| The main JS entry point is `src/js/custom.js`. Additional scripts can be added as entry points in `vite.config.js` under `rollupOptions.input`. | ||
|
|
||
| ### Layout / Panes | ||
|
|
||
| The main skin layout is `default.ascx`. DNN content panes (`BannerPane`, `ContentPane`, `FluidPane`) are defined here. Add or rearrange panes to match your design. | ||
|
|
||
| --- | ||
|
|
||
| ## Dependencies | ||
|
|
||
| | Package | Version | Purpose | | ||
| |---|---|---| | ||
| | Bootstrap | ^5.3.8 | CSS framework | | ||
| | FontAwesome Free | ^7.0.1 | Icon library | | ||
| | Vite | ^5.0.0 | Build tool | | ||
| | Sass | ^1.69.5 | SCSS compiler | | ||
| | Browser-Sync | ^3.0.4 | Dev server / live reload | | ||
| | Chokidar | ^5.0.0 | File watching | | ||
| | Archiver | ^6.0.1 | DNN package creation | | ||
|
|
||
| --- | ||
|
|
||
| ## License | ||
|
|
||
| GPL-3.0 — see `themeLicense.txt` for details. | ||
|
|
||
| --- | ||
|
|
||
| ## Credits | ||
|
|
||
| Designed and developed by [TK Sheppard](https://github.com/tksheppard) & [David Poindexter](https://github.com/david-poindexter) at [nvisionative](https://www.nvisionative.com). | ||
|
|
||
| Project site: [nvquicktheme.com](https://www.nvquicktheme.com) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tksheppard is there a reason why this file name changed? I am not sure if GitHub supports it with this naming. GitHub has a feature to auto-detect the LICENSE file and display the correct license type in other areas of the GitHub repo UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@david-poindexter I was going for consistency with all markdown files--and GitHub supports it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tksheppard it is good to know GitHub supports it, but I still prefer this file to be treated differently than other markdown files. It is "special" because it is the license. Thanks.