You Don't Need jQuery - Deploy & Usage Guide
Prerequisites
- Node.js (version 10 or higher)
- npm (Node Package Manager, comes with Node.js)
- Modern web browser (IE10+ for full compatibility)
- Git (for cloning the repository)
Installation
-
Clone the repository:
git clone https://github.com/camsong/You-Dont-Need-jQuery.git cd You-Dont-Need-jQuery -
Install dependencies:
npm install -
Install Puppeteer (for testing):
npm install puppeteer
Configuration
This project doesn't require external API keys or complex configuration. However, you can customize the test environment:
- Test configuration: Modify
karma.conf.jsfor test settings - Babel configuration: Adjust
.babelrcfor transpilation settings - Webpack configuration: Modify
webpack.config.jsfor build settings
Build & Run
Development
-
Run tests:
npm test -
Run tests with coverage:
npm run test:coverage
Production
This is a documentation/reference project, so there's no production build. The content is static and can be served directly.
Deployment
Since this is a documentation project, you can deploy it to any static hosting service:
GitHub Pages (Recommended)
-
Create a
gh-pagesbranch:git checkout --orphan gh-pages git add . git commit -m "Initial gh-pages commit" git push origin gh-pages -
Enable GitHub Pages in your repository settings under "Pages" section.
Netlify
- Connect your repository to Netlify
- Build command: Leave empty (no build needed)
- Publish directory:
.(root directory)
Vercel
- Import your repository to Vercel
- Build command: Leave empty
- Output directory:
.(root directory)
Troubleshooting
Common Issues
-
Test failures:
- Ensure Puppeteer is properly installed
- Check if Chrome/Chromium is accessible
- Verify Node.js version compatibility
-
Module not found errors:
npm install -
Babel compilation errors:
- Check
.babelrcconfiguration - Ensure all required Babel plugins are installed
- Check
-
Webpack build issues:
- Verify
webpack.config.jssettings - Check for missing loaders or plugins
- Verify
Performance Tips
- Use
document.getElementById,document.getElementsByClassName, ordocument.getElementsByTagNameinstead ofdocument.querySelectorordocument.querySelectorAllfor better performance - Convert NodeList to Array using
Array.prototype.slice.call()for older browsers - Use native methods like
closest()andmatches()where available
Browser Compatibility
- IE10+: Full compatibility with polyfills
- Modern browsers: Native support for most methods
- Legacy browsers: May require additional polyfills for some methods
Testing
- Run
npm testto execute all tests - Check
coverage/directory for test coverage reports - Use
npm run test:watchfor continuous testing during development
This guide provides everything needed to set up, run, and deploy the "You Don't Need jQuery" project for reference and learning purposes.