Skip to content

NationalUniversitySystem/nusa-base-wptheme

Repository files navigation

NUSA WP Base Theme

All Contributors

This repo is a base theme for starting projects by our Web Dev team. It includes files and folder structure based on industry and team standards.


TO DOs Before Using:

  • When starting a project you must replace any instances of NUSA, nusa, etc inside the theme to reflect the project at hand.
  • Some of the SCSS files in the ./src/ folder are there as a base or example. Remove what is not needed and examine the base files.

Features:

  • Gulp setup
  • src folder is where your SASS/SCSS and JS file development should occur
  • assets folder and it's contents are generated by the gulp setup
  • Override the project URL by creating a file in the root of the theme gulp.config.local.js with an object containing your local projectURL
  • Atomic Design/Engineering architecture setup for SCSS files.

Available Gulp tasks:

Note: You can run npx gulp --tasks --depth=0 in the command line for a task list and information about them. 😱

  • sassLinter - Lints the SASS files with stylelint to keep the team working on the project consistent and avoid conflicts.
  • css - Run the processing of all SASS files -> CSS to deliver to the user.
  • jsLinter - Lint the JS files with ESLint so that our code is consistent and our team uses up to date code standards.
  • js - Process and compile the JavaScript files into our /assets/ folder for delivery.
  • styles - Executes CSS related tasks in series order (sassLinter -> css).
  • scripts - Executes JavaScript related tasks in series order (jsLinter -> js).
  • build - Executes the styles and scripts tasks in parallel order.
  • dev - Runs the build task, browsersync task, and watches files to continuously run the tasks above when the appropriate files are updated (Defined as the default task as well).
    • The browsersync task is not exported so that it can be called via the command line.

Must includes:

  • Gulp file setup.
  • Basic theme setup in ./inc/class-nusa-theme-setup.
  • ESLint and stylelint rules are based on our team and industry standards, do not change these.

Can be removed/deleted or changed:

  • Widgets setup inside the theme. The files present are here as an example.
  • Customizer setup. The project might not call for it, but again the files are here as example.

Things you might think are missing but are not:

  • Image optimization in Gulp: This should be done manually because you do not always want to apply the exact same optimization to all images. Refer to our dev tools for options.

Notes

  • It is recommended not to clone this repo. Any git pull will mess up your files so download this instead.

TODO

  • Bash or other type of script to replace NUSA, nusa, etc in the theme.

Contributors ✨


Mike Estrada

💻 📆 👀 🚧

Chris Maust

💻 ️️️️♿️

Alex Gamero

💻 🔧

The Emoji Key ✨ (and Contribution Types) can be found on allcontributors.org