forked from HamishMW/portfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init next * Storybook? * Fix storybook * CSS modulify all the CSS * Update image component * Setup build * Add dynamic imports * Update articles + fix page transitions * Update nav scroll * Update Home.js * Update Image.module.css * Add meta component; fix highlighting * Update Navbar.js * Update another.mdx
- Loading branch information
Showing
165 changed files
with
7,052 additions
and
4,453 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
{ | ||
"extends": "react-app", | ||
"plugins": ["react-hooks"], | ||
"env": { | ||
"es6": true | ||
}, | ||
"extends": ["eslint:recommended", "next/core-web-vitals"], | ||
"rules": { | ||
"import/no-anonymous-default-export": 0, | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react-hooks/rules-of-hooks": "error", | ||
"semi": "error" | ||
"semi": "error", | ||
"no-unused-vars": "warn", | ||
"import/no-anonymous-default-export": "off", | ||
"react/display-name": "off", | ||
"@next/next/no-img-element": "off" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,4 @@ typings/ | |
build/ | ||
build-storybook/ | ||
.serverless | ||
.next |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.story-container { | ||
.storyContainer { | ||
width: 100vw; | ||
height: 100vh; | ||
display: flex; | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
addons: [ | ||
'@storybook/addon-actions', | ||
'@storybook/addon-controls', | ||
'@storybook/addon-a11y', | ||
'@storybook/addon-toolbars', | ||
{ | ||
name: '@storybook/preset-create-react-app', | ||
options: { | ||
scriptsPackageName: '@hamishmw/react-scripts-postcss', | ||
}, | ||
}, | ||
'storybook-addon-next', | ||
], | ||
stories: ['../src/**/*.stories.js'], | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
core: { | ||
builder: 'webpack5', | ||
}, | ||
webpackFinal: async (config, { configType }) => { | ||
config.resolve.modules = [path.resolve(__dirname, '../src'), 'node_modules']; | ||
|
||
const imageRule = config.module.rules.find(rule => rule.test.test('.svg')); | ||
imageRule.exclude = /\.svg$/; | ||
|
||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: ['@svgr/webpack'], | ||
}); | ||
|
||
config.module.rules.push({ | ||
test: /\.(mp4|hdr|glb|woff2)$/i, | ||
type: 'asset/resource', | ||
}); | ||
|
||
return config; | ||
}, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.story-root { | ||
.storyRoot { | ||
position: absolute; | ||
inset: 0; | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-standard" | ||
"stylelint-config-standard", | ||
"stylelint-config-prettier", | ||
"stylelint-config-css-modules" | ||
], | ||
"rules": { | ||
"selector-class-pattern": null, | ||
"custom-property-pattern": null, | ||
"string-quotes": "single", | ||
"selector-class-pattern": "^[a-z][a-zA-Z0-9]+$", | ||
"custom-property-pattern": "^[a-z][a-zA-Z0-9]+$", | ||
"custom-media-pattern": "^[a-z][a-zA-Z0-9]+$", | ||
"selector-id-pattern": null, | ||
"declaration-block-no-redundant-longhand-properties": null, | ||
"value-keyword-case": null, | ||
"value-keyword-case": ["lower", { "camelCaseSvgKeywords": true }], | ||
"alpha-value-notation": "number", | ||
"declaration-colon-newline-after": null, | ||
"indentation": null, | ||
"selector-combinator-space-before": null, | ||
"value-list-comma-newline-after": null, | ||
"custom-media-pattern": null | ||
"selector-pseudo-class-no-unknown": [ | ||
true, | ||
{ | ||
"ignorePseudoClasses": ["global"] | ||
} | ||
] | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
reactStrictMode: false, | ||
trailingSlash: true, | ||
pageExtensions: ['page.js', 'api.js'], | ||
webpack(config) { | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: [{ loader: '@svgr/webpack', options: { svgo: false } }], | ||
}); | ||
|
||
config.module.rules.push({ | ||
test: /\.(mp4|hdr|glb|woff2)$/i, | ||
type: 'asset/resource', | ||
}); | ||
|
||
return config; | ||
}, | ||
}; |
Oops, something went wrong.