Skip to content

Commit 787e780

Browse files
author
Ben Warzeski
committed
initial checkin
1 parent ffc23cf commit 787e780

File tree

102 files changed

+63591
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+63591
-0
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
npm-debug.log
3+
README.md
4+
LICENSE
5+
.babelrc
6+
.eslintignore
7+
.eslintrc.json
8+
.gitignore
9+
.npmignore
10+
commitlint.config.js

.env

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
NODE_ENV='production'
2+
NODE_PATH=./src
3+
BASE_URL=''
4+
LMS_BASE_URL=''
5+
LOGIN_URL=''
6+
LOGOUT_URL=''
7+
CSRF_TOKEN_API_PATH=''
8+
REFRESH_ACCESS_TOKEN_ENDPOINT=''
9+
DATA_API_BASE_URL=''
10+
SEGMENT_KEY=''
11+
FEATURE_FLAGS={}
12+
ACCESS_TOKEN_COOKIE_NAME=''
13+
NEW_RELIC_APP_ID=''
14+
NEW_RELIC_LICENSE_KEY=''
15+
SITE_NAME=''
16+
MARKETING_SITE_BASE_URL=''
17+
SUPPORT_URL=''
18+
CONTACT_URL=''
19+
OPEN_SOURCE_URL=''
20+
TERMS_OF_SERVICE_URL=''
21+
PRIVACY_POLICY_URL=''
22+
FACEBOOK_URL=''
23+
TWITTER_URL=''
24+
YOU_TUBE_URL=''
25+
LINKED_IN_URL=''
26+
REDDIT_URL=''
27+
APPLE_APP_STORE_URL=''
28+
GOOGLE_PLAY_URL=''
29+
ENTERPRISE_MARKETING_URL=''
30+
ENTERPRISE_MARKETING_UTM_SOURCE=''
31+
ENTERPRISE_MARKETING_UTM_CAMPAIGN=''
32+
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM=''

.env.development

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
NODE_ENV='development'
2+
PORT=1993
3+
BASE_URL='localhost:1993'
4+
LMS_BASE_URL='http://localhost:18000'
5+
LOGIN_URL='http://localhost:18000/login'
6+
LOGOUT_URL='http://localhost:18000/logout'
7+
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
8+
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
9+
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
10+
LOGO_POWERED_BY_OPEN_EDX_URL_SVG=https://edx-cdn.org/v3/stage/open-edx-tag.svg
11+
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
12+
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
13+
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
14+
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
15+
USER_INFO_COOKIE_NAME='edx-user-info'
16+
SITE_NAME=localhost
17+
DATA_API_BASE_URL='http://localhost:8000'
18+
// LMS_CLIENT_ID should match the lms DOT client application id your LMS containe
19+
LMS_CLIENT_ID='login-service-client-id'
20+
SEGMENT_KEY=''
21+
FEATURE_FLAGS={}
22+
MARKETING_SITE_BASE_URL='http://localhost:18000'
23+
SUPPORT_URL='http://localhost:18000/support'
24+
CONTACT_URL='http://localhost:18000/contact'
25+
OPEN_SOURCE_URL='http://localhost:18000/openedx'
26+
TERMS_OF_SERVICE_URL='http://localhost:18000/terms-of-service'
27+
PRIVACY_POLICY_URL='http://localhost:18000/privacy-policy'
28+
FACEBOOK_URL='https://www.facebook.com'
29+
TWITTER_URL='https://twitter.com'
30+
YOU_TUBE_URL='https://www.youtube.com'
31+
LINKED_IN_URL='https://www.linkedin.com'
32+
REDDIT_URL='https://www.reddit.com'
33+
APPLE_APP_STORE_URL='https://www.apple.com/ios/app-store/'
34+
GOOGLE_PLAY_URL='https://play.google.com/store'
35+
ENTERPRISE_MARKETING_URL='http://example.com'
36+
ENTERPRISE_MARKETING_UTM_SOURCE='example.com'
37+
ENTERPRISE_MARKETING_UTM_CAMPAIGN='example.com Referral'
38+
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM='Footer'

.env.test

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
NODE_ENV='test'
2+
PORT=1993
3+
BASE_URL='localhost:1993'
4+
LMS_BASE_URL='http://localhost:18000'
5+
LOGIN_URL='http://localhost:18000/login'
6+
LOGOUT_URL='http://localhost:18000/logout'
7+
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
8+
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
9+
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
10+
LOGO_POWERED_BY_OPEN_EDX_URL_SVG=https://edx-cdn.org/v3/stage/open-edx-tag.svg
11+
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
12+
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
13+
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
14+
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
15+
USER_INFO_COOKIE_NAME='edx-user-info'
16+
SITE_NAME=localhost
17+
DATA_API_BASE_URL='http://localhost:8000'
18+
// LMS_CLIENT_ID should match the lms DOT client application id your LMS containe
19+
LMS_CLIENT_ID='login-service-client-id'
20+
SEGMENT_KEY=''
21+
FEATURE_FLAGS={}
22+
MARKETING_SITE_BASE_URL='http://localhost:18000'
23+
SUPPORT_URL='http://localhost:18000/support'
24+
CONTACT_URL='http://localhost:18000/contact'
25+
OPEN_SOURCE_URL='http://localhost:18000/openedx'
26+
TERMS_OF_SERVICE_URL='http://localhost:18000/terms-of-service'
27+
PRIVACY_POLICY_URL='http://localhost:18000/privacy-policy'
28+
FACEBOOK_URL='https://www.facebook.com'
29+
TWITTER_URL='https://twitter.com'
30+
YOU_TUBE_URL='https://www.youtube.com'
31+
LINKED_IN_URL='https://www.linkedin.com'
32+
REDDIT_URL='https://www.reddit.com'
33+
APPLE_APP_STORE_URL='https://www.apple.com/ios/app-store/'
34+
GOOGLE_PLAY_URL='https://play.google.com/store'
35+
ENTERPRISE_MARKETING_URL='http://example.com'
36+
ENTERPRISE_MARKETING_UTM_SOURCE='example.com'
37+
ENTERPRISE_MARKETING_UTM_CAMPAIGN='example.com Referral'
38+
ENTERPRISE_MARKETING_FOOTER_UTM_MEDIUM='Footer'

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage/*
2+
dist/
3+
node_modules/
4+
src/postcss.config.js
5+
src/segment.js

.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { createConfig } = require('@edx/frontend-build');
2+
3+
const config = createConfig('eslint', {
4+
rules: {
5+
'import/no-named-as-default': 'off',
6+
'import/no-named-as-default-member': 'off',
7+
'import/no-self-import': 'off',
8+
'spaced-comment': ['error', 'always', { 'block': { 'exceptions': ['*'] } }],
9+
},
10+
});
11+
12+
config.settings = {
13+
"import/resolver": {
14+
node: {
15+
paths: ["src", "node_modules"],
16+
extensions: [".js", ".jsx"],
17+
},
18+
},
19+
};
20+
21+
module.exports = config;

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.snap linguist-generated=false

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
tests:
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
matrix:
16+
node: [12, 14, 16]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Setup Nodejs
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ matrix.node }}
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Verify No Uncommitted Changes
30+
run: make validate-no-uncommitted-package-lock-changes
31+
32+
- name: Lint
33+
run: npm run lint
34+
35+
- name: Test
36+
run: npm run test
37+
38+
- name: Build
39+
run: npm run build
40+
41+
- name: Run Coverage
42+
uses: codecov/codecov-action@v2
43+
44+
- name: Send failure notification
45+
if: ${{ failure() }}
46+
uses: dawidd6/action-send-mail@v3
47+
with:
48+
server_address: email-smtp.us-east-1.amazonaws.com
49+
server_port: 465
50+
username: ${{ secrets.EDX_SMTP_USERNAME }}
51+
password: ${{ secrets.EDX_SMTP_PASSWORD }}
52+
subject: Upgrade python requirements workflow failed in ${{github.repository}}
53+
to: masters-grades@edx.org
54+
from: github-actions <github-actions@edx.org>
55+
body: Upgrade python requirements workflow in ${{github.repository}} failed!
56+
For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id
57+
}}"

.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: edx/.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+
- master
9+
pull_request:
10+
11+
jobs:
12+
version-check:
13+
uses: edx/.github/.github/workflows/lockfileversion-check.yml@master

0 commit comments

Comments
 (0)