Skip to content

Commit

Permalink
open source
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyuanruo committed Apr 9, 2020
0 parents commit b811436
Show file tree
Hide file tree
Showing 116 changed files with 20,710 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
docker-compose.yml
Dockerfile
.travis.yml
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true,
"node": true
},
"plugins": ["jsdoc"],
"rules": {
"no-console": "off",
"comma-dangle": ["error", "always-multiline"],
"import/no-unresolved": "warn",
"newline-per-chained-call": ["error"],
"react/jsx-filename-extension": "off",
"react/require-default-props": "warn",
"react/forbid-prop-types": "warn",
"react/prop-types": "off",
"no-unused-vars": ["error"],
"jsx-a11y/label-has-for": "off",
"jsx-a11y/label-has-associated-control": "off",
"semi": [2, "never"],
"react/no-string-refs": "warn",
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"jsdoc/require-description-complete-sentence": "error"
},
"settings": {
"import/resolver": {
"alias": {
"map": [
["^~", "./src/client"],
["^\\$components", "./src/client/scss/components"]
],
"extensions": [".jsx", ".js", ".scss", ".css"]
}
}
}
}
19 changes: 19 additions & 0 deletions .eslintrc.ts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parser": "@typescript-eslint/parser",
"extends": ["airbnb", "plugin:import/typescript"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["jsdoc"],
"rules": {
"comma-dangle": ["error", "always-multiline"],
"import/first": "off",
"newline-per-chained-call": ["error"],
"no-console": "off",
"no-unused-vars": "off",
"semi": [2, "never"],
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"jsdoc/require-description-complete-sentence": "error"
}
}
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
54 changes: 54 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Problem

_What problem are you trying to solve? What issue does this close?_

Closes [insert issue #]

## Solution

_How did you solve the problem?_

**Features**:

- Details ...

**Improvements**:

- Details ...

**Bug Fixes**:

- Details ...

## Before & After Screenshots

**BEFORE**:
[insert screenshot here]

**AFTER**:
[insert screenshot here]

## Tests

_What tests should be run to confirm functionality?_

## Deploy Notes

_Notes regarding deployment of the contained body of work. These should note any
new dependencies, new scripts, etc._

**New environment variables**:

- `env var` : env var details

**New scripts**:

- `script` : script details

**New dependencies**:

- `dependency` : dependency details

**New dev dependencies**:

- `dependency` : dependency details
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode
node_modules
dist
*.log
yarn.lock
build
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
language: node_js

node_js:
- 10

services:
- docker

cache:
directories:
- 'node_modules'

notifications:
email:
recipients:
- $EMAIL_RECIPIENT
on_success: always
on_failure: always

install:
- npm install

script:
- npm run lint
- npm run build
#TODO: test

# Directly rely on presence of Dockerfile to deploy
deploy:
- provider: elasticbeanstalk
skip_cleanup: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_EB_REGION
app: $AWS_EB_APP_STAGING
env: $AWS_EB_ENV_STAGING
bucket_name: $AWS_EB_BUCKET_STAGING
on:
branch: $STAGING_BRANCH
- provider: elasticbeanstalk
skip_cleanup: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_EB_REGION
app: $AWS_EB_APP_PRODUCTION
env: $AWS_EB_ENV_PRODUCTION
bucket_name: $AWS_EB_BUCKET_PRODUCTION
on:
branch: $PRODUCTION_BRANCH
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing to GogovSG

The following is a set of guidelines for contributing GogovSG. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in an issue.

# Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.
Head over [here](https://go.gov.sg/ogp-cla) to submit one.

You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project owned by [Govtech](www.tech.gov.sg)), you probably don't need to do it again.

# How can I contribute?

When contributing to this repository, **please first discuss the change you wish to make via issue**, email, or any other method with the owners of this repository before making a change.

This section guides you through submitting a bug reports or feature requests for GogovSG. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

Before submitting bug reports or feature request, please check [existing or past issues](https://go.gov.sg/go-issues) and [existing or past pull requests](https://go.gov.sg/go-pr).
You might find out that you don't need to create one.

When **submitting a bug report**, please include as many details as possible, such as the steps to reproduce this bug, expected and actual behaviour.

When **submitting a feature request**, please include the motivation, alternatives that you've considered and any additional contexts that could help us better understand your goal.

Here are some tips to writing good issues:
- **Use clear and descriptive title** to identify the problem
- **Describe the exact steps to reproduce the problem** and **explain how you did it**
- **Provide specific examples to demonstrate the steps**
- **Include screenshots or animated GIFs if you can**
- **Explain why this new feature would be useful**

## Pull Request Process

If you're submitting a pull request, some things to take note:

1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. Refer to [README.md](https://go.gov.sg/go-readme) for more details
2. Update the [README.md](https://go.gov.sg/go-readme) with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
<!---Increase the version numbers of the packages in any example files and the [README.md](https://github.com/datagovsg/GoGovSG/blob/release/README.md) to the new version that this Pull Request would represent.--->
3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

Have questions? You can also reach out to us [here](https://form.gov.sg/5e8cb756772ca700110343bd).

Loading

0 comments on commit b811436

Please sign in to comment.