Skip to content

Commit 22e0b19

Browse files
committed
feat: Add comprehensive documentation for ResourceLoader.js with examples and features
- Created Examples.vue to showcase various resource loading examples including basic loading, JSON loading, image loading, and error handling. - Developed Features.vue to highlight key features of ResourceLoader.js such as dynamic loading, concurrency control, retries, error handling, cache busting, and security features. - Implemented Home.vue as the landing page with an overview of the library, quick start guide, and links to examples. - Configured Tailwind CSS for styling throughout the documentation. - Set up Vite for development and build processes. - Added Vercel configuration for deployment.
1 parent 5fe70a1 commit 22e0b19

18 files changed

Lines changed: 1883 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
docs/package-lock.json

docs/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# ResourceLoader.js Documentation Site
2+
3+
This is the documentation site for ResourceLoader.js, a flexible JavaScript library for dynamically loading resources.
4+
5+
## Development
6+
7+
To run the documentation site locally:
8+
9+
1. Navigate to the docs directory
10+
2. Run the setup script:
11+
12+
```bash
13+
./setup.sh
14+
```
15+
16+
Or manually:
17+
18+
```bash
19+
# Install dependencies
20+
npm install
21+
22+
# Start the development server
23+
npm run dev
24+
```
25+
26+
## Building for Production
27+
28+
To build the site for production:
29+
30+
```bash
31+
npm run build
32+
```
33+
34+
This will create a `dist` folder with the built site.
35+
36+
## Deployment
37+
38+
This site is configured for deployment on Vercel. Simply push to your GitHub repository and connect it with Vercel.
39+
40+
## Structure
41+
42+
- `src/views/` - Vue components for each page
43+
- `public/` - Static assets including ResourceLoader.js itself
44+
- `src/assets/` - CSS and other assets for the site

docs/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>ResourceLoader.js - Dynamic Resource Loading Library</title>
8+
<meta
9+
name="description"
10+
content="A flexible JavaScript library for dynamically loading resources like JavaScript, CSS, images, JSON, and other file types."
11+
/>
12+
</head>
13+
<body>
14+
<div id="app"></div>
15+
<script type="module" src="/src/main.js"></script>
16+
</body>
17+
</html>

docs/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "resourceloader-docs",
3+
"version": "1.0.0",
4+
"description": "Documentation site for ResourceLoader.js",
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
10+
},
11+
"dependencies": {
12+
"vue": "^3.3.4",
13+
"vue-router": "^4.2.2",
14+
"prismjs": "^1.29.0"
15+
},
16+
"devDependencies": {
17+
"@vitejs/plugin-vue": "^4.3.0",
18+
"autoprefixer": "^10.4.14",
19+
"eslint": "^8.43.0",
20+
"eslint-plugin-vue": "^9.15.0",
21+
"postcss": "^8.4.24",
22+
"tailwindcss": "^3.3.2",
23+
"vite": "^4.3.9"
24+
}
25+
}

docs/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

0 commit comments

Comments
 (0)