#1 上传文件至 ''

Merged
SkyNet2024 merged 1 commits from 0.1 into master 1 year ago
  1. +67
    -0
      BASICS.md
  2. +92
    -0
      CONTRIBUTING.md
  3. +29
    -0
      IMAGES.md
  4. +268
    -1
      README.md
  5. +56
    -0
      babel.config.js
  6. +160
    -0
      electron-builder.yml
  7. +206
    -0
      package.json
  8. +9
    -0
      vetur.config.js
  9. +13533
    -0
      yarn.lock

+ 67
- 0
BASICS.md View File

@@ -0,0 +1,67 @@
# Basics

## Getting started

MarkText is a realtime preview editor for markdown with various markdown extensions. You can simply write and edit text and MarkText hides all unnecessary syntax elements. When you first start MarkText an empty editor window is shown. You can see [key bindings](KEYBINDINGS.md) or command palette (<kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>) for all available commands or just type `@` to get an overlay with available text elements. MarkText provides a minimal and simple interface and in the next sections you can learn more about the interface and features.

![](assets/marktext-default.png)

### Interface

#### Toggle sidebar

The sidebar consists of three panels and you can toggle the sidebar by pressing <kbd>CmdOrCtrl</kbd>+<kbd>J</kbd>:

- Filesystem explorer (tree view) of the opened root directory
- Find in files
- Table of contents of the selected tab

#### Toggle tabs

MarkText can be used as a single editor but opens all files in a separate tab. Tabs can be toggled via <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd> and reordered by drag and drop.

**Want to use tabs without showing them?**

You can hide tabs and use key bindings such as <kbd>CmdOrCtrl</kbd>+<kbd>Tab</kbd> to cycle through tabs or the sidebar *opened files* panel.

![](assets/marktext-interface-1.png)

#### Switch between editor modes

You can use <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd> to switch between the preview and source-code editor. The realtime preview editor is the default editor with many features. A detailed overview of all features can be found [here](EDITING.md).

#### Typewriter and focus mode

Use <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> to enter distraction free focus mode or <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>T</kbd> for typewriter.

## Open and modify markdown files

### Open your first file

You can use the menu `File -> Open File` or press <kbd>CmdOrCtrl</kbd>+<kbd>O</kbd> to open a file dialog to choose a markdown file. Another way to is to launch MarkText with directories or files via command line.

### Save your edited file

After some modifications you can save your file via <kbd>CmdOrCtrl</kbd>+<kbd>S</kbd> or use *save as* to use a different file name.

### Open a directory

MarkText also has support to open a directory via <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> or the sidebar button *Open Folder*. After opening a directory all files and directories are shown in the sidebar tree view. The tree view allows you to open further files, browse and modify files or directories inside the opened root directory. Above the tree view are all opened files located. You can also use quick open (<kbd>CmdOrCtrl</kbd>+<kbd>P</kbd>) to quickly open a file from the opened root directory or editor and navigate via arrow keys or select a file via mouse. To view another sidebar panel like find in files click on the left sidebar icons.

![](assets/marktext-interface-2.png)

## Themes

You can change the application theme by clicking on an entry under the themes application menu.

## Preferences

You can control and modify all preferences in the settings window or edit `preferences.json` in the [application data directory](APPLICATION_DATA_DIRECTORY.md). Detailed information about the preference file can be found [here](PREFERENCES.md).

- General application settings
- Settings that control the editor appearance
- Markdown related settings
- The application theme
- Options how images are handled

![](assets/marktext-settings.png)

+ 92
- 0
CONTRIBUTING.md View File

@@ -0,0 +1,92 @@
# MarkText Contributing Guide

We are really excited that you are interested in contributing to MarkText :tada:. Before submitting your contribution, please make sure to take a moment and read through the following guidelines.

