Skip to content

Commit

Permalink
O3-1337: Initialise the project environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kumuditha-udayanga committed Jun 20, 2022
1 parent b45d6bb commit b1f9a2b
Show file tree
Hide file tree
Showing 25 changed files with 11,290 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/**/*.test.tsx
**/*.d.tsx
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parser": "@typescript-eslint/parser",
"extends": ["ts-react-important-stuff", "plugin:prettier/recommended"]
}
79 changes: 79 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Node.js CI

on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types:
- created

env:
ESM_NAME: "@openmrs/esm-template-app"
JS_NAME: "openmrs-esm-template-app.js"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- run: yarn
- run: yarn lint
- run: yarn coverage
- run: yarn typescript
- run: yarn build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist
pre_release:
runs-on: ubuntu-latest

needs: build

if: ${{ github.event_name == 'push' }}

steps:
- run: echo "Uncomment the lines below and delete this one."
# - uses: actions/checkout@v2
# - name: Download Artifacts
# uses: actions/download-artifact@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: "16.x"
# registry-url: "https://registry.npmjs.org"
# - run: npm install
# - run: sed -i -e "s/\(\"version\":\\s\+\"\([0-9]\+\.\?\)\+\)/\1-pre.${{ github.run_number }}/" 'package.json'
# - run: npm publish --access public --tag next
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

release:
runs-on: ubuntu-latest

needs: build

if: ${{ github.event_name == 'release' }}

steps:
- uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

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

# 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

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://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/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

dist/

# Intellij integration
*.iml
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# directories
.husky/
dist/
node_modules/

# dotfiles and generated
.*
yarn.lock

# by file type
**/*.css
**/*.scss
**/*.md
**/*.json
Loading

0 comments on commit b1f9a2b

Please sign in to comment.