Skip to content

Commit

Permalink
migrate to github
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrku committed Feb 25, 2021
0 parents commit bbc379b
Show file tree
Hide file tree
Showing 58 changed files with 10,454 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["next/babel"]
}
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.mdx-data
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

public/sw.js
public/sw.js.map
public/workbox-*
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This is an opinonated Next.js starter project that makes it relatively simple to spin up a new project.

## Getting Started

First, run the development server:

```bash
yarn dev
```

If you'd like serverless function support:

```bash
vercel dev
```

I'm personally in the "just do Next.js the Vercel way because it gives me modern best practices without a lot of friction" but if you've got other preferences you probably know how to manage them anyway.

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `src/pages/index.js`. The page auto-updates as you edit the file.

You can also add mdx files in `src/pages/` and they will be presented at the cooresponding route.

Tailwind and Emotion are available for styling using utility classes and css-in-js respectively.

Testing is facilitated through React Testing Library and Jest.

`next-seo` and `next-sitemap` are doing their jobs very well. Be sure to update `/next-sitemap.js` and `/next-seo.json` with your information!
8 changes: 8 additions & 0 deletions config/jest/cssTransform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
process() {
return 'module.exports = {};';
},
getCacheKey() {
return 'cssTransform';
},
};
14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
testPathIgnorePatterns: ['/node_modules/', '/.next/', '/.vercel/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^.+\\.scss$': '<rootDir>/config/jest/cssTransform.js',
},
transformIgnorePatterns: ['/node_modules/', '^.+\\.module\\.(css|sass|scss)$'],
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
},
};
2 changes: 2 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const withPlugins = require('next-compose-plugins');
const withPWA = require('next-pwa');

const nextConfig = {
reactStrictMode: true,
future: { webpack5: true },
pwa: {
disable: process.env.NODE_ENV === 'development',
dest: 'public',
},
async redirects() {
return [];
},
};

// module.exports = withPlugins([], nextConfig);
module.exports = withPlugins([[withPWA]], nextConfig);
78 changes: 78 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "foreach-watchtower",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "NODE_ENV=production next build && next export",
"export": "next export",
"start": "next start",
"test": "jest --watch"
},
"dependencies": {
"@types/react-modal": "^3.12.0",
"date-fns": "^2.17.0",
"next": "^10.0.7",
"next-pwa": "^5.0.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-modal": "^3.12.1",
"react-sortable-hoc": "^1.11.0"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"@babel/plugin-transform-react-jsx": "^7.12.17",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@types/node": "^14.14.31",
"@types/react": "^17.0.2",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-plugin-macros": "^3.0.1",
"dotenv-flow": "^3.2.0",
"eslint": "^7.20.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.3.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"next-compose-plugins": "^2.2.1",
"prettier": "^2.2.1",
"react-test-renderer": "^17.0.1",
"sass": "^1.32.8",
"typescript": "^4.2.2",
"webpack": "^5.24.2"
},
"eslintConfig": {
"extends": "react-app"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,md}": [
"prettier --write"
],
"src/**/*.{ts,tsx,md,mdx,js}": [
"prettier --write"
]
},
"prettier": {
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
}
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/icons/DragIndicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/PowerButton.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/Trashbin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/artemis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/bamboo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/apps/biblio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/biketowork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/bitbucket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/clockify.ico
Binary file not shown.
Binary file added public/icons/apps/confluence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/google.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/grid-world.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/jira.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/meetingdashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/onedrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/openvpn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/outlook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/apps/slack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/apps/tracker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions public/icons/foreach-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions rtl.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://github.com/kentcdodds/react-testing-library#global-config
import 'jest-dom/extend-expect';
6 changes: 6 additions & 0 deletions setupTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// optional: configure or set up a testing framework before each test
// if you delete this file, remove `setupFilesAfterEnv` from `jest.config.js`

// used for __tests__/testing-library.js
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
21 changes: 21 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@import "./scss/reset.css";
@import "./scss/defaults.scss";
@import "./scss/page-layout.scss";
@import "./scss/grid.scss";


.Button {
padding: 10px;
appearance: none;
margin: 10px;
border-radius: 3px;
background: transparent;
border: 1px solid var(--primary-color-light);
color: var(--primary-color-light);
transition: all 300ms ease;
&:hover {

background: var(--primary-color-light);
color: var(--primary-color-dark);
}
}
8 changes: 8 additions & 0 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import App from './App';
import { render } from '@testing-library/react';

it('renders without crashing', async () => {
const { findByText } = render(<App />);
await findByText('Watchtower');
});
Loading

0 comments on commit bbc379b

Please sign in to comment.