diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e5108e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [ "**" ] + pull_request: + branches: [ "main" ] + +jobs: + test-and-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run Tests + run: npm test + + - name: Run Build + run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 351fbed..55f7778 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,15 +23,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run Tests + run: npm test + + - name: Build Plugin + run: npm run build + + - name: Update Docs Asset + run: cp dist/plugin.min.js docs/plugin.min.js + - name: Setup Pages uses: actions/configure-pages@v4 - + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: './docs' - + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 2f9c490..c205f5f 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,10 @@ A lightweight Docsify plugin that transforms standard markdown checkboxes into i ## โจ Features - ๐ฑ๏ธ **Interactive Checkboxes** - Click to toggle completion -- ๐พ **Persistent State** - Saved in localStorage +- ๐พ **Persistent State** - Saved in localStorage with **stable IDs** (v2) - ๐ **Per-Page Storage** - Each page has its own states - ๐จ **Visual Feedback** - Strikethrough + fade effect +- ๐ค **Import/Export** - Backup your progress easily - โก **Zero Dependencies** - Pure JavaScript - ๐ **Easy Integration** - Drop-in solution diff --git a/demo/demo.md b/demo/demo.md deleted file mode 100644 index 82b28c2..0000000 --- a/demo/demo.md +++ /dev/null @@ -1,110 +0,0 @@ -# ๐ฏ Interactive Checkboxes Demo - -Welcome! This demo showcases the **Docsify Interactive Checkboxes Plugin**. - -Click on any checkbox to toggle it. Your progress is **automatically saved** in your browser! - ---- - -## ๐ Getting Started - -Try checking off these tasks: - -- [ ] Click on this checkbox -- [ ] Notice how it saves automatically -- [ ] Refresh the page - your progress is preserved! -- [ ] Try the "Reset All" button in the corner - ---- - -## ๐ Learning Path Example - -### Chapter 1: Introduction -- [ ] Read the overview -- [ ] Understand basic concepts -- [ ] Complete the first exercise - -### Chapter 2: Core Features -- [ ] Learn about hooks -- [ ] Master the plugin system -- [ ] Build your first plugin - -### Chapter 3: Advanced Topics -- [ ] Custom configurations -- [ ] Event handling -- [ ] Performance optimization - ---- - -## ๐ ๏ธ Project Setup Checklist - -Here's how you might use this for a project: - -### Initial Setup -- [ ] Create project repository -- [ ] Initialize npm/yarn -- [ ] Set up TypeScript configuration -- [ ] Configure ESLint and Prettier - -### Development Environment -- [ ] Install VS Code extensions -- [ ] Configure debugging -- [ ] Set up hot reloading -- [ ] Create development scripts - -### Testing -- [ ] Set up unit testing framework -- [ ] Write initial test cases -- [ ] Configure code coverage -- [ ] Set up CI/CD pipeline - -### Documentation -- [ ] Create README.md -- [ ] Add API documentation -- [ ] Write contribution guidelines -- [ ] Add license file - ---- - -## ๐ Interview Preparation - -Use this for tracking your interview prep: - -### Technical Topics -- [ ] Data structures fundamentals -- [ ] Algorithm complexity analysis -- [ ] System design basics -- [ ] Database concepts -- [ ] API design patterns - -### Practice Sessions -- [ ] Complete 5 easy problems -- [ ] Complete 3 medium problems -- [ ] Complete 1 hard problem -- [ ] Practice mock interview - -### Soft Skills -- [ ] Prepare "Tell me about yourself" -- [ ] Review past projects -- [ ] Practice behavioral questions -- [ ] Research the company - ---- - -## โจ Features Demonstrated - -This plugin provides: - -1. **โ Interactive Checkboxes** - As you've just experienced! -2. **๐พ Persistent State** - Refresh and see your progress -3. **๐ Progress Tracking** - Check the bottom right corner -4. **๐จ Visual Feedback** - Completed items are styled differently -5. **โก Zero Dependencies** - Pure JavaScript, fast & lightweight - ---- - -> ๐ก **Tip**: The progress indicator in the bottom right updates in real-time as you check items! - ---- - -**Happy organizing! ๐** diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index 9d0f580..0000000 --- a/demo/index.html +++ /dev/null @@ -1,274 +0,0 @@ - - - -
- - -