A custom WordPress theme for Great City Medical.
Built by Radley Sustaire, using PHPStorm. Designed by Pavel Khenkin, using Figma.
-
Great City Medical - Theme:
-
Great City Medical - Plugin:
This theme uses the official standard @wp-scripts to compile the JS scripts, with a few additional packages to assist with compiling sass files.
The build process is configured in the package.json
file. The most important settings are:
-
JS source: /assets/js-src/*.js
-
JS output: /assets/js-build/*.js
-
JS include: /assets/js-build/*.asset.php
- This php file is used when enqueueing the JS files, and automatically includes the dependencies that were imported by the script.
-
SCSS source: /*.scss
-
SCSS output: /*.css
-
SCSS map: /*.css.map
- This source map tells your browser how to map the compiled CSS to the original SCSS files. This is useful for debugging.
-
Additional SCSS includes are located in /assets/styles/. These are not compiled directly, they are imported in the main scss files.
-
The theme uses the NPM package
sass
(dart-sass) to compile the SCSS files. -
The theme uses the NPM package
concurrently
to run multiple build processes at once.
- Install npm on your system, if needed.
- Open terminal or command prompt.
- Navigate to the theme root.
- Run:
npm install
You are now ready to use the build process. You do NOT need to repeat those steps unless package.json is updated, in which case you can simply repeat: npm install
Manual
To compile all JS/SCSS files once:
npm run build
Automatic
To compile all JS/SCSS files automatically:
npm run start