The build system is based on this repository.
Workflow:
- Make html structure using pug
- Write styling in Sass
- Write js in ES2015 compiled by Webpack
- Have an auto-refreshing browser preview using Browsersync
Members are welcome to form this repository and submit pull requests. What you need to know:
Element | Source | How to interact |
---|---|---|
Static pages | src/*.pug | Every pug file in the src/ folder becomes a page. |
CSS/SASS | src/css/*.scss | The styles.scss is the main file that imports sub files |
Javascript | src/js/main.js | You can add js directly or use npm style modules using ES2015 |
After making your local edits run the production build and push.
Run the development environment:
git clone https://github.com/actuallymentor/sandbox-website.git
npm install
npm start # This will open the preview on your browser
Any changes you make to the code will be instantly reflected in the browser due to the browsersync integration.
To make the final build version:
npm run build
The final build version is compiled to the docs/ folder.
The member database is imported from mailchimp. You can't do this unless you have an API key to the account. If you do and want to update the members page:
npm run update
For this to work you need to have a .env file in the root of your repository filled with:
mcapikey=THE API KEY
mainlistid=THE ID OF THE MAIN LIST
mainlistname=NAME OF THE MAIN LIST
Also set the environment variables $gituser
and $gittoken
to your user account and a valid https token for your account.