Skip to content

Commit a7fbe1f

Browse files
authored
chore: added basic structure of repo (#2)
* chore: update README and setup github actions * chore: added package.json * chore: added package-lock file * chore: eslint config added * chore: added Make file * chore: added basic structure * chore: added codecov config
1 parent 3c3221c commit a7fbe1f

31 files changed

+24802
-0
lines changed

.env

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
NODE_ENV='production'
3+
ACCESS_TOKEN_COOKIE_NAME=''
4+
BASE_URL=''
5+
CREDENTIALS_BASE_URL=''
6+
CSRF_TOKEN_API_PATH=''
7+
ECOMMERCE_BASE_URL=''
8+
LANGUAGE_PREFERENCE_COOKIE_NAME=''
9+
LMS_BASE_URL=''
10+
LEARNING_BASE_URL=''
11+
LOGIN_URL=''
12+
LOGOUT_URL=''
13+
LOGO_URL=''
14+
LOGO_TRADEMARK_URL=''
15+
LOGO_WHITE_URL=''
16+
FAVICON_URL=''
17+
MARKETING_SITE_BASE_URL=''
18+
ORDER_HISTORY_URL=''
19+
REFRESH_ACCESS_TOKEN_ENDPOINT=''
20+
SEGMENT_KEY=''
21+
SITE_NAME=''
22+
USER_INFO_COOKIE_NAME=''
23+
SUPPORT_URL=''
24+
LEARNER_FEEDBACK_URL=''
25+
STAFF_FEEDBACK_URL=''

.env.development

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
NODE_ENV='development'
2+
PORT=2002
3+
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
4+
BASE_URL='http://localhost:2002'
5+
CREDENTIALS_BASE_URL='http://localhost:18150'
6+
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
7+
ECOMMERCE_BASE_URL='http://localhost:18130'
8+
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
9+
LMS_BASE_URL='http://localhost:18000'
10+
LEARNING_BASE_URL='http://localhost:2000'
11+
LOGIN_URL='http://localhost:18000/login'
12+
LOGOUT_URL='http://localhost:18000/logout'
13+
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
14+
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
15+
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
16+
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
17+
MARKETING_SITE_BASE_URL='http://localhost:18000'
18+
ORDER_HISTORY_URL='http://localhost:1996/orders'
19+
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
20+
SEGMENT_KEY=''
21+
SITE_NAME=localhost
22+
USER_INFO_COOKIE_NAME='edx-user-info'
23+
SUPPORT_URL='https://support.edx.org'
24+
LEARNER_FEEDBACK_URL=''
25+
STAFF_FEEDBACK_URL=''

.env.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
2+
BASE_URL='http://localhost:1995'
3+
CREDENTIALS_BASE_URL='http://localhost:18150'
4+
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
5+
ECOMMERCE_BASE_URL='http://localhost:18130'
6+
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
7+
LMS_BASE_URL='http://localhost:18000'
8+
LEARNING_BASE_URL='http://localhost:2000'
9+
LOGIN_URL='http://localhost:18000/login'
10+
LOGOUT_URL='http://localhost:18000/logout'
11+
LOGO_URL='https://edx-cdn.org/v3/default/logo.svg'
12+
LOGO_TRADEMARK_URL='https://edx-cdn.org/v3/default/logo-trademark.svg'
13+
LOGO_WHITE_URL='https://edx-cdn.org/v3/default/logo-white.svg'
14+
FAVICON_URL='https://edx-cdn.org/v3/default/favicon.ico'
15+
MARKETING_SITE_BASE_URL='http://localhost:18000'
16+
ORDER_HISTORY_URL='http://localhost:1996/orders'
17+
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
18+
SEGMENT_KEY=''
19+
SITE_NAME='localhost'
20+
USER_INFO_COOKIE_NAME='edx-user-info'
21+
SUPPORT_URL='https://support.edx.org'
22+
LEARNER_FEEDBACK_URL=''
23+
STAFF_FEEDBACK_URL=''

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
coverage/*
2+
dist/
3+
node_modules/
4+
jest.config.js
5+
example
6+
src/i18n/messages/
7+
src/lightning.js

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// eslint-disable-next-line import/no-extraneous-dependencies
2+
const { createConfig } = require('@openedx/frontend-build');
3+
4+
module.exports = createConfig(
5+
'eslint',
6+
{
7+
rules: {
8+
'react-hooks/exhaustive-deps': 'off',
9+
},
10+
},
11+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Run the workflow that adds new tickets that are either:
2+
# - labelled "DEPR"
3+
# - title starts with "[DEPR]"
4+
# - body starts with "Proposal Date" (this is the first template field)
5+
# to the org-wide DEPR project board
6+
7+
name: Add newly created DEPR issues to the DEPR project board
8+
9+
on:
10+
issues:
11+
types: [opened]
12+
13+
jobs:
14+
routeissue:
15+
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
16+
secrets:
17+
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
18+
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
19+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow runs when a comment is made on the ticket
2+
# If the comment starts with "label: " it tries to apply
3+
# the label indicated in rest of comment.
4+
# If the comment starts with "remove label: ", it tries
5+
# to remove the indicated label.
6+
# Note: Labels are allowed to have spaces and this script does
7+
# not parse spaces (as often a space is legitimate), so the command
8+
# "label: really long lots of words label" will apply the
9+
# label "really long lots of words label"
10+
11+
name: Allows for the adding and removing of labels via comment
12+
13+
on:
14+
issue_comment:
15+
types: [created]
16+
17+
jobs:
18+
add_remove_labels:
19+
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master
20+

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Default CI
2+
on:
3+
push:
4+
branches:
5+
- "master"
6+
pull_request:
7+
branches:
8+
- "**"
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Setup Nodejs
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: ".nvmrc"
22+
- name: Install dependencies
23+
run: npm ci
24+
- name: Lint
25+
run: npm run lint
26+
- name: Test
27+
run: npm run test
28+
- name: Build
29+
run: npm run build
30+
- name: i18n_extract
31+
run: npm run i18n_extract

.github/workflows/commitlint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Run commitlint on the commit messages in a pull request.
2+
3+
name: Lint Commit Messages
4+
5+
on:
6+
- pull_request
7+
8+
jobs:
9+
commitlint:
10+
uses: openedx/.github/.github/workflows/commitlint.yml@master
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#check package-lock file version
2+
3+
name: Lockfile Version check
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
jobs:
12+
version-check:
13+
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master

0 commit comments

Comments
 (0)