diff --git a/.github/agents/my-agent.md b/.github/agents/my-agent.md new file mode 100644 index 0000000..44522c1 --- /dev/null +++ b/.github/agents/my-agent.md @@ -0,0 +1,8 @@ +--- +name: +description: +--- + +# My Agent + +Describe what your agent does here... diff --git a/.gitignore b/.gitignore index db400be..c71b037 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules yarn.lock dist.zip -dist \ No newline at end of file +dist +acodex_server +plugin.zip \ No newline at end of file diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..4fb75e3 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,14 @@ +pull_request_rules: + - name: Notify when a PR is removed from the queue + description: Notify the PR author when its pull request is removed from the merge queue. + conditions: + - queue-dequeue-reason != none + - queue-dequeue-reason != pr-merged + actions: + comment: + message: > + Hey @{{author}}, your pull request has been dequeued due to the + following reason: {{queue_dequeue_reason}}. + + Sorry about that, but you can requeue the PR by using `@mergifyio + requeue` if you think this was a mistake. diff --git a/plugin.zip b/plugin.zip deleted file mode 100644 index 395c97d..0000000 Binary files a/plugin.zip and /dev/null differ diff --git a/readme.md b/readme.md index c7dad79..c490271 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,24 @@ Read acode plugin [documentation](https://docs.acode.app/docs/) to develop plugin for acode editor. +## Setup + +For a quick setup of the development environment, run: + +```bash +chmod +x setup.sh +./setup.sh +``` + +This script will: +- Check for npm (if not found, provides manual installation instructions) +- Check for Zed editor (if not found, provides manual installation instructions) +- Clone the acodex_server repository +- Install project dependencies +- Build the project + +**Note:** The script requires npm and Zed editor to be installed manually for security reasons. It will not automatically install these tools. + ## Usage Use this for debug build: diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..7c7950b --- /dev/null +++ b/setup.sh @@ -0,0 +1,102 @@ +#!/bin/bash + +# Setup script for Acode Plugin Development Environment +# This script installs required tools and dependencies + +set -e # Exit on error + +echo "==========================================" +echo "Acode Plugin Development Setup" +echo "==========================================" +echo "" + +# Function to check if a command exists +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +# Check npm installation +echo "Step 1: Checking npm installation..." +if command_exists npm; then + echo "✓ npm is already installed (version: $(npm --version))" +else + echo "npm is not installed." + echo "For security reasons, this script does not install npm automatically." + echo "Please install Node.js and npm using your system's package manager or a version manager like nvm." + echo "" + echo "Examples:" + echo " On Ubuntu/Debian: sudo apt update && sudo apt install nodejs npm" + echo " On macOS: brew install node" + echo " Using nvm: https://github.com/nvm-sh/nvm" + echo "" + echo "After installing Node.js and npm, re-run this setup script." + exit 1 +fi +echo "" + +# Check Zed editor installation +echo "Step 2: Checking Zed editor installation..." +if command_exists zed; then + echo "✓ Zed editor is already installed" +else + echo "Zed editor is not installed." + echo "For security reasons, this script does not install Zed editor automatically." + echo "Please install Zed editor manually from the official website:" + echo " https://zed.dev/download" + echo "" + echo "After installing Zed editor, re-run this setup script." + exit 1 +fi +echo "" + +# Clone acodex_server repository if it doesn't exist +echo "Step 3: Checking acodex_server repository..." +if [ -d "acodex_server" ]; then + echo "✓ acodex_server repository already exists" + echo " Updating repository..." + ( + cd acodex_server || exit 1 + if ! git pull 2>../git_pull_error.log; then + echo "✗ Could not update repository. See details below:" >&2 + cat ../git_pull_error.log >&2 + echo "Please manually review the repository for issues such as merge conflicts, network problems, or uncommitted changes." >&2 + echo "You may need to resolve these issues before continuing." >&2 + exit 1 + fi + ) + exit_code=$? + rm -f git_pull_error.log + if [ $exit_code -ne 0 ]; then + exit 1 + fi +else + echo "Cloning acodex_server repository..." + if command_exists gh; then + gh repo clone bajrangCoder/acodex_server + else + git clone https://github.com/bajrangCoder/acodex_server.git + fi + echo "✓ acodex_server repository cloned successfully" +fi +echo "" + +# Install project dependencies +echo "Step 4: Installing project dependencies..." +npm install +echo "✓ Dependencies installed successfully" +echo "" + +# Build the project +echo "Step 5: Building the project..." +npm run build +echo "✓ Project built successfully" +echo "" + +echo "==========================================" +echo "Setup completed successfully!" +echo "==========================================" +echo "" +echo "You can now start development with:" +echo " npm run dev - Start development build (esbuild serve mode)" +echo " npm run build - Build for production" +echo ""