Skip to content

Commit d061c59

Browse files
authored
spruce up (#1959)
1 parent 56071cc commit d061c59

File tree

117 files changed

+1165
-3737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1165
-3737
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ static
88
cypress-coverage
99
vitest-coverage
1010
.storybook-dist
11-
common/styles/themeMap.js

.lintstagedrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
3-
"*.css": ["prettier --write", "stylelint --fix"]
3+
"*.css": ["prettier --write"]
44
}

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ static
1010
cypress-coverage
1111
vitest-coverage
1212
.storybook-dist
13-
common/styles/themeMap.js
1413
**/*.snap
1514
**/*.mp4
1615
**/*.png

.storybook/backgrounds.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

.storybook/preview-head.html

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
11
<link href="https://fonts.googleapis.com/css?family=Encode+Sans:400,700" rel="stylesheet" />
2-
<style type="text/css">
3-
@font-face {
4-
font-family: 'DIN Condensed Bold';
5-
font-style: normal;
6-
font-weight: normal;
7-
font-display: auto;
8-
9-
/* prettier-ignore */
10-
src:
11-
url("./static/fonts/DINCondensed-Bold.ttf") format("truetype"),
12-
url("./static/fonts/DINCondensed-Bold.woff2") format("woff2"),
13-
url("./static/fonts/DINCondensed-Bold.woff") format("woff");
14-
}
15-
</style>
16-
<script>
17-
try {
18-
Typekit.load();
19-
} catch (e) {}
20-
</script>
2+
<link href="https://fonts.googleapis.com/css?family=Bebas+Neue:400,700" rel="stylesheet" />

.storybook/preview.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import backgroundsPalleteArray from './backgrounds';
21
import 'common/styles/globals.css';
32
import * as viewports from '@storybook/addon-viewport';
43

