-
-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
β»οΈ Move website to Next.js (#368)
This commit updates the stack of the gitmoji website to Next.js. This was a thing I wanted to do a long time ago. Our current stack was a little bit outdated and had issues with the Developer UX. The concept is the same, the whole site is built into a Static HTML site. Also we can benefit from using React βοΈ β€οΈ The current stack will be: Next.js React Flow Scss Prettier Jest
- Loading branch information
1 parent
224dba5
commit 18852ce
Showing
97 changed files
with
14,428 additions
and
5,461 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
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,12 @@ | ||
[ignore] | ||
.*/node_modules/jsonlint/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[lints] | ||
|
||
[options] | ||
|
||
[strict] |
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 |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
dist/ | ||
node_modules/ | ||
.publish/ | ||
.next | ||
out/ | ||
coverage/ |
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 was deleted.
Oops, something went wrong.
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,19 @@ | ||
const withSass = require('@zeit/next-sass') | ||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') | ||
|
||
module.exports = withSass({ | ||
exportPathMap: function() { | ||
return { | ||
'/': { page: '/' }, | ||
'/about': { page: '/about' }, | ||
'/contributors': { page: '/contributors' } | ||
} | ||
}, | ||
webpack: (config, { dev, isServer }) => { | ||
if (isServer) return config | ||
|
||
config.optimization.minimizer.push(new OptimizeCSSAssetsPlugin({})) | ||
|
||
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,53 +1,68 @@ | ||
{ | ||
"name": "gitmoji", | ||
"version": "1.0.0", | ||
"description": "An emoji guide for your commit messages", | ||
"main": "index.js", | ||
"private": true, | ||
"scripts": { | ||
"jsonvalidate": "jsonlint ./src/data/gitmojis.json -V ./src/data/schema.json", | ||
"contributors": "curl https://api.github.com/repos/carloscuesta/gitmoji/contributors -o ./src/data/contributors.json", | ||
"build": "gulp build", | ||
"deploy": "gulp deploy", | ||
"start": "npm run contributors && gulp", | ||
"test": "npm run jsonvalidate && gulp build" | ||
"build": "next build", | ||
"dev": "next dev", | ||
"export": "next export && touch out/.nojekyll", | ||
"flow": "flow", | ||
"lint": "prettier --check src/**/*.{js,json,scss}", | ||
"start": "next start", | ||
"test": "jest --coverage", | ||
"validate:gitmojis": "jsonlint ./src/data/gitmojis.json -V ./src/data/schema.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/carloscuesta/gitmoji.git" | ||
"dependencies": { | ||
"@babel/preset-flow": "^7.0.0", | ||
"@zeit/next-sass": "^1.0.1", | ||
"next": "9.1.1", | ||
"node-sass": "^4.13.0", | ||
"react": "16.11.0", | ||
"react-dom": "16.11.0", | ||
"react-test-renderer": "^16.11.0" | ||
}, | ||
"devDependencies": { | ||
"flow-bin": "^0.110.1", | ||
"husky": "^3.0.9", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^24.9.0", | ||
"jsonlint": "^1.6.3", | ||
"lint-staged": "^10.0.0-1", | ||
"optimize-css-assets-webpack-plugin": "^5.0.3", | ||
"prettier": "1.18.2" | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true, | ||
"arrowParens": "always" | ||
}, | ||
"author": "Carlos Cuesta", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/carloscuesta/gitmoji/issues" | ||
"lint-staged": { | ||
"*.{js,jsx}": [ | ||
"prettier --write src/**/*.{js,json,scss}", | ||
"git add" | ||
] | ||
}, | ||
"pugLintConfig": { | ||
"disallowHtmlText": true, | ||
"disallowDuplicateAttributes": true, | ||
"disallowClassAttributeWithStaticValue": true, | ||
"disallowIdAttributeWithStaticValue": true, | ||
"requireLowerCaseAttributes": true | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"pre-push": "npm run flow && npm run test" | ||
} | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"es2015" | ||
"next/babel", | ||
"@babel/preset-flow" | ||
] | ||
}, | ||
"homepage": "https://github.com/carloscuesta/gitmoji#readme", | ||
"dependencies": { | ||
"async": "^2.1.2", | ||
"gulp": "^3.9.1", | ||
"gulp-plumber": "^1.1.0", | ||
"gulp-pug": "^3.3.0", | ||
"gulp-pug-lint": "^0.1.6", | ||
"gulp-sass": "^3.1.0", | ||
"pdfkit": "^0.8.0", | ||
"request": "^2.79.0" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"browser-sync": "^2.18.13", | ||
"gulp-gh-pages": "^0.5.4", | ||
"jsonlint": "^1.6.2" | ||
"jest": { | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx}" | ||
], | ||
"testMatch": [ | ||
"**/*.(spec).(js)" | ||
], | ||
"moduleNameMapper": { | ||
"\\.(scss)$": "identity-obj-proxy" | ||
} | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.