Skip to content

Commit

Permalink
feat: convert this library to be "buildless"
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Aug 1, 2024
1 parent 5ff22c1 commit 1c19e8f
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 212 deletions.
2 changes: 0 additions & 2 deletions .env.development

This file was deleted.

4 changes: 2 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"path": "@semantic-release/github",
"assets": {
"path": "dist/*"
"path": "src/*"
}
}
],
Expand All @@ -18,7 +18,7 @@
{
"path": "@semantic-release/github",
"assets": {
"path": "dist/*"
"path": "src/*"
}
}
],
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ It will also configure the editor to be viewable in the gallery view. Adding the
- To make this easier, we provide example files for `jest.config.js` and `setupTest.js` that are known to work.
You can find them in the example/ folder.

## Installing into Course Authoring MFE in dev mode

This is tricky to do correctly, but something like this should work, allowing
you to edit this code and see it reflected immediately in the MFE. Run these
commands, starting from the course authoring MFE's working directory:

```
npm install
rm -rf node_modules/@edx/frontend-lib-content-components && ln -s "$(realpath ../frontend-lib-content-components)" node_modules/@edx/frontend-lib-content-components
cd ../frontend-lib-content-components
rm -rf node_modules && ln -s ../frontend-app-course-authoring/node_modules node_modules
```

## License

The code in this repository is licensed under the AGPLv3 unless otherwise
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

42 changes: 0 additions & 42 deletions example/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions example/index.scss

This file was deleted.

30 changes: 0 additions & 30 deletions example/jest.config.example.js

This file was deleted.

51 changes: 0 additions & 51 deletions example/setupTest.example.js

This file was deleted.

43 changes: 15 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,44 @@
"name": "@edx/frontend-lib-content-components",
"version": "1.0.0-semantically-released",
"description": "A library of high-level components for content handling.",
"main": "dist/index.js",
"publishConfig": {
"access": "public"
},
"scripts": {
"prepare": "make build",
"build": "make build",
"i18n_extract": "fedx-scripts formatjs extract",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"test": "fedx-scripts jest --coverage",
"addXblock": "node addXblock"
},
"files": [
"/dist"
],
"exports": {
".": {
"import": "./src/index.tsx",
"types": "./src/index.tsx"
}
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/edx/frontend-lib-content-components.git"
"url": "git+https://github.com/openedx/frontend-lib-content-components.git"
},
"author": "edX",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/edx/frontend-lib-content-components/issues"
"url": "https://github.com/openedx/frontend-lib-content-components/issues"
},
"browserslist": [
"extends @edx/browserslist-config"
],
"homepage": "https://github.com/edx/frontend-lib-content-components#readme",
"homepage": "https://github.com/openedx/frontend-lib-content-components#readme",
"devDependencies": {
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-platform": "8.0.0",
"@edx/react-unit-test-utils": "3.0.0",
"@edx/reactifex": "^2.1.1",
"@openedx/frontend-build": "14.0.3",
"@openedx/paragon": "^22.0.0",
"@testing-library/dom": "^8.13.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
Expand All @@ -53,13 +48,8 @@
"eslint-plugin-import": "^2.26.0",
"husky": "7.0.4",
"jest-canvas-mock": "^2.5.1",
"prop-types": "15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "6.15.0",
"react-test-renderer": "^17.0.2",
"redux-saga": "1.1.3",
"webpack-cli": "4.10.0"
"redux-mock-store": "^1.5.4"
},
"dependencies": {
"@codemirror/lang-html": "^6.0.0",
Expand All @@ -71,10 +61,8 @@
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.3",
"@edx/browserslist-config": "^1.1.1",
"@reduxjs/toolkit": "^1.8.1",
"@tinymce/tinymce-react": "^3.14.0",
"babel-polyfill": "6.26.0",
"classnames": "^2.5.1",
"codemirror": "^6.0.0",
"fast-xml-parser": "^4.0.10",
Expand All @@ -91,7 +79,6 @@
"redux": "4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-logger": "^3.0.6",
"redux-mock-store": "^1.5.4",
"redux-thunk": "^2.4.1",
"reselect": "^4.1.5",
"tinymce": "^5.10.4",
Expand All @@ -100,10 +87,10 @@
"xmlchecker": "^0.1.0"
},
"peerDependencies": {
"@edx/frontend-platform": "^7.0.1 || ^8.0.0",
"@openedx/paragon": "^21.5.7 || ^22.0.0",
"prop-types": "^15.5.10",
"react": "^16.14.0 || ^17.0.0",
"react-dom": "^16.14.0 || ^17.0.0"
"@edx/frontend-platform": "^8",
"@openedx/paragon": "^22",
"prop-types": "^15",
"react": "^17 || ^18",
"react-dom": "^17 || ^18"
}
}
11 changes: 0 additions & 11 deletions public/index.html

This file was deleted.

File renamed without changes.
19 changes: 0 additions & 19 deletions webpack.dev.config.js

This file was deleted.

14 changes: 0 additions & 14 deletions webpack.prod.config.js

This file was deleted.

9 changes: 5 additions & 4 deletions www/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c19e8f

Please sign in to comment.