Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions with-mantine-src-biome/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

out/
build/
dist/

# plasmo
.plasmo

# typescript
.tsbuildinfo
3 changes: 3 additions & 0 deletions with-mantine-src-biome/.vscode/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome"]
}
16 changes: 16 additions & 0 deletions with-mantine-src-biome/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.defaultFormatter": "biomejs.biome",

"[markdown][html][yaml][mdx]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
33 changes: 33 additions & 0 deletions with-mantine-src-biome/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This is a [Plasmo extension](https://docs.plasmo.com/) project bootstrapped with [`plasmo init`](https://www.npmjs.com/package/plasmo).

## Getting Started

First, run the development server:

```bash
pnpm dev
# or
npm run dev
```

Open your browser and load the appropriate development build. For example, if you are developing for the chrome browser, using manifest v3, use: `build/chrome-mv3-dev`.

You can start editing the popup by modifying `popup.tsx`. It should auto-update as you make changes. To add an options page, simply add a `options.tsx` file to the root of the project, with a react component default exported. Likewise to add a content page, add a `content.ts` file to the root of the project, importing some module and do some logic, then reload the extension on your browser.

For further guidance, [visit our Documentation](https://docs.plasmo.com/)

## Making production build

Run the following:

```bash
pnpm build
# or
npm run build
```

This should create a production bundle for your extension, ready to be zipped and published to the stores.

## Submit to the webstores

The easiest way to deploy your Plasmo extension is to use the built-in [bpp](https://bpp.browser.market) GitHub action. Prior to using this action however, make sure to build your extension and upload the first version to the store to establish the basic credentials. Then, simply follow [this setup instruction](https://docs.plasmo.com/framework/workflows/submit) and you should be on your way for automated submission!
Binary file added with-mantine-src-biome/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions with-mantine-src-biome/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
},

"files": {
"ignore": ["**/node_modules/**", "**/.plasmo/**", "**/.github/**", "**/build/**"]
},

"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},

"formatter": {
"indentStyle": "space",
"lineWidth": 86
},

"javascript": {
"formatter": {
"quoteStyle": "single"
}
},

"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {},
"nursery": {},
"security": {},
"complexity": {},
"suspicious": {},
"performance": {},
"correctness": {
"noUnusedVariables": "warn",
"useHookAtTopLevel": "warn",
"useExhaustiveDependencies": "off"
},
"style": {
"useBlockStatements": "error"
}
}
}
}
Binary file added with-mantine-src-biome/commitlint.config.js
Binary file not shown.
42 changes: 42 additions & 0 deletions with-mantine-src-biome/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "plasmo-starter-template",
"displayName": "Plasmo starter template",
"version": "0.0.1",
"description": "A basic Plasmo extension.",
"author": "Plasmo Corp. <foss@plasmo.com>",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"format": "biome format --write .",
"lint": "biome lint --write .",
"check": "biome check --write .",
"package": "plasmo package"
},
"dependencies": {
"@mantine/core": "^7.17.1",
"@mantine/form": "^7.17.1",
"@mantine/hooks": "^7.17.1",
"plasmo": "0.90.3",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@commitlint/cli": "^19.8.0",
"@commitlint/config-conventional": "^19.8.0",
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@types/chrome": "0.0.258",
"@types/node": "20.11.5",
"@types/react": "18.2.48",
"@types/react-dom": "18.2.18",
"postcss": "^8.5.3",
"postcss-preset-mantine": "^1.17.0",
"postcss-simple-vars": "^7.0.1",
"typescript": "5.3.3"
},
"manifest": {
"host_permissions": [
"https://*/*"
]
}
}
14 changes: 14 additions & 0 deletions with-mantine-src-biome/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
plugins: {
'postcss-preset-mantine': {},
'postcss-simple-vars': {
variables: {
'mantine-breakpoint-xs': '36em',
'mantine-breakpoint-sm': '48em',
'mantine-breakpoint-md': '62em',
'mantine-breakpoint-lg': '75em',
'mantine-breakpoint-xl': '88em',
},
},
},
};
11 changes: 11 additions & 0 deletions with-mantine-src-biome/src/content.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { PlasmoCSConfig } from 'plasmo';

export const config: PlasmoCSConfig = {
matches: ['https://www.plasmo.com/*'],
};

window.addEventListener('load', () => {
console.log('content script loaded');

document.body.style.background = 'pink';
});
15 changes: 15 additions & 0 deletions with-mantine-src-biome/src/popup/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import '@mantine/core/styles.css';
import '~/styles/global.css';
import { theme } from '~/styles/theme';
import { Button, MantineProvider } from '@mantine/core';

function IndexPopup() {
return (
<MantineProvider theme={theme}>
<Button>Hello</Button>
</MantineProvider>
);
}

export default IndexPopup;
Empty file.
25 changes: 25 additions & 0 deletions with-mantine-src-biome/src/styles/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {
createTheme,
type MantineColorsTuple,
type MantineThemeOverride,
} from '@mantine/core';

const primaryColor: MantineColorsTuple = [
'#f4ecfd',
'#e4d4f7',
'#c8a5f1',
'#aa74eb',
'#914ae7',
'#8231e4',
'#7a24e4',
'#6819cb',
'#5d15b5',
'#500e9f',
];

export const theme: MantineThemeOverride = createTheme({
colors: {
primaryColor,
},
primaryColor: 'primaryColor',
});
11 changes: 11 additions & 0 deletions with-mantine-src-biome/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "plasmo/templates/tsconfig.base",
"exclude": ["node_modules"],
"include": [".plasmo/index.d.ts", "./**/*.ts", "./**/*.tsx"],
"compilerOptions": {
"paths": {
"~*": ["./src/*"]
},
"baseUrl": "."
}
}
34 changes: 34 additions & 0 deletions with-mantine-src-biome/workflows/submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Submit to Web Store"
on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.4
with:
version: latest
run_install: true
- name: Use Node.js 16.x
uses: actions/setup-node@v3.4.1
with:
node-version: 16.x
cache: "pnpm"
- name: Build the extension
run: pnpm build
- name: Package the extension into a zip artifact
run: pnpm package
- name: Browser Platform Publish
uses: PlasmoHQ/bpp@v3
with:
keys: ${{ secrets.SUBMIT_KEYS }}
artifact: build/chrome-mv3-prod.zip