Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

feat: add screenshots #3

Merged
merged 2 commits into from
Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ typings/
# dotenv environment variables file
.env


# Local Netlify folder
.netlify
4 changes: 3 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[build]
command = "npm run build"
functions = "build"
publish = "build"

[[redirects]]
from = "/"
to = "/.netlify/functions/index"
to = "/.netlify/functions/graphql-api"
status = 200
force = true
2,401 changes: 664 additions & 1,737 deletions package-lock.json

Large diffs are not rendered by default.

50 changes: 23 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@
"author": "Chris Barry <me@chrisb.xyz>",
"main": "build/index.js",
"scripts": {
"babel": "babel-node",
"build": "npx babel ./server --out-dir ./build --copy-files",
"build:netlify": "netlify-lambda build server/",
"build": "netlify-lambda build src/functions --config webpack.functions.js",
"clean": "rm -rf ./build",
"dev": "nodemon --config ./nodemon.json --exec npm run babel -- ./server ",
"lint:js": "eslint ./server --ignore-pattern 'build/**/*.js'",
"lint:js:fix": "eslint --fix ./server --ignore-pattern 'build/**/*.js'",
"prettier": "prettier './server/**/*.{ts,js,jsx,tsx,gql,html,yml,json}' --write",
"prettier:check": "prettier './server/**/*.{ts,js,jsx,tsx,gql,html,yml,json}' -c",
"prod": "npm run clean && npm run build && npm run start",
"start": "npm run build:netlify && netlify dev",
"test": "echo \"Error: no test specified\" && exit 1"
"lint:js": "eslint ./src --ignore-pattern 'build/**/*.js'",
"lint:js:fix": "eslint --fix ./src --ignore-pattern 'build/**/*.js'",
"prettier": "prettier './src/**/*.{ts,js,jsx,tsx,gql,html,yml,json}' --write",
"prettier:check": "prettier './src/**/*.{ts,js,jsx,tsx,gql,html,yml,json}' -c",
"start": "netlify dev"
},
"husky": {
"hooks": {
Expand All @@ -38,17 +33,17 @@
}
},
"lint-staged": {
"./server/**/*.json": [
"./src/**/*.json": [
"prettier -c"
],
"./server/**/*.{gql,html,yml,js}": [
"./src/**/*.{gql,html,yml,js,ts}": [
"prettier -c",
"eslint"
]
},
"dependencies": {
"apollo-server": "^2.9.12",
"apollo-server-lambda": "^2.9.12",
"apollo-server": "^2.9.15",
"apollo-server-lambda": "^2.9.15",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"dotenv": "^8.2.0",
Expand All @@ -61,29 +56,30 @@
"twitter-text": "^3.0.1"
},
"devDependencies": {
"@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/node": "^7.7.4",
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/node": "^7.7.7",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-env": "^7.7.7",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"eslint": "^6.7.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-unicorn": "^13.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-unicorn": "^15.0.1",
"husky": "^3.1.0",
"import-sort": "^6.0.0",
"import-sort-parser-typescript": "^6.0.0",
"import-sort-style-react": "^5.1.0",
"lint-staged": "^9.4.3",
"lint-staged": "^9.5.0",
"netlify-lambda": "^1.6.3",
"nodemon": "^2.0.1",
"nodemon": "^2.0.2",
"prettier": "^1.19.1",
"prettier-eslint": "^9.0.1",
"prettier-plugin-import-sort": "0.0.3",
"prettier-plugin-packagejson": "^2.0.2"
"prettier-plugin-packagejson": "^2.0.6",
"webpack-node-externals": "^1.7.2"
},
"importSort": {
".js, .jsx, .es6, .es": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const project = new GraphQLObjectType({
github: { type: GraphQLString, description: 'Where You Can See The Source Code' },
website: { type: GraphQLString, description: 'Where You Can See It' },
technologies: { type: new GraphQLList(GraphQLString), description: 'What Technologies I Used' },
screenshots: { type: new GraphQLList(GraphQLString), description: 'Images of the project' },
}),
});

Expand Down
17 changes: 12 additions & 5 deletions server/db/me.json → src/functions/db/me.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,32 @@
"Mongoose"
],
"github": "https://github.com/ChrisW-B/spotifyPlaylists",
"website": "https://spotifyapps.chriswbarry.com/"
"website": "https://spotifyapps.chriswbarry.com/",
"screenshots": ["https://files.chrisb.me/projects/Screenshot_2019-12-29+Autoplaylists+for+Spotify.png"]
},
{
"name": "@MagicGifsBot",
"description": "A little twitter bot that might respond with a gif!",
"technologies": ["Twitter API", "Giphy API", "Python"],
"github": "https://github.com/ChrisW-B/MagicGifs",
"website": "https://twitter.com/MagicGifsBot/"
"website": "https://twitter.com/MagicGifsBot/",
"screenshots": ["https://files.chrisb.me/projects/Screen+Shot+2019-12-29+at+12.36.21+PM.png"]
},
{
"name": "Positive News",
"description": "An experiment in identifying positivity and sentiment in news",
"technologies": ["EJS", "Express", "NodeJS", "Sentiment Analysis", "News API"],
"github": "https://github.com/ChrisW-B/positive-news",
"website": "https://news.chriswbarry.com/"
"website": "https://news.chriswbarry.com/",
"screenshots": ["https://files.chrisb.me/projects/Screenshot_2019-12-29+Positive+News.png"]
},
{
"name": "Isabella Kapur Art & Illustration",
"description": "A simple portfolio site for a friend",
"technologies": ["KeystoneJS", "Handlebars", "NodeJS", "Express", "SCSS"],
"github": "https://github.com/ChrisW-B/izzy-website",
"website": "https://isabellakapur.com/"
"website": "https://isabellakapur.com/",
"screenshots": ["https://files.chrisb.me/projects/Screenshot_2019-12-29+Isabella+Kapur+Art+Illustration.jpg"]
},
{
"name": "This Site!",
Expand All @@ -68,7 +72,10 @@
"NodeJS"
],
"github": "https://github.com/ChrisW-B/personalWebsite",
"website": "https://chriswbarry.com/"
"website": "https://chriswbarry.com/",
"screenshots": [
"https://files.chrisb.me/projects/Screenshot_2019-12-29+Chris+Barry+Software+Engineer+and+more.png"
]
}
],
"jobs": [
Expand Down
14 changes: 4 additions & 10 deletions server/index.js → src/functions/graphql-api.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
/* eslint-disable unicorn/filename-case */
// server/index.js

import { ApolloServer } from 'apollo-server-lambda';
import env from 'dotenv';

import schema from './db/graphql';

env.config();

// import env from 'dotenv';
// env.config();
const server = new ApolloServer({ schema, playground: true, introspection: true });

exports.handler = server.createHandler({
cors: {
origin: '*',
credentials: true,
},
});
exports.handler = server.createHandler({ cors: { origin: '*', credentials: true } });
6 changes: 6 additions & 0 deletions webpack.functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const nodeExternals = require('webpack-node-externals');

module.exports = {
optimization: { minimize: false },
externals: [nodeExternals()],
};