PRs welcome. Feel free to contribute!
Website for the NEPA.js Meetup Group, a community of JavaScript enthusiasts serving Northeast Pennsylvania.
Join our next Meetup Group!
Find us on Twitter!
- React for handling UI
- Prettier for enforcing code style
- Flow for static typing
- Jest for testing
- styled-components for handling CSS
- This project also handles CSS imports
Configuration has been bootstrapped with Create React App.
- Clone the repository
--
git clone [email protected]:nepajs/website.git nepajs-website
- Navigate into the new folder
--
cd nepajs-website
- Install the project's dependencies
--
yarn
- Run the client in dev mode
--
yarn start
- The browser will navigate to http://localhost:3000.
Prettier will automatically convert your code to fit the project's style guide.
This occurs on every git commit
.
For the best experience, integrate Prettier into your editor of choice.
Certain components may require special passwords to function.
Required APIs:
These keys should NOT be saved into Github. To help prevent this, a template file has been created for you.
- Create an account at the link(s) above, and generate your personal API key(s)
- Navigate to the file
/src/util/
folder and look for/SECRET.example.js
- Make a copy of this file and name it to
/SECRET.js
- Replace the example keys with your actual API keys
- Save your API keys to this new
/SECRET.js
file - DO NOT save your API keys to the original
/SECRET.example.js
file
.gitignore will prevent /SECRET.js
from publishing these keys to Github.
Documentation for Jest and Enzyme testing.
- All test files are kept in folders named
__tests__
- Naming convention:
<Name of original file>.test.js
- Run the test suite
--
yarn test
- Update the UI snapshots
--
yarn test:update
- The
__snapshots__
folders don't need to be adjusted manually
- The
- Run a coverage report
--
yarn test:coverage
Make sure there are no failing tests prior to sending us a Pull Request!
The main client-side code can be found in the src/
directory
- Entry point/render:
src/index.js
- Routing:
src/App.jsx
- Special note: This project utilizes code splitting to load pages asynchronously
- Guide to Code Splitting in Create React App
- A service worker has been installed as per the PWA specification
- This service worker is part of Create React App and shouldn't need to be updated
"Top-level" components can be found in the src/page
directory.
- Currently, there is no practical difference between
src/page
andsrc/component
- In the future, these top-level components may be rendered server-side
All other components can be found in the src/component
directory.
- Related files that execute a single function are grouped together into the same sub-directory
- i.e. All files that to serve to create the HeroImage (such as its main React component, its test files, and its .jpg image) will be found in the
src/component/HeroImage/
sub-directory
- i.e. All files that to serve to create the HeroImage (such as its main React component, its test files, and its .jpg image) will be found in the
- The "master" file within these sub-directories are named
index.js[x]
Special/unique files can be found in the src/util
directory.