Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] [Plugin] Simple markdown pluging #3771

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions plugins/simple-markdown-editor/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@testing-library/jest-dom"]
}
30 changes: 30 additions & 0 deletions plugins/simple-markdown-editor/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Initial release of the `SimpleMarkDownEditor` component.

### Changed
- N/A

### Deprecated
- N/A

### Removed
- N/A

### Fixed
- N/A

### Security
- N/A

## [1.0.0] - YYYY-MM-DD
### Added
- Initial release of the `SimpleMarkDownEditor` component.

11 changes: 11 additions & 0 deletions plugins/simple-markdown-editor/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
11 changes: 11 additions & 0 deletions plugins/simple-markdown-editor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
coverage
.nyc_output
.DS_Store
*.log
.vscode
.idea
compiled
.awcache
.rpt2_cache
docs
20 changes: 20 additions & 0 deletions plugins/simple-markdown-editor/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js
cache:
directories:
- ~/.npm
notifications:
email: false
node_js:
- '10'
- '11'
- '8'
- '6'
script:
- npm run test:prod && npm run build
after_success:
- npm run travis-deploy-once "npm run report-coverage"
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run travis-deploy-once "npm run deploy-docs"; fi
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run travis-deploy-once "npm run semantic-release"; fi
branches:
except:
- /^v\d+\.\d+\.\d+$/
17 changes: 17 additions & 0 deletions plugins/simple-markdown-editor/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
We're really glad you're reading this, because we need volunteer developers to help this project come to fruition. 👏

## Instructions

These steps will guide you through contributing to this project:

- Fork the repo
- Clone it and install dependencies

git clone https://github.com/YOUR-USERNAME/typescript-library-starter
npm install

Keep in mind that after running `npm install` the git repo is reset. So a good way to cope with this is to have a copy of the folder to push the changes, and the other to try them.

Make and commit your changes. Make sure the commands npm run build and npm run test:prod are working.

Finally send a [GitHub Pull Request](https://github.com/alexjoverm/typescript-library-starter/compare?expand=1) with a clear list of what you've done (read more [about pull requests](https://help.github.com/articles/about-pull-requests/)). Make sure all of your commits are atomic (one feature per commit).
7 changes: 7 additions & 0 deletions plugins/simple-markdown-editor/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2020 Steve Sewell <[email protected]>

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.
22 changes: 22 additions & 0 deletions plugins/simple-markdown-editor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SimpleMarkDownEditor Component

This project contains a Markdown text editor component designed for use with Builder.IO. The component utilizes `react-simplemde-editor` to provide a rich text editing experience.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Props](#props)
- [Example](#example)
- [Contributing](#contributing)
- [License](#license)

## Installation

To install the component, ensure you have `react`, `@emotion/core`, `@builder.io/sdk`, `react-simplemde-editor`, and `easymde` installed in your project. If not, you can add them using npm or yarn:

```bash
npm install react @emotion/core @builder.io/sdk react-simplemde-editor easymde
```


30 changes: 30 additions & 0 deletions plugins/simple-markdown-editor/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Initial release of the `SimpleMarkDownEditor` component.

### Changed
- N/A

### Deprecated
- N/A

### Removed
- N/A

### Fixed
- N/A

### Security
- N/A

## [1.0.0] - YYYY-MM-DD
### Added
- Initial release of the `SimpleMarkDownEditor` component.

22 changes: 22 additions & 0 deletions plugins/simple-markdown-editor/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
roots: ['<rootDir>'],
automock: false,
testRegex: '.*\\.(test|spec).(ts|tsx|js)$',
coverageDirectory: 'coverage/',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'jsdom',
coverageDirectory: 'coverage/',
collectCoverage: true,
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
collectCoverageFrom: ['src/**'],
};
Loading