Fakultas Ilmu Komputer UI

Commit 15d2e47d authored by WILLIAM GATES's avatar WILLIAM GATES
Browse files

Initialize project

parent 989f5eee
{
"presets": ["@babel/preset-react", "@babel/preset-env"]
}
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
"prettier/react"
],
"rules": {
"react/prop-types": 0,
"react-hooks/rules-of-hooks": "error",
"no-console": "warn"
},
"parser": "babel-eslint",
"plugins": ["react", "import", "jsx-a11y", "react-hooks"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"settings": {
"react": {
"version": "detect"
}
}
}
......@@ -4,6 +4,8 @@
/node_modules
/.pnp
.pnp.js
/.cache
/dist
# testing
/coverage
......
stages:
- test
- deploy
test:
image: node:latest
stage: test
script:
- npm install
- npm run test:coverage
staging:
image: node:latest
stage: deploy
......@@ -9,9 +17,9 @@ staging:
NETLIFY_SITE_ID: $STAGING_NETLIFY_SITE_ID
script:
- npm install
- CI=false npm run build
- CI="false" npm run build
- npm install netlify-cli -g
- netlify deploy --dir "build" --prod
- netlify deploy --dir "dist" --prod
only:
- staging
......@@ -27,7 +35,7 @@ production:
- CI=false npm run build
- apt update -y && apt install python3-dev python3-pip zip -y
- pip3 install awscli
- cd build
- cd dist
- zip -r home-industry.zip *
- aws s3 cp home-industry.zip s3://$AWS_STORAGE_BUCKET_NAME
only:
......
# Home Industry Admin
[![pipeline status](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-tpu-online/post-rpl-web/badges/master/pipeline.svg)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-tpu-online/post-rpl-web/commits/master)
[![coverage report](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-tpu-online/post-rpl-web/badges/master/coverage.svg)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-tpu-online/post-rpl-web/commits/master)
module.exports = 'test-file-stub';
module.exports = {};
This diff is collapsed.
......@@ -3,18 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0",
"@testing-library/user-event": "^7.2.1",
"@reach/router": "^1.3.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"start": "parcel public/index.html",
"build": "parcel build public/index.html",
"test": "jest",
"test:coverage": "jest --coverage",
"format": "prettier --write \"src/**/*.{js,jsx}\""
},
"eslintConfig": {
"extends": "react-app"
......@@ -30,5 +29,28 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@testing-library/react": "^9.4.0",
"@types/jest": "^25.1.2",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^2.3.0",
"jest": "^25.1.0",
"parcel-bundler": "^1.12.4",
"prettier": "^1.19.1"
},
"jest": {
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
}
}
}
......@@ -2,25 +2,25 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="manifest" href="manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
Unlike "/favicon.ico" or "favicon.ico", "favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
......@@ -40,4 +40,5 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
<script src="../src/index.js"></script>
</html>
......@@ -2,8 +2,8 @@ import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
test('renders hello world', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
const paragraphElement = getByText(/Hello, World!/i);
expect(paragraphElement.textContent).toStrictEqual("Hello, World!");;
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment