-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add auto formatting packages * prettier fixes * eslint fixes * add github action * Add google styles to Prettier * Fix format after merge
- Loading branch information
Showing
29 changed files
with
1,691 additions
and
267 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2020: true, | ||
node: true, | ||
mocha: true, | ||
}, | ||
extends: ['eslint:recommended', 'google', 'prettier'], | ||
parserOptions: { | ||
ecmaVersion: 11, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['hbs'], | ||
rules: { | ||
'hbs/check-hbs-template-literals': 2, | ||
}, | ||
}; |
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 @@ | ||
name: Code Quality Check | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
quality-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Install Dependancies' | ||
run: npm ci | ||
- name: 'Run Linter' | ||
run: npm run lint-check | ||
- name: 'Run Formatter' | ||
run: npm run format-check |
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,121 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# VSCode | ||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
.vscode | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Mac OS | ||
.DS_Store |
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,15 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"jsxBracketSameLine": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.handlebars", | ||
"options": { | ||
"parser": "html", | ||
"printWidth": 100 | ||
} | ||
} | ||
] | ||
} |
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,29 +1,34 @@ | ||
# Node.js skeleton repo for Google STEP Intern Program | ||
|
||
## Get started | ||
## Get started | ||
|
||
You need to have an active Node.js installation on your laptop before startup this skeleton Node.js server. We recommend to install `nvm` [(Node Version Manager)](https://github.com/nvm-sh/nvm) to manage your local Node.js builds. | ||
|
||
To install `nvm`: | ||
To install `nvm`: | ||
|
||
``` | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | ||
``` | ||
|
||
To install LTS version (`node v12.18.0`) of Node.js with `nvm`: | ||
|
||
``` | ||
nvm install 12.18.0 | ||
``` | ||
|
||
To verify the LTS version is successfully installed: | ||
|
||
``` | ||
node -v | ||
``` | ||
|
||
## Install and Launch | ||
|
||
To install and launch this skeleton server on your local instance, first run | ||
```npm install``` | ||
`npm install` | ||
|
||
then run | ||
then run | ||
|
||
```npm start``` | ||
`npm start` | ||
|
||
After few seconds, your local instance of this skeleton server should be available at `http://localhost:3000`. | ||
After few seconds, your local instance of this skeleton server should be available at `http://localhost:3000`. |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
steps: | ||
- name: node | ||
entrypoint: npm | ||
args: ['install'] | ||
- name: node | ||
entrypoint: npm | ||
args: ["run", "create-env-dev"] | ||
env: | ||
- 'MAPS_KEY=${_MAPS_PROD_KEY}' | ||
- 'PASSPORT_CLIENT_ID=${_PASSPORT_DEV_CLIENT_ID}' | ||
- 'PASSPORT_CLIENT_SECRET=${_PASSPORT_DEV_CLIENT_SECRET}' | ||
- 'BASE_URL=${_BASE_URL}' | ||
- name: node | ||
entrypoint: npm | ||
args: ['test'] | ||
- name: node | ||
entrypoint: npm | ||
args: ['install'] | ||
- name: node | ||
entrypoint: npm | ||
args: ['run', 'create-env-dev'] | ||
env: | ||
- 'MAPS_KEY=${_MAPS_PROD_KEY}' | ||
- 'PASSPORT_CLIENT_ID=${_PASSPORT_DEV_CLIENT_ID}' | ||
- 'PASSPORT_CLIENT_SECRET=${_PASSPORT_DEV_CLIENT_SECRET}' | ||
- 'BASE_URL=${_BASE_URL}' | ||
- name: node | ||
entrypoint: npm | ||
args: ['test'] |
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,16 +1,16 @@ | ||
steps: | ||
- name: node | ||
entrypoint: npm | ||
args: ['install'] | ||
- name: node | ||
entrypoint: npm | ||
args: ["run", "create-env-prod"] | ||
env: | ||
- 'MAPS_KEY=${_MAPS_PROD_KEY}' | ||
- 'PASSPORT_CLIENT_ID=${_PASSPORT_PROD_CLIENT_ID}' | ||
- 'PASSPORT_CLIENT_SECRET=${_PASSPORT_PROD_CLIENT_SECRET}' | ||
- 'BASE_URL=${_BASE_URL}' | ||
- name: "gcr.io/cloud-builders/gcloud" | ||
args: ["app", "deploy"] | ||
timeout: 1800s | ||
- name: node | ||
entrypoint: npm | ||
args: ['install'] | ||
- name: node | ||
entrypoint: npm | ||
args: ['run', 'create-env-prod'] | ||
env: | ||
- 'MAPS_KEY=${_MAPS_PROD_KEY}' | ||
- 'PASSPORT_CLIENT_ID=${_PASSPORT_PROD_CLIENT_ID}' | ||
- 'PASSPORT_CLIENT_SECRET=${_PASSPORT_PROD_CLIENT_SECRET}' | ||
- 'BASE_URL=${_BASE_URL}' | ||
- name: 'gcr.io/cloud-builders/gcloud' | ||
args: ['app', 'deploy'] | ||
timeout: 1800s | ||
timeout: 3000s |
Oops, something went wrong.