2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 01:44:31 -06:00

Add workflow

This commit is contained in:
Jeroen akkerman 2025-05-01 17:56:45 +02:00
parent 58cb51e2d7
commit fc37325d66
4 changed files with 77 additions and 7 deletions

66
.github/workflows/alpha.yaml vendored Normal file
View File

@ -0,0 +1,66 @@
name: Test & Deploy v3 alpha
on:
workflow_dispatch:
push:
branches:
- v3
pull_request:
branches:
- v3
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: current
- uses: actions/checkout@v4
- run: npm audit --omit=dev
lint:
needs: [audit]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: current
- uses: actions/checkout@v4
- run: npm ci
- name: Lint
run: npm run check
test:
needs: [audit]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["20", "22", "24"]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
- run: npm ci
- name: Test
run: npm test
deploy:
needs: [lint, test]
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/setup-node@v4
with:
node-version: current
- uses: actions/checkout@v4
- run: npm ci
- name: Update @v3-alpha version
run: npm version premajor --no-git-tag-version --preid "alpha.$GITHUB_RUN_NUMBER"
- name: Deploy @v3-alpha version to npm
uses: JS-DevTools/npm-publish@v3
with:
tag: v3-alpha
token: ${{ secrets.NPM_TOKEN }}
check-version: false

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "easymde", "name": "easymde",
"version": "3.0.0", "version": "2.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "easymde", "name": "easymde",
"version": "3.0.0", "version": "2.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@codemirror/lang-markdown": "^6.3.2", "@codemirror/lang-markdown": "^6.3.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "easymde", "name": "easymde",
"version": "3.0.0", "version": "2.0.0",
"type": "module", "type": "module",
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.", "description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.",
"keywords": [ "keywords": [
@ -16,12 +16,10 @@
"author": "Jeroen Akkerman", "author": "Jeroen Akkerman",
"repository": "github:Ionaru/easy-markdown-editor", "repository": "github:Ionaru/easy-markdown-editor",
"scripts": { "scripts": {
"clean": "npx -y rimraf dist",
"build": "rollup -c", "build": "rollup -c",
"build:watch": "rollup -c -w", "build:watch": "rollup -c -w",
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types", "build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types",
"postbuild": "npm run build:types", "postbuild": "npm run build:types",
"pretest": "npm run check",
"test": "npm run test:unit", "test": "npm run test:unit",
"test:unit": "vitest run", "test:unit": "vitest run",
"test:e2e": "cypress run", "test:e2e": "cypress run",

View File

@ -4,9 +4,15 @@ $light-border-color: #d1d1d1;
:root { :root {
--easymde-border-color: #{$light-border-color}; --easymde-border-color: #{$light-border-color};
--easymde-enabled-color: #{color.adjust($light-border-color, $lightness: 5%)}; --easymde-enabled-color: #{color.adjust(
$light-border-color,
$lightness: 5%
)};
--easymde-hover-color: #{$light-border-color}; --easymde-hover-color: #{$light-border-color};
--easymde-active-color: #{color.adjust($light-border-color, $lightness: -5%)}; --easymde-active-color: #{color.adjust(
$light-border-color,
$lightness: -5%
)};
} }
// @media (prefers-color-scheme: dark) { // @media (prefers-color-scheme: dark) {