@@ -13,10 +12,6 @@ export const decorators = [
1312
const preview = {
1413
parameters: {
1514
actions: { argTypesRegex: '^on[A-Z].*' },
16-
backgrounds: {
17-
values: backgroundsPalleteArray,
18-
default: 'White',
19-
},
2015
viewport: {
2116
viewports: {
2217
...viewports.MINIMAL_VIEWPORTS,

.stylelintrc

Lines changed: 0 additions & 26 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ Being an open source project involving contributors of varying levels of experie
3030
- [What Is The Front-End?](#what-is-the-front-end)
3131
- [What Is The Back-End?](#what-is-the-back-end)
3232
- [What is REST? What is an API?](#what-is-rest-what-is-an-api)
33-
- [Technologies](#technologies)
34-
- [PostCSS](#postcss)
3533
- [Development Workflow](#development-workflow)
3634
- [Installing Dependencies](#installing-dependencies)
3735
- [Run The Development Server](#run-the-development-server)
@@ -90,102 +88,6 @@ The back-end is responsible for providing data for the front-end to display. Thi
9088

9189
[What is an API?](https://medium.freecodecamp.org/what-is-an-api-in-english-please-b880a3214a82)
9290

93-
## Technologies
94-
95-
Here is an alphabetically-sorted list of technologies this project leverages:
96-
97-
- [Babel](https://babeljs.io/) - JavaScript compiler to unify all the different versions of JS that may have been used or will be used in the future. [Here's a blog post from Scotch.io on why JavaScript utilizes "transpiling" with Babel](https://scotch.io/tutorials/javascript-transpilers-what-they-are-why-we-need-them).
98-
- [CSS Modules](https://github.com/css-modules/css-modules) - CSS Modules allow us to encapsulate CSS within components. Instead of HTML/CSS - our project structure is basically JSX/CSS.
99-
- [Cypress](https://cypress.io/) - Hand-picked resources [here](https://github.com/OperationCode/front-end/tree/main/cypress/README.md).
100-
- [Jest](https://jestjs.io/) - A JavaScript testing framework from Facebook. We use it for all of our unit and some of our integration/regression tests.
101-
- [Next.js](https://nextjs.org/) - Next is a framework for creating ["server-side rendered"](https://medium.freecodecamp.org/demystifying-reacts-server-side-render-de335d408fe4) React applications with a lot of performance and [search engine optimizations](https://searchengineland.com/guide/what-is-seo) out-of-the-box.
102-
- [Node.js](https://www.nodejs.org/) - Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. React utilizes a tiny Node/Express server for it's development environment.
103-
- [PostCSS](#PostCSS) - Extensive documentation listed below...
104-
- [React.js](https://facebook.github.io/react/) - Facebook's popular JavaScript front-end framework.
105-
- [Storybook](https://storybook.js.org) - Storybook acts as a "component workbench" and source for component documentation. You can learn more about Storybook on your own [here](https://www.learnstorybook.com/). You can see our Storybook here: [![Storybook](https://github.com/storybookjs/brand/blob/8d28584c89959d7075c237e9345955c895048977/badge/badge-storybook.svg)](http://storybook.operationcode.org)
106-
- [Webpack](https://webpack.js.org/) - The premier module bundler for JavaScript. Read [this article](https://survivejs.com/webpack/what-is-webpack/) for more information.
107-
- [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager that uses a content-addressable storage system.
108-
109-
### PostCSS
110-
111-
In our repo, we use PostCSS plug-ins to help simplify how we write our CSS. PostCSS is included in our webpack configuration, so there are no additional steps necessary to leverage these plug-ins.
112-
113-
#### What is PostCSS?
114-
115-
"PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more." - [PostCSS Repo](https://github.com/postcss/postcss)
116-
117-
#### PostCSS Plug-ins in Use
118-
119-
- [Autoprefixer](https://github.com/postcss/autoprefixer): used to parse vendor prefixes for certain CSS property values
120-
([What is a vendor prefix?](https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix)). In our repo, you will not have to include vendor prefixes when you create a non-standard CSS selector.
121-
122-
**Example:**
123-
During development, we would write:
124-
125-
```
126-
.someClass {
127-
disply: flex;
128-
}
129-
```
130-
131-
Which will output the following once compiled:
132-
133-
```
134-
.someClass {
135-
display: -webkit-box;
136-
display: -ms-flexbox;
137-
display: flex;
138-
}
139-
```
140-
141-
- [PostCSS Media Variables](https://github.com/WolfgangKluge/postcss-media-variables): This plugin allows us to set 'default' breakpoints, and manipulate those values as needed without changing the defaults. Our defaults are defined in `common/styles/variables.css`
142-
143-
**Example:**
144-
During development, we would write:
145-
146-
```
147-
:root {
148-
--largeViewportWidth: 992px;
149-
}
150-
@media (min-width: var(--largeViewportWidth)) {}
151-
```
152-
153-
Which will output the following when deployed:
154-
155-
```
156-
@media (min-width: 992px){}
157-
```
158-
159-
- [PostCSS CSS Variables](https://github.com/MadLittleMods/postcss-css-variables): This plug-in allows us to use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) across older browsers. On run-time, this plug-in extracts and translates our custom variables into 'vanilla' CSS.
160-
161-
**Example:**
162-
During development, we would write:
163-
164-
```
165-
:root {
166-
--some-color: red;
167-
/*here we have defined the property `--some-color` as red*/
168-
}
169-
170-
.foo {
171-
color: --some-color;
172-
/*the element with class selector `.foo` will be red */
173-
}
174-
175-
```
176-
177-
Which will output the following when deployed:
178-
179-
```
180-
.foo {
181-
color: red;
182-
}
183-
```
184-
185-
- [PostCSS Export Custom Variables](https://github.com/jonathantneal/postcss-export-custom-variables): We use this plug-in simply to export our collection of CSS variables to [common/styles/themeMap.js](https://github.com/OperationCode/front-end/blob/main/common/styles/themeMap.js) so that they're leveragable within any JavaScript context.
186-
187-
- [PostCSS Import](https://github.com/postcss/postcss-import): This plug-in essentially tries to emulate the existing [CSS Import spec](https://developer.mozilla.org/en-US/docs/Web/CSS/@import) allowing for modularization and concatenation of CSS files.
188-
18991
## Development Workflow
19092

19193
### Installing Dependencies
@@ -248,9 +150,6 @@ You can see interactive documentation on all of our components via [![Storybook]
248150
| ├── index.js # Landing page
249151
| └── *.js # All the other pages
250152
|
251-
├── scripts
252-
| └── createComponent
253-
|
254153
├── static
255154
| ├── fonts
256155
| └── images
@@ -316,12 +215,6 @@ pnpm test $fileName
316215

317216
# Opens up a Cypress browser with which you can check e2e tests locally. Be sure the local dev server is running before this command!
318217
pnpm test:e2e
319-
320-
#Create all the necessary files/folders for a new, reusable component. Please make `ComponentName` TitleCase.
321-
pnpm create-component $ComponentName
322-
323-
#Create a new page in the pages directory.
324-
pnpm create-page $pageName
325218
```
326219

327220
## Mocking Back-end Server API

common/constants/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const aboutUsGroup = {
101101

102102
const getInvolvedGroup = {
103103
...getInvolved,
104-
sublinks: [chapters, sponsorship, merchStore, contact, donate],
104+
sublinks: [chapters, sponsorship, merchStore, contact],
105105
};
106106

107107
// MARK: Nav items

common/styles/breakpoints.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)