- Implemented a global toggle to enable/disable background queue processing. - Added a Side Panel (Sidebar.html) to view pending edits. - Added per-item controls: 'Delete' to remove from queue, 'Push' to force update. - Updated 'onEditQueue.ts' with robust error handling for batch processing. - Updated documentation (README, ARCHITECTURE) to reflect new features. - Fixed 'clasp' deployment issues by cleaning up manifest management.
2.1 KiB
2.1 KiB
Setup Guide
Local Development Environment
-
Install Node.js This project uses
fnmto manage Node versions.# Install fnm (if not installed) winget install Schniz.fnm # Configure environment fnm env --use-on-cd | Out-String | Invoke-Expression # Install Node version fnm use --install-if-missing 22 -
Install Dependencies
npm install npm install -g @google/clasp -
Clasp Login Authenticate with Google to allow pushing code.
clasp login -
Initialize Project You must either create a new Apps Script project or clone an existing one.
- Option A: New Project
clasp create --type sheets --title "Product Inventory" --rootDir ./dist - Option B: Existing Project
clasp clone <scriptId> --rootDir ./dist
Note: The
--rootDir ./distflag is crucial so that clasp knows where to look for files. - Option A: New Project
Google Sheets Configuration
- Create a Google Sheet (or use existing).
- "vars" Sheet:
Create a tab named
varswith the following columns:key,value. Add the following rows:productPhotosFolderId: ID of the Drive folder for photos.shopifyApiKey: Your Shopify API Key.shopifyApiSecretKey: Your Shopify API Secret.shopifyAdminApiAccessToken: The Admin API access token.shopifyApiURI: e.g.,https://your-store.myshopify.comshopifyLocationId: Location ID for inventory.shopifyCountryCodeOfOrigin: Two-letter country code (e.g.,US).shopifyProvinceCodeOfOrigin: Two-letter province code (e.g.,NY).
Deployment
-
Build
npm run build -
Push to Apps Script
npm run deploy -
Install Triggers Open the Apps Script editor (Extensions > Apps Script). Run the
reinstallTriggersfunction manually once to set up the automation.