Skip to content

Commit 057b925

Browse files
authored
feat: Prepare for publication to NPM (#673)
2 parents 89559a4 + 6202f7b commit 057b925

File tree

13 files changed

+31
-58
lines changed

13 files changed

+31
-58
lines changed

.dockerignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1-
.DS_Store
2-
.eslintcache
31
node_modules
42
npm-debug.log
53
coverage
6-
4+
module.config.js
75
dist/
8-
public/samples/
6+
/*.tgz
97

10-
### pyenv ###
11-
.python-version
8+
### i18n ###
9+
src/i18n/transifex_input.json
1210

13-
### Emacs ###
11+
### Editors ###
12+
.DS_Store
1413
*~
15-
*.swo
16-
*.swp
17-
18-
### Development environments ###
19-
.idea
20-
.vscode
21-
22-
# Local package dependencies
23-
module.config.js
24-
25-
### transifex ###
26-
src/i18n/transifex_input.json
27-
temp
28-
src/i18n/messages
14+
/temp
15+
/.vscode

.npmignore

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
.eslintignore
2-
.eslintrc.json
3-
.gitignore
4-
docker-compose.yml
5-
Dockerfile
6-
Makefile
7-
npm-debug.log
8-
9-
config
10-
coverage
1+
__mocks__
112
node_modules
12-
public
3+
*.test.js
4+
*.test.jsx
5+
*.test.ts
6+
*.test.tsx

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ pull_translations:
4545
mkdir src/i18n/messages
4646
cd src/i18n/messages \
4747
&& atlas pull $(ATLAS_OPTIONS) \
48-
translations/frontend-platform/src/i18n/messages:frontend-platform \
48+
translations/frontend-base/src/i18n/messages:frontend-base \
4949
translations/paragon/src/i18n/messages:paragon \
5050
translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard
5151

52-
$(intl_imports) frontend-platform paragon frontend-app-learner-dashboard
52+
$(intl_imports) frontend-base paragon frontend-app-learner-dashboard
5353

5454
# This target is used by CI.
5555
validate-no-uncommitted-package-lock-changes:

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
2-
"name": "@edx/frontend-app-learner-dashboard",
2+
"name": "@openedx/frontend-app-learner-dashboard",
33
"version": "1.0.0",
44
"description": "",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/edx/frontend-app-learner-dashboard.git"
88
},
99
"main": "src/index.ts",
10+
"files": [
11+
"/src"
12+
],
1013
"browserslist": [
1114
"extends @edx/browserslist-config"
1215
],
@@ -22,7 +25,7 @@
2225
"snapshot": "openedx test --updateSnapshot",
2326
"test": "openedx test --coverage --passWithNoTests"
2427
},
25-
"author": "edX",
28+
"author": "Open edX",
2629
"license": "AGPL-3.0",
2730
"homepage": "https://github.com/openedx/frontend-app-learner-dashboard#readme",
2831
"publishConfig": {

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!doctype html>
22
<html lang="en-us" dir="ltr">
33
<head>
4+
<title>Learner Dashboard Development Site></title>
45
<meta charset="utf-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
67
</head>

site.config.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { EnvironmentTypes, SiteConfig } from '@openedx/frontend-base';
22

3+
import { appId } from './src/constants';
4+
35
const siteConfig: SiteConfig = {
46
siteId: 'learner-dashboard-test-site',
57
siteName: 'Learner Dashboard Test Site',
@@ -8,10 +10,10 @@ const siteConfig: SiteConfig = {
810
loginUrl: 'http://localhost:8000/login',
911
logoutUrl: 'http://localhost:8000/logout',
1012

11-
environment: EnvironmentTypes.DEVELOPMENT,
13+
environment: EnvironmentTypes.TEST,
1214
basename: '/learner-dashboard',
1315
apps: [{
14-
appId: 'org.openedx.frontend.app.learnerDashboard',
16+
appId,
1517
config: {
1618
ECOMMERCE_BASE_URL: 'http://localhost:18130',
1719
FAVICON_URL: 'https://edx-cdn.org/v3/default/favicon.ico',

src/data/services/lms/urls.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getAppConfig, getSiteConfig } from '@openedx/frontend-base';
2+
import { appId } from '../../../constants';
23
import * as urls from './urls';
34

45
describe('urls', () => {
@@ -25,7 +26,7 @@ describe('urls', () => {
2526
it('returns the url if it is relative', () => {
2627
const url = '/edx.org';
2728
expect(urls.learningMfeUrl(url)).toEqual(
28-
`${getAppConfig('org.openedx.frontend.app.learnerDashboard').LEARNING_BASE_URL}${url}`,
29+
`${getAppConfig(appId).LEARNING_BASE_URL}${url}`,
2930
);
3031
});
3132
it('return null if url is null', () => {

0 commit comments

Comments
 (0)