### Build, Debug, and Install Forge Extension Source: https://github.com/forge-ext/forge/blob/main/README.md Run these commands sequentially to build, debug, and install the Forge extension. A shell restart may be required after installation. ```bash make build && make debug && make install ``` -------------------------------- ### Example CSS Input Source: https://github.com/forge-ext/forge/blob/main/lib/css/README.md This is an example of CSS code that can be parsed by the module. ```css body { background: #eee; color: #888; } ``` -------------------------------- ### Install Forge Extension Locally Source: https://github.com/forge-ext/forge/blob/main/README.md Compile and override the gnome-shell update repo for local development. ```bash make dev ``` -------------------------------- ### Test Forge Extension on Wayland Source: https://github.com/forge-ext/forge/blob/main/README.md Builds the Forge extension from source and starts a Wayland instance for testing. No shell restart is needed. ```bash make test-wayland ``` -------------------------------- ### Format Code with Prettier Source: https://github.com/forge-ext/forge/blob/main/README.md Formats the codebase using Prettier. This command is typically run after `npm install` and is enforced by Husky during commits. ```bash npm run format ``` -------------------------------- ### Parsed CSS Structure (AST) Source: https://github.com/forge-ext/forge/blob/main/lib/css/README.md This JSON object represents the Abstract Syntax Tree (AST) generated after parsing the example CSS code. ```json { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "background", "value": "#eee", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 19 } } }, { "type": "declaration", "property": "color", "value": "#888", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 14 } } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 4, "column": 2 } } } ] } } ``` -------------------------------- ### Test Forge Extension on X11 Source: https://github.com/forge-ext/forge/blob/main/README.md Builds the Forge extension from source and restarts the GNOME Shell for testing on X11. ```bash make test-x ``` -------------------------------- ### Import and Use CSS Parser Functions Source: https://github.com/forge-ext/forge/blob/main/lib/css/README.md Import and utilize the parse, stringify, write, and load functions from the Forge CSS module. These functions allow for direct manipulation of CSS code and file handling. ```javascript import { parse, stringify, write, load, } from './css/index.js'; // Raw APIs from ReworkCSS let obj = parse('body { font-size: 12px; }'); let code = stringify(obj); // Convenience write(code, "/path/to/stylesheet.css"); let ast = load("/path/to/stylesheet.css"); // ... Do something with AST ... ``` -------------------------------- ### Gnome Imports for Forge Extension Source: https://github.com/forge-ext/forge/blob/main/templates/new-module.js.txt Imports necessary GNOME libraries for the Forge extension. Ensure these libraries are available in your GNOME environment. ```javascript import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Meta from 'gi://Meta'; import Shell from 'gi://Shell'; import St from 'gi://St'; ``` -------------------------------- ### Application Imports for Forge Extension Source: https://github.com/forge-ext/forge/blob/main/templates/new-module.js.txt Imports custom application modules, such as the logger. This assumes a local './logger.js' file exists. ```javascript import * as Logger from './logger.js'; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.