cns-course-mfe 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +71 -0
  2. package/package.json +92 -0
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # cns-courses-mfe
2
+ Home Learning Course Management Page
3
+
4
+ Built with Yarn, React, TypeScript, MUI, Vite, and Storybook.
5
+
6
+ ## Initial Installation
7
+
8
+ ### Prerequisites
9
+
10
+ Before installing this project, ensure you have the following installed on your system:
11
+
12
+ - Node.js
13
+ - yarn package manager
14
+ - Git
15
+
16
+ ### Installation Steps
17
+
18
+ 1. **Clone the repository**
19
+ ```bash
20
+ git clone <repository-url>
21
+ cd <project-directory>
22
+ ```
23
+
24
+ 2. **Install dependencies**
25
+ ```bash
26
+ yarn install
27
+ ```
28
+
29
+ 3. **Start the development server**
30
+ ```bash
31
+ yarn start
32
+ ```
33
+
34
+ 4. **Verify Storybook is running**
35
+
36
+ The Storybook documentation should now be running at `http://localhost:6006`
37
+
38
+ ## Scripts Documentation
39
+
40
+ ### Development Scripts
41
+ - **`start` / `storybook`** - Starts the Storybook development server on port 6006.
42
+
43
+ ### Code Quality Scripts
44
+ - **`lint`** - Runs ESLint to check for code quality issues and style violations.
45
+ - **`lint:fix`** - Runs ESLint with automatic fixing enabled to resolve fixable issues.
46
+ - **`format`** - Formats all source files in the `./src` directory using Prettier.
47
+ - **`format:check`** - Checks if source files in `./src` are formatted according to Prettier rules without modifying them.
48
+
49
+ ### Testing Scripts
50
+ - **`test:run`** - Runs all tests once with Vitest
51
+ - **`test:coverage`** - Runs all tests once with Vitest and generates a coverage report.
52
+ - **`test:watch`** - Runs Vitest in watch mode for continuous testing during development.
53
+ - **`test:ui`** - Launches Vitest with a UI interface for interactive test management.
54
+
55
+ ### Build Scripts
56
+ - **`build:dist`** - Builds the component library distribution files using Vite.
57
+ - **`build:storybook`** - Builds the static Storybook documentation site.
58
+
59
+ ## Copy Scripts
60
+
61
+ - **`copy:package`** - Copies the `package.json` file from the project root to the `dist` directory.
62
+ - **`copy:readme`** - Copies the `README.md` file from the project root to the `dist` directory.
63
+ - **`copy`** - Copies all the metadata files needed for distribution into the `dist` directory.
64
+
65
+ ### CI/CD Scripts
66
+ - **`test`** - Runs linting and test coverage checks for continuous integration.
67
+ - **`build`** - Runs both distribution and Storybook builds for continuous integration.
68
+ - **`ci`** - Executes the complete CI pipeline: tests followed by builds.
69
+
70
+ ## Pre-commit Script
71
+ Husky is configured to run a script before all commits that runs Prettier on modified code.
package/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "cns-course-mfe",
3
+ "version": "0.0.1",
4
+ "description": "Home Learning Course Management Page",
5
+ "repository": "https://github.com/edgenuity/cns-course-mfe.git",
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "require": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.cjs"
22
+ }
23
+ }
24
+ },
25
+ "scripts": {
26
+ "start": "yarn storybook",
27
+ "storybook": "storybook dev -p 6006",
28
+ "lint": "eslint",
29
+ "lint:fix": "eslint --fix",
30
+ "format": "prettier --write ./src",
31
+ "format:check": "prettier --check ./src",
32
+ "test:run": "vitest run",
33
+ "test:coverage": "vitest run --coverage",
34
+ "test:watch": "vitest",
35
+ "test:ui": "vitest --ui",
36
+ "build:dist": "vite build",
37
+ "build:storybook": "storybook build",
38
+ "copy:package": "cp ./package.json ./dist/package.json",
39
+ "copy:readme": "cp ./README.md ./dist/README.md",
40
+ "copy": "yarn copy:package && yarn copy:readme",
41
+ "test": "yarn lint && yarn test:run",
42
+ "build": "yarn build:dist && yarn build:storybook && yarn copy",
43
+ "ci": "yarn build && yarn test --coverage"
44
+ },
45
+ "prettier": "@imaginelearning/prettier-config",
46
+ "dependencies": {
47
+ "react": "^19.2.3",
48
+ "react-dom": "^19.2.3"
49
+ },
50
+ "peerDependencies": {
51
+ "react": "^19.2.3",
52
+ "react-dom": "^19.2.3"
53
+ },
54
+ "devDependencies": {
55
+ "@imaginelearning/prettier-config": "^0.1.1",
56
+ "@storybook/addon-a11y": "^10.1.11",
57
+ "@storybook/addon-docs": "^10.1.11",
58
+ "@storybook/addon-vitest": "^10.1.11",
59
+ "@storybook/react-vite": "^10.1.11",
60
+ "@testing-library/dom": "^10.4.1",
61
+ "@testing-library/jest-dom": "^6.9.1",
62
+ "@testing-library/react": "^16.3.2",
63
+ "@types/node": "^25.0.9",
64
+ "@types/react": "^19.2.8",
65
+ "@types/react-dom": "^19.2.3",
66
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
67
+ "@typescript-eslint/parser": "^8.53.1",
68
+ "@vitejs/plugin-react": "^5.1.2",
69
+ "@vitejs/plugin-react-swc": "^4.2.2",
70
+ "@vitest/coverage-v8": "^4.0.17",
71
+ "@vitest/ui": "^4.0.17",
72
+ "actions": "^1.3.0",
73
+ "eslint": "^9.39.2",
74
+ "eslint-config-react-app": "^7.0.1",
75
+ "eslint-plugin-jest-dom": "^5.5.0",
76
+ "eslint-plugin-jsx-a11y": "^6.10.2",
77
+ "eslint-plugin-react": "^7.37.5",
78
+ "eslint-plugin-react-hooks": "^7.0.1",
79
+ "eslint-plugin-storybook": "^10.1.11",
80
+ "eslint-plugin-testing-library": "^7.15.4",
81
+ "globals": "^17.0.0",
82
+ "husky": "^9.1.7",
83
+ "jsdom": "^27.4.0",
84
+ "playwright": "^1.57.0",
85
+ "prettier": "^3.8.0",
86
+ "storybook": "^10.1.11",
87
+ "typescript": "^5.9.3",
88
+ "vite": "^7.3.1",
89
+ "vite-plugin-dts": "^4.5.4",
90
+ "vitest": "^4.0.17"
91
+ }
92
+ }