Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mscolnick committed Sep 11, 2023
0 parents commit 084e504
Show file tree
Hide file tree
Showing 29 changed files with 4,176 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:unicorn/recommended",
"prettier"
],
"plugins": ["@typescript-eslint"],
"ignorePatterns": ["out", "dist", "**/*.d.ts"],
"rules": {
"unicorn/prevent-abbreviations": "off",
"unicorn/no-useless-undefined": "off"
}
}
30 changes: 30 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "schedule:weekly"],
"labels": ["dependencies"],
"pin": false,
"rangeStrategy": "bump",
"packageRules": [
{
"depTypeList": ["peerDependencies"],
"enabled": false
},
{
"packageNames": ["node"],
"enabled": false
},
{
"matchUpdateTypes": ["minor", "patch"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"excludePackagePatterns": [".*eslint.*"],
"excludePackageNames": ["typescript", "@types/vscode", "vscode"]
},
{
"packagePatterns": [".*eslint.*"],
"groupName": "all eslint dependencies",
"groupSlug": "all-eslint",
"matchUpdateTypes": ["minor", "patch", "major"]
}
]
}
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⎔ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: 📥 Install dependencies
run: pnpm install

- name: 🧹 Lint
run: pnpm lint

typecheck:
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⎔ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: 📥 Install dependencies
run: pnpm install

- name: ʦ Typecheck
run: pnpm typecheck
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 18.x

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.cache
.DS_Store
.idea
*.log
*.tgz
*.vsix
coverage
dist
lib-cov
logs
node_modules
temp
!.vscode
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint"]
}
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
8 changes: 8 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github
.gitignore
.vscode
**/.eslintrc.json
**/*.map
**/*.ts
**/tsconfig.json
src
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

## Development

- Run `pnpm install` in the root directory to install dependencies.
- Run `pnpm dev` to start the compiler in watch mode.
- Press `F5` to open a new window with your extension loaded.

### Make changes

- Relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
- `Ctrl+R` or `Cmd+R` on Mac will reload the extension with your changes.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 marimo <https://github.com/marimo-team/vscode-marimo>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# vscode-marimo

<a href="https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/marimo-team.vscode-marimo.svg?color=eee&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a>

Run marimo, directly from VSCode.

Note: This extension requires marimo to be installed on your system: `pip install marimo`.

Check out the marimo documentation at <https://docs.marimo.io/>.

## Features

- Launch marimo from VSCode, in both "edit mode" and "run mode".
- View the terminal output of marimo directly in VSCode.
- View the marimo browser window directly in VSCode or in your default browser.

## Extension Settings

You can configure the extension using the following settings:

- `marimo.browserType`: Browser to open marimo app ('system' or 'embedded', default: 'embedded')
- `marimo.port`: Default port for marimo server (default: 2718)
- `marimo.showTerminal`: Open the terminal when the server starts (default: false)
Binary file added images/marimo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 084e504

Please sign in to comment.