- [Code of Conduct](.github/CODE_OF_CONDUCT.md)
- [Philosophy](#philosophy)
- [Issue reporting guidelines](#issue-reporting-guidelines)
- [Pull request guidelines](#pull-request-guidelines)
- [Where should I start?](#where-should-i-start)
- [Quick start](#quick-start)
- [Build instructions](#build-instructions)
- [Style guide](#style-guide)
- [Developer documentation](#developer-documentation)

## Philosophy

🔑 Our philosophy is to keep things clean, simple and minimal.
MarkText is constantly changing and we want these improvements to align with our philosophy. For example, look at the side bar and tabs; these two panels provide awesome functionality *and* aren't distracting to the user. We'll continue adding more features (like plugins) that can be activated via 'settings' to improve MarkText. This will allow everyone to customize MarkText for their needs and provide a minimal default interface.

## Issue Reporting Guidelines

Please search for similar issues before opening an issue and always follow the [issue template](.github/ISSUE_TEMPLATE/). Please review the following Pull Request guidelines before making your own PR.

## Pull Request Guidelines

**In *all* Pull Requests:** provide a detailed description of the problem, as well as a demonstration with screen recordings and/or screenshots.

Please make sure the following is done before submitting a PR:

- Submit PRs directly to the `develop` branch.
- Reference the related issue in the PR comment.
- Utilize [JSDoc](https://github.com/jsdoc/jsdoc) for better code documentation.
- Ensure all tests pass.
- Please lint (`yarn run lint`) your PR.
- All PRs need to pass the **CI** before merged. If it fails, please try to solve the issue(s) and feel free to ask for any help.

If you add new feature:

- Open a suggestion issue first.
- Provide your reasoning on why you want to add this feature.
- Submit your PR.

If you fix a bug:

- If you are resolving a special issue, please add `fix: #<issue number> <short message>` in your PR title (e.g.`fix: #3899 update entities encoding/decoding`).
- Provide a detailed description of the bug in your PR and/or link to the issue.

### Where should I start?

A good way to start is to find an [issue](https://github.com/marktext/marktext/issues) labeled as `bug`, `help wanted` or `feature request`. The `good first issue` issues are good for newcomers. Please discuss the solution for larger issues first and after the final solution is approved by the MarkText members, you can submit/work on the PR. For small changes you can directly open a PR.

Other ways to help:

- Documentation
- Translation (currently unavailable)
- Design icons and logos
- Improve the UI
- Write tests for MarkText
- Share your thoughts! We want to hear about features you think are missing, any bugs you find, and why you :heart: MarkText.

## Quick start

1. Fork the repository.
2. Clone your fork: `git clone git@github.com:<username>/marktext.git`
3. Create a feature branch: `git checkout -b feature`
4. Make your changes and push your branch.
5. Create a PR against `develop` and describe your changes.

**Rebase your PR:**

If there are conflicts or you want to update your local branch, please do the following:

1. `git fetch upstream`
2. `git rebase upstream/develop`
3. Please [resolve](https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/) all conflicts and force push your feature branch: `git push -f`

### Build Instructions

🔗 [Build Instructions](docs/dev/BUILD.md)

### Style Guide

You can run ESLint (`yarn run lint`) to help you to follow the style guide.

- ES6 and "best practices"
- 2 space indent
- no semicolons
- documentation: [JSDoc](https://github.com/jsdoc/jsdoc)

## Developer Documentation

Please [click here](docs/dev/README.md) for more details.

+ 29
- 0
IMAGES.md View File

@@ -0,0 +1,29 @@
# Image support

MarkText can automatically copy your images into a specified directory or handle images from clipboard.

### Upload to cloud using selected uploader

Please see [here](IMAGE_UPLOADER_CONFIGRATION.md) for more information.

### Move to designated local folder

All images are automatically copied into the specified local directory that may be relative.

**Prefer relative assets folder:**

When this option is enabled, all images are copied relative to the opened file. The root directory is used when a project is opened and no variables are used. You can specify the path via the *relative image folder name* text box and include variables like `${filename}` to add the file name to the relative directory. The local resource directory is used if the file is not saved.

Note: The assets directory name must be a valid path name and MarkText need write access to the directory.

Examples for relative paths:

- `assets`
- `../assets`
- `.`: current file directory
- `assets/123`
- `assets_${filename}` (add the document file name)

### Keep original location

MarkText only saves images from clipboard into the specified local directory.

+ 268
- 1
README.md View File

@@ -1,2 +1,269 @@
# marktext-develop
<p align="center"><img src="static/logo-small.png" alt="MarkText" width="100" height="100"></p>

<h1 align="center">MarkText</h1>

<div align="center">
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText">
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
</a>
</div>
<div align="center">
<strong>:high_brightness: Next generation markdown editor :crescent_moon:</strong><br>
A simple and elegant open-source markdown editor that focused on speed and usability.<br>
<sub>Available for Linux, macOS and Windows.</sub>
</div>

<br>

<div align="center">
<!-- License -->
<a href="LICENSE">
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
</a>
<!-- Build Status -->
<a href="https://travis-ci.org/marktext/marktext/">
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
</a>
<a href="https://ci.appveyor.com/project/marktext/marktext/branch/master">
<img src="https://ci.appveyor.com/api/projects/status/l4gxgydj0i95hmxg/branch/master?svg=true" alt="build">
</a>
<!-- Downloads total -->
<a href="https://github.com/marktext/marktext/releases">
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
</a>
<!-- Downloads latest release -->
<a href="https://github.com/marktext/marktext/releases/latest">
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
</a>
<!-- sponsors -->
<a href="https://opencollective.com/marktext">
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
</a>
</div>

<div align="center">
<h3>
<a href="https://github.com/marktext/marktext">
Website
</a>
<span> | </span>
<a href="https://github.com/marktext/marktext#features">
Features
</a>
<span> | </span>
<a href="https://github.com/marktext/marktext#download-and-installation">
Downloads
</a>
<span> | </span>
<a href="https://github.com/marktext/marktext#development">
Development
</a>
<span> | </span>
<a href="https://github.com/marktext/marktext#contribution">
Contribution
</a>
</h3>
</div>

<div align="center">
<sub>Translations:</sub>
<a href="docs/i18n/zh_cn.md#readme">
<span>:cn:</span>
</a>
<a href="docs/i18n/zh_tw.md#readme">
<span>:taiwan:</span>
</a>
<a href="docs/i18n/pl.md#readme">
<span>:poland:</span>
</a>
<a href="docs/i18n/ja.md#readme">
<span>:jp:</span>
</a>
<a href="docs/i18n/french.md#readme">
<span>:fr:</span>
</a>
<a href="docs/i18n/tr.md#readme">
<span>:tr:</span>
</a>
<a href="docs/i18n/spanish.md#readme">
<span>:es:</span>
</a>
<a href="docs/i18n/pt.md#readme">
<span>:portugal:</span>
</a>
<a href="docs/i18n/ko.md#readme">
<span>:kr:</span>
</a>
</div>

<div align="center">
<sub>This Markdown editor that could. Built with ❤︎ by
<a href="https://github.com/Jocs">Jocs</a> and
<a href="https://github.com/marktext/marktext/graphs/contributors">
contributors
</a>
.
</sub>
</div>

<br />

<h2 align="center">Supporting MarkText</h2>

MarkText is an MIT licensed open source project, and the latest version will always be downloadable for free from the GitHub release page. MarkText is still in development, and its development is inseparable from all sponsors. I hope you join them:

- [Become a backer or sponsor on Patreon](https://www.patreon.com/ranluo) or [One time donation](https://github.com/Jocs/sponsor.me)
- [Become a backer or sponsor on Open Collective](https://opencollective.com/marktext)

##### What's the difference between Patreon and Open Collective?

Patreon: Funds will be directly sponsored to Luo Ran (@jocs) who created MarkText and continues to maintain it.
Open Collective: All expenses are transparent. The funds will be used for the development and maintenance of MarkText, funding online and offline activities, and acquiring other necessary resources.
Names and company logos of all sponsors (from both Patreon and Open Collective) will appear on the official website for MarkText and in its README.md file.

**Special Sponsors**

<a href="https://www.dogedoge.com/">
<img src="https://www.dogedoge.com/assets/new_logo.min.png" width="100" height="100">
</a>

**Platinum Sponsors**

<a href="https://opencollective.com/marktext#platinum-sponsors">
<img src="https://opencollective.com/marktext/tiers/platinum-sponsors.svg?avatarHeight=36&width=600">
</a>

**Gold Sponsors**

<a href="https://opencollective.com/marktext#platinum-sponsors">
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
</a>

**Silver Sponsors**

<a href="https://opencollective.com/marktext#platinum-sponsors">
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
</a>

**Bronze Sponsors**

<a href="https://opencollective.com/marktext#platinum-sponsors">
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
</a>

**Backers**

<a href="https://opencollective.com/marktext#backers">
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
</a>

## Screenshot

![](docs/marktext.png?raw=true)

## Features

- Realtime preview (WYSIWYG) and a clean and simple interface to get a distraction-free writing experience.
- Support [CommonMark Spec](https://spec.commonmark.org/0.29/), [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) and selective support [Pandoc markdown](https://pandoc.org/MANUAL.html#pandocs-markdown).
- Markdown extensions such as math expressions (KaTeX), front matter and emojis.
- Support paragraphs and inline style shortcuts to improve your writing efficiency.
- Output **HTML** and **PDF** files.
- Various themes: **Cadmium Light**, **Material Dark** etc.
- Various editing modes: **Source Code mode**, **Typewriter mode**, **Focus mode**.
- Paste images directly from clipboard.

<h4 align="center">:crescent_moon:themes:high_brightness:</h4>

| Cadmium Light | Dark |
|:-------------------------------------------------:|:-----------------------------------------------:|
| ![](docs/themeImages/cadmium-light.png?raw=true) | ![](docs/themeImages/dark.png?raw=true) |
| Graphite Light | Material Dark |
| ![](docs/themeImages/graphite-light.png?raw=true) | ![](docs/themeImages/materal-dark.png?raw=true) |
| Ulysses Light | One Dark |
| ![](docs/themeImages/ulysses-light.png?raw=true) | ![](docs/themeImages/one-dark.png?raw=true) |

<h4 align="center">:smile_cat:Edit modes:dog:</h4>

| Source Code | Typewriter | Focus |
|:--------------------:|:------------------------:|:-------------------:|
| ![](docs/source.gif) | ![](docs/typewriter.gif) | ![](docs/focus.gif) |

## Why make another editor?

1. I love writing. I have used a lot of markdown editors, yet there is still not an editor that can fully meet my needs. I don't like to be disturbed when I write by some unbearable bug. **MarkText** uses virtual DOM to render pages which has the added benefits of being highly efficient and being open source. That way anyone who loves markdown and writing can use MarkText.
2. As mentioned above, **MarkText** is completely free and open source and will be open source forever. We hope that all markdown lovers will contribute their own code and help develop **MarkText** into a popular markdown editor.
3. There are many markdown editors and all have their own merits, some have features which others don't. It's difficult to satisfy each markdown users' needs but we hope **MarkText** will be able to satisfy each markdown user as much as possible. Although the latest **MarkText** is still not perfect, we will try to make it as best as we possibly can.

## Download and Installation

![platform](https://img.shields.io/static/v1.svg?label=Platform&message=Linux-64%20|%20macOS-64%20|%20Win-32%20|%20Win-64&style=for-the-badge)

| ![](https://raw.githubusercontent.com/wiki/ryanoasis/nerd-fonts/screenshots/v1.0.x/mac-pass-sm.png) | ![](https://raw.githubusercontent.com/wiki/ryanoasis/nerd-fonts/screenshots/v1.0.x/windows-pass-sm.png) | ![](https://raw.githubusercontent.com/wiki/ryanoasis/nerd-fonts/screenshots/v1.0.x/linux-pass-sm.png) |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| [![latest version](https://img.shields.io/github/downloads/marktext/marktext/latest/marktext-x64.dmg.svg)](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [![latest version](https://img.shields.io/github/downloads/marktext/marktext/latest/marktext-setup.exe.svg)](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [![latest version](https://img.shields.io/github/downloads/marktext/marktext/latest/marktext-x86_64.AppImage.svg)](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |

Want to see new features of the latest version? Please refer to [CHANGELOG](.github/CHANGELOG.md).

#### macOS

You can either download the latest `marktext-%version%.dmg` from the [release page](https://github.com/marktext/marktext/releases/latest) or install MarkText using [**homebrew cask**](https://github.com/caskroom/homebrew-cask). To use Homebrew-Cask you just need to have [Homebrew](https://brew.sh/) installed.

```bash
brew install --cask mark-text
```

#### Windows

Simply download and install MarkText via setup wizard (`marktext-setup-%version%.exe`) and choose whether to install per-user or machine wide. Alternatively, install MarkText using a package manager such as [Chocolatey](https://chocolatey.org/) or [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/).

To use Chocolatey, you need to have [Chocolatey](https://chocolatey.org/install) installed:

```bash
choco install marktext
```

To use Winget, you need to have [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/#install-winget) installed:

```bash
winget install marktext
```

#### Linux

Please follow the [Linux installation instructions](docs/LINUX.md).

#### Other

All binaries for Linux, macOS and Windows can be downloaded from the [release page](https://github.com/marktext/marktext/releases/latest). If a version is unavailable for your system, then please open an [issue](https://github.com/marktext/marktext/issues).

## Development

If you wish to build MarkText yourself, please check out our [build instructions](docs/dev/BUILD.md).

- [User documentation](docs/README.md)
- [Developer documentation](docs/dev/README.md)

If you have any questions regarding MarkText, you are welcome to write an issue. When doing so please use the default format found when opening an issue. Of course, if you submit a PR directly, it will be greatly appreciated.

## Integrations

- [Alfred Workflow](http://www.packal.org/workflow/mark-text): A Workflow for the macOS app Alfred: Use "mt" to open files/folder with MarkText.

## Contribution

MarkText is in development, please make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request. Want to add some features to MarkText? Refer to our [roadmap](https://github.com/marktext/marktext/projects) and open issues.


## Contributors

Thank you to all the people who have already contributed to MarkText[[contributors](https://github.com/marktext/marktext/graphs/contributors)].

Special thanks to @[Yasujizr](https://github.com/Yasujizr) who designed the MarkText logo.

<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>

## License

[**MIT**](LICENSE).

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)

+ 56
- 0
babel.config.js View File

@@ -0,0 +1,56 @@
const proposalClassProperties = require('@babel/plugin-proposal-class-properties')
const syntaxClassProperties = require('@babel/plugin-syntax-class-properties')
const transformRuntime = require('@babel/plugin-transform-runtime')
const syntaxDynamicImport = require('@babel/plugin-syntax-dynamic-import')
const functionBind = require('@babel/plugin-proposal-function-bind')
const exportDefault = require('@babel/plugin-proposal-export-default-from')
const isTanbul = require('babel-plugin-istanbul')
const component = require('babel-plugin-component')
const presetEnv = require('@babel/preset-env')

const presetsHash = {
test: [
[presetEnv,
{
targets: { 'node': 16 }
}]
],
main: [
[presetEnv,
{
targets: { 'node': 16 }
}]
],
renderer: [
[presetEnv,
{
useBuiltIns: false,
targets: {
electron: require('electron/package.json').version,
node: 16
}
}]
]
}

module.exports = function (api) {
const plugins = [ proposalClassProperties, syntaxClassProperties, transformRuntime, syntaxDynamicImport, functionBind, exportDefault ]
const env = api.env()
const presets = presetsHash[env]

if (env === 'test') {
plugins.push(isTanbul)
} else if (env === 'renderer') {
plugins.push(
[component, {
style: false,
libraryName: 'element-ui'
}
])
}

return {
presets,
plugins
}
}

+ 160
- 0
electron-builder.yml View File

@@ -0,0 +1,160 @@
productName: "MarkText"
appId: "com.github.marktext.marktext"

asar: true
asarUnpack:
- "**/*.node"
directories:
output: "build"
# Workaround: Don't download prebuilt libraries (GH#2953).
buildDependenciesFromSource: true
files:
- "dist/electron/**/*"
# Don't bundle these files
- "!**/node_modules/**/{CHANGELOG.md,README.md,README,readme.md,readme}"
- "!node_modules/css-b64-images/{draft.png,draft.xcf}"
- "!node_modules/dagre-d3-renderer/dist/demo/"
- "!node_modules/dagre-d3/dist/demo/"
- "!node_modules/dragula/resources"
- "!node_modules/**/*.js.map"
- "!node_modules/**/*.cjs.map"
- "!node_modules/**/*.mjs.map"
- "!node_modules/**/*.ts.map"
- "!node_modules/vscode-ripgrep/{jsconfig.json,*.md,LICENSE}"
- "!node_modules/vscode-ripgrep/download.js"
- "!node_modules/vscode-ripgrep/postinstall.js"
# Don't bundle build files
- "!node_modules/ced/bin"
- "!node_modules/ced/vendor"
- "!node_modules/fontmanager-redux/bin"
- "!node_modules/keyboard-layout/bin"
- "!node_modules/keytar/bin"
- "!node_modules/native-keymap/bin"
# Large source files that aren't needed
- "!node_modules/dagre-d3/dist/dagre-d3.min.js"
- "!node_modules/mermaid/dist/mermaid.js"
- "!node_modules/mermaid/dist/mermaid.min.js"
- "!node_modules/mermaid/dist/mermaid.esm.min.mjs"
- "!node_modules/katex/dist/katex.min.js"
- "!node_modules/katex/dist/katex.mjs"
- "!node_modules/vega/build-es5/"
- "!node_modules/vega-embed/build-es5/"
# Don't bundle Linux build files
- "!node_modules/ced/build/Release/compact_enc_det.a"
# Don't bundle Windows build files
- "!node_modules/**/{*.vcxproj,*.vcxproj.filters}"
- "!node_modules/**/build/Release/{*.lib,*.exp,*.ilk,*.pdb,*.iobj,*.ipdb}"
- "!node_modules/**/build/Release/obj"
- "!node_modules/ced/build/vendor"
extraFiles:
- "LICENSE"
- from: "resources/THIRD-PARTY-LICENSES.txt"
to: "THIRD-PARTY-LICENSES.txt"
afterPack: './.electron-vue/electron-builder/afterPack.js'

fileAssociations:
- ext:
- "md"
- "markdown"
- "mmd"
- "mdown"
- "mdtxt"
- "mdtext"
name: "Markdown"
description: "Markdown document"
role: "Editor"
icon: "../resources/icons/md.icns"
mac:
artifactName: "marktext-${arch}-mac.${ext}"
icon: "resources/icons/icon.icns"
darkModeSupport: true
target:
- target: dmg
arch: [x64, arm64]
- target: zip
arch: [x64, arm64]
dmg:
artifactName: "marktext-${arch}.${ext}"
contents:
- x: 410
y: 240
type: "link"
path: "/Applications"
- x: 130
y: 240
type: "file"
win:
artifactName: "marktext-${arch}-win.${ext}"
icon: "resources/icons/icon.ico"
target:
- target: "nsis"
arch: [ia32, x64]
- target: "zip"
arch: [ia32, x64]
requestedExecutionLevel: "asInvoker"
nsis:
artifactName: "marktext-setup.${ext}"
perMachine: false
oneClick: false
allowToChangeInstallationDirectory: true
include: "resources/windows/installer.nsh"
linux:
artifactName: "marktext-${arch}.${ext}"
executableName: "marktext"
description: "A simple and elegant open-source markdown editor that focused on speed and usability."
maintainer: "MarkText Contributors"
category: "Office;TextEditor;Utility"
mimeTypes:
- "text/markdown"
icon: "resources/icons"
desktop:
StartupWMClass: "marktext"
Keywords: "marktext;"
target:
- target: "AppImage"
- target: "deb"
- target: "rpm"
- target: "tar.gz"
# Workaround because file association array doesn't work.
fileAssociations:
- ext: "md"
name: "Markdown"
description: "Markdown document"
- ext: "markdown"
name: "Markdown"
description: "Markdown document"
- ext: "mmd"
name: "Markdown"
description: "Markdown document"
- ext: "mdown"
name: "Markdown"
description: "Markdown document"
- ext: "mdtxt"
name: "Markdown"
description: "Markdown document"
- ext: "mdtext"
name: "Markdown"
description: "Markdown document"
deb:
# Custom dependencies:
depends:
# keytar
- "libsecret-1-0"
# keyboard-layout
- "libx11-xcb1"
- "libxkbfile1"
# fontmanager
- "libfontconfig1"
fpm:
# Expat := MIT like
- "--license=Expat"
rpm:
# Custom dependencies:
depends:
# keytar
- "libsecret"
# keyboard-layout
- "libX11-xcb"
- "libxkbfile"
# fontmanager
- "fontconfig"

+ 206
- 0
package.json View File

@@ -0,0 +1,206 @@
{
"name": "marktext",
"version": "0.17.1",
"homepage": "https://github.com/marktext/marktext/",
"description": "Next generation markdown editor",
"license": "MIT",
"main": "./dist/electron/main.js",
"scripts": {
"release": "echo 'Please run \"build\" or \"release:{linux,mac,win}\"' && exit 1",
"release:linux": "node .electron-vue/build.js && electron-builder build --linux",
"release:mac": "node .electron-vue/build.js && electron-builder build --mac",
"release:win": "node .electron-vue/build.js && electron-builder build --win",
"build": "node .electron-vue/build.js && electron-builder",
"build:bin": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:dev": "node .electron-vue/build.js",
"dev": "cross-env node .electron-vue/dev-runner.js",
"e2e": "yarn run pack && cross-env MARKTEXT_EXIT_ON_ERROR=1 playwright test -c test/e2e/playwright.config.js test/e2e",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test",
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test",
"pack": "yarn run pack:main && yarn run pack:renderer",
"pack:main": "cross-env NODE_ENV=production webpack --progress --config .electron-vue/webpack.main.config.js",
"pack:renderer": "cross-env NODE_ENV=production webpack --progress --config .electron-vue/webpack.renderer.config.js",
"postinstall": "node .electron-vue/postinstall.js && yarn run rebuild && yarn run lint:fix",
"test": "yarn run unit && yarn run e2e",
"test:specs": "node -r esm test/specs/commonMark/run.spec.js && node -r esm test/specs/gfm/run.spec.js",
"unit": "cross-env NODE_ENV=test ELECTRON_DISABLE_SECURITY_WARNINGS=true karma start test/unit/karma.conf.js",
"preinstall": "node .electron-vue/preinstall.js",
"build:muya": "cd src/muya && webpack --progress --config webpack.config.js",
"release:muya": "yarn run build:muya && cd src/muya && yarn publish",
"rebuild": "electron-rebuild -f",
"gen-third-party": "node tools/generateThirdPartyLicense.js",
"validate-licenses": "node tools/validateLicenses.js",
"deobfuscateStackTrace": "node tools/deobfuscateStackTrace.js"
},
"dependencies": {
"@electron/remote": "^2.0.8",
"@hfelix/electron-localshortcut": "^4.0.1",
"@marktext/file-icons": "^1.0.6",
"@octokit/rest": "^18.12.0",
"arg": "^5.0.1",
"axios": "^0.26.1",
"ced": "^2.0.0",
"chokidar": "^3.5.3",
"codemirror": "^5.65.2",
"command-exists": "^1.2.9",
"dayjs": "^1.11.0",
"dom-autoscroller": "^2.3.4",
"dompurify": "^2.3.6",
"dragula": "^3.7.3",
"electron-log": "^4.4.6",
"electron-store": "^8.0.1",
"electron-window-state": "^5.0.3",
"element-resize-detector": "^1.2.4",
"element-ui": "^2.15.7",
"execall": "^2.0.0",
"flowchart.js": "^1.17.1",
"fontmanager-redux": "^1.1.0",
"fs-extra": "^10.0.1",
"fuzzaldrin": "^2.1.0",
"github-markdown-css": "^3.0.1",
"html-tags": "^3.1.0",
"iconv-lite": "^0.6.3",
"iso-639-1": "^2.1.13",
"joplin-turndown-plugin-gfm": "^1.0.12",
"katex": "^0.15.3",
"keytar": "^7.9.0",
"mermaid": "^8.14.0",
"minizlib": "^2.1.2",
"native-keymap": "^3.3.0",
"plist": "^3.0.4",
"popper.js": "^1.16.1",
"prismjs": "^1.27.0",
"snabbdom": "^3.3.1",
"snabbdom-to-html": "^7.0.0",
"source-map-support": "^0.5.21",
"turndown": "^7.1.1",
"underscore": "^1.13.2",
"unsplash-js": "^7.0.15",
"vega": "^5.22.0",
"vega-embed": "^6.20.8",
"vega-lite": "^5.2.0",
"vscode-ripgrep": "^1.12.1",
"vue": "^2.6.14",
"vue-electron": "^1.0.6",
"vue-router": "^3.5.3",
"vuex": "^3.6.2",
"webfontloader": "^1.6.28"
},
"devDependencies": {
"@babel/core": "^7.17.7",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-export-default-from": "^7.16.7",
"@babel/plugin-proposal-function-bind": "^7.16.7",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.7",
"@markedjs/html-differ": "^4.0.1",
"@playwright/test": "^1.20.0",
"babel-loader": "^8.2.3",
"babel-plugin-component": "^1.1.1",
"babel-plugin-istanbul": "^6.1.1",
"cfonts": "^2.10.0",
"chai": "^4.3.6",
"chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
"copy-webpack-plugin": "^10.2.4",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"del": "^6.0.0",
"devtron": "^1.4.0",
"dotenv": "^16.0.0",
"electron": "^17.1.2",
"electron-builder": "^22.14.13",
"electron-devtools-installer": "^3.2.0",
"electron-rebuild": "^3.2.7",
"electron-updater": "^4.6.5",
"eslint": "^8.11.0",
"eslint-config-standard": "^16.0.3",
"eslint-friendly-formatter": "^4.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.5.0",
"eslint-webpack-plugin": "^3.1.1",
"esm": "^3.2.25",
"file-loader": "^6.2.0",
"git-revision-webpack-plugin": "^5.0.0",
"html-webpack-plugin": "^5.5.0",
"imports-loader": "^0.8.0",
"karma": "^6.3.17",
"karma-chai": "^0.1.0",
"karma-coverage": "^2.2.0",
"karma-electron": "^7.1.0",
"karma-mocha": "^2.0.1",
"karma-sourcemap-loader": "^0.3.8",
"karma-spec-reporter": "0.0.33",
"karma-webpack": "^5.0.0",
"license-checker": "^25.0.1",
"listr": "^0.14.3",
"marked": "^1.2.9",
"mini-css-extract-plugin": "^2.6.0",
"mocha": "^9.2.2",
"node-fetch": "^2.6.7",
"node-loader": "^2.0.0",
"path-browserify": "^1.0.1",
"playwright": "^1.20.0",
"postcss": "^8.4.12",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.4.2",
"raw-loader": "^4.0.2",
"require-dir": "^1.2.0",
"stacktrace-parser": "^0.1.10",
"style-loader": "^3.3.1",
"svg-sprite-loader": "^6.0.11",
"svgo": "^2.8.0",
"svgo-loader": "^3.0.0",
"to-string-loader": "^1.2.0",
"url-loader": "^4.1.1",
"vue-html-loader": "^1.2.4",
"vue-loader": "^15.9.8",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.70.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4",
"webpack-hot-middleware": "^2.25.1",
"webpack-merge": "^5.8.0"
},
"resolutions": {
"node-abi": "^3.8.0",
"node-addon-api": "^4.3.0"
},
"repository": {
"type": "git",
"url": "git@github.com:marktext/marktext.git"
},
"bugs": {
"url": "https://github.com/marktext/marktext/issues"
},
"author": {
"name": "Jocs",
"email": "ransixi@gmail.com",
"url": "https://github.com/Jocs"
},
"maintainer": [
{
"name": "Jocs",
"email": "ransixi@gmail.com",
"url": "https://github.com/Jocs"
},
{
"name": "Felix Häusler",
"email": "hfelix@protonmail.ch",
"url": "https://github.com/fxha"
}
]
}

+ 9
- 0
vetur.config.js View File

@@ -0,0 +1,9 @@
module.exports = {
projects: [
{
root: './src/renderer',
package: '../../package.json',
tsconfig: './jsconfig.json'
}
]
}

+ 13533
- 0
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save