Skip to content

Commit 50e557b

Browse files
committed
better readme
1 parent a11d8b3 commit 50e557b

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,22 @@ To set up the project for local development:
316316
cd data-structures-and-algorithms
317317
```
318318

319-
2. **Install dependencies**:
320-
```bash
321-
npm install
322-
```
319+
### 1.1 Access to GitHubs Package manager
320+
321+
First-time setup for a project that depends on **nss-core**:
322+
323+
- Create and set your **NPM token (`NPM_TOKEN`)** as described [here](https://github.com/NSS-Workshops/platform?tab=readme-ov-file#installation-consumer-projects-installation)
323324

324-
3. **Create environment variables**:
325+
326+
1.2. **Create environment variables**:
325327
Create a `.env.local` file in the project root:
326328
```
327-
VITE_OAUTH_CLIENT_ID=your_github_oauth_client_id
328-
VITE_PROXY_DOMAIN=http://localhost:3003
329+
VITE_LEARNING_PLATFORM_API=http://localhost:8000
330+
```
331+
332+
2. **Install dependencies**:
333+
```bash
334+
npm install
329335
```
330336

331337
4. **Start the development server**:

vite.config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,18 @@ export default defineConfig(({ mode }) => {
77
const env = loadEnv(mode, process.cwd(), '');
88

99
console.log('OAuth env variables loaded:', {
10-
clientId: env.VITE_OAUTH_CLIENT_ID ? 'Present' : 'Missing',
11-
proxyDomain: env.VITE_PROXY_DOMAIN ? 'Present' : 'Missing',
1210
lmsDomain: env.VITE_LEARNING_PLATFORM_API ? 'Present' : 'Missing',
1311
});
1412

15-
// Make sure we have the required environment variables
16-
if (!env.VITE_OAUTH_CLIENT_ID || !env.VITE_PROXY_DOMAIN) {
17-
console.warn('WARNING: Missing environment variables. OAuth authentication may not work properly.');
18-
console.warn('Make sure you have VITE_OAUTH_CLIENT_ID and VITE_PROXY_DOMAIN in your .env.local file');
19-
}
20-
2113
return {
2214
base: '/data-structures-and-algorithms/',
2315
plugins: [
2416
react({
2517
jsxImportSource: '@emotion/react',
2618
babel: {
27-
plugins: ['@emotion/babel-plugin']
19+
plugins: ['@emotion/babel-plugin'],
20+
exclude: [/node_modules/, /dist/, /deps/], // ← don’t transpile built files
21+
compact: true
2822
}
2923
})
3024
// GitHub OAuth plugin has been removed

0 commit comments

Comments
 (0)