Created
July 25, 2023 16:39
-
-
Save 465media/a63f27f2fedcdadad276cfb19cf5ae32 to your computer and use it in GitHub Desktop.
Setup
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
# Nu-Makers-Space | |
## Relevant URLs | |
[Development Site](https://nudvexpmaker.wpengine.com/): https://nudvexpmaker.wpengine.com/ | |
## Project Assets | |
- Designs are on [Sketch](https://sketch.com) | |
- [link to gravity snippet we might need](https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-email-domain-validator.php) | |
## Local Development | |
### Vagrant | |
#### Requirements | |
- [Composer](https://getcomposer.org) | |
- [NPM](https://docs.npmjs.com) | |
- [Vagrant](https://vagrantup.com) | |
- [vagrant-hostsupdater plugin](https://github.com/agiledivider/vagrant-hostsupdater) | |
- One of the following: | |
- [VirtualBox](https://wwwvirtualbox.org) _(x86)_å | |
- [Parallels](https://www.parallels.com) _(M1, M2, or Intel Macs. Requires the [vagrant-parallels]() plugin.)_ | |
This project is designed for local development using Vagrant. | |
### Steps for local setup without Vagrant | |
This project _can_ be integrated into the development environment of your choice, assuming it provides a working | |
WordPress installation. The project does have dependencies that can be included by running `composer install --no-dev` | |
in the root directory of the repository. This will create a `vendor` directory in the `www/wp-content` directory of the | |
repository. Then copy the `www/wp-content` directory to your local development environment. This approach will add | |
extra steps to keep the local git repository in sync, but it is possible. | |
### Setup | |
After cloning the repository, `cd` to the repository root directory and execute the following commands to install all dependencies: | |
1. `composer install` | |
1. `cd www/wp-content/themes/numakerspace && npm install` | |
Finally, execute `vagrant up` from the repository root directory. | |
### Data | |
The `sql` directory contains a copy of the working database for this project. You can import it using the following | |
process, assuming you are in the root directory of the repository: | |
1. `vagrant ssh` | |
1. `bunzip2 < /vagrant/sql/provision.sql.bz2 | mysql -u wordpress -pwordpress wordpress` | |
### Theme development | |
This project uses [SASS](https://sass-lang.com/) and [ES6 modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). The following npm commands can be run from | |
the theme root directory _(www/wp-content/themes/numakerspace)_ to compile the theme assets: | |
|Command|Purpose| | |
|---|---| | |
|`npm run compile:css`|compiles the `sass/style.scss` to the theme root directory `style.css`| | |
|`npm run build`|compiles the `src/index.js` using [Webpack](https://webpack.js.org/)| | |
|`npm run watch`|will monitor all files in the `sass` directory and compile on file chang| | |
|`npm run start`|will monitor all files in the `src` directory and compile on file change| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment