Photon UI Toolkit - Deploy & Usage Guide
Prerequisites
- Node.js (v4.0.0 or higher) - Required for running the Electron template app and development tools
- npm (v2.0.0 or higher) - Node package manager for installing dependencies
- Git - For cloning the repository
- Jekyll (v2.5.x) - Only required if you plan to run documentation locally
- Ruby and Rouge - Required for Jekyll documentation (Windows users should follow the unofficial guide for Jekyll installation)
Installation
-
Clone the repository:
git clone https://github.com/connors/photon.git cd photon -
Install Node.js dependencies:
npm install -
Verify the structure: The repository contains:
css/photon.css- Compiled CSS stylesfonts/- Entypo icon font filestemplate-app/- Starter Electron application with example files
Configuration
Photon doesn't require any specific configuration for basic usage. The CSS and fonts are ready to use out of the box.
For development:
- No environment variables are required
- No API keys are needed
- The template app uses standard Electron configuration in
template-app/package.json
Build & Run
Development
-
Start the example Electron app:
npm start -
Watch for Sass changes (if modifying source files): Open a second terminal tab and run:
npm run buildThis will rebuild the compiled
photon.csswhenever source Sass files change.
Production
To use Photon in your own Electron application:
-
Copy the necessary files from the repository:
css/photon.cssfonts/directory (all font files)
-
Include in your HTML:
<link rel="stylesheet" href="path/to/photon.css"> -
Use Photon classes in your HTML markup following the documentation at photonkit.com
Deployment
Photon is a UI toolkit designed for Electron desktop applications, so deployment depends on your Electron app structure:
For Electron Apps
-
Package your Electron app using standard Electron build tools:
npm install --save-dev electron-builder -
Configure your build in
package.json:"build": { "appId": "your.app.id", "productName": "Your App Name" } -
Build for distribution:
npm run build npm run dist
Platforms
Photon works on all platforms supported by Electron:
- macOS (64-bit)
- Windows (32-bit and 64-bit)
- Linux (32-bit and 64-bit)
Troubleshooting
Common Issues
Issue: Fonts not displaying correctly
- Solution: Ensure all font files from the
fonts/directory are copied to your application's resources directory and paths are correctly referenced inphoton.css
Issue: CSS not applying styles
- Solution: Verify that
photon.cssis properly linked in your HTML and that there are no conflicting CSS rules
Issue: Jekyll documentation not running
- Solution: Ensure you have the correct Jekyll version (v2.5.x) and have installed Rouge with
gem install rouge
Issue: Build process fails
- Solution: Check that all Node.js dependencies are installed with
npm installand that you have the required Node.js version
Getting Help
- Report bugs: File an issue following the contributor guidelines
- Documentation: Visit photonkit.com for component documentation and usage examples
- Development: The master branch is unstable; use tagged releases for production applications
Version Management
Photon follows Semantic Versioning. Check the tags for stable releases when deploying to production.