Skip to content

Commit f0818b0

Browse files
authored
Merge pull request #1 from edumudu/develop
Develop
2 parents 8ac50e3 + 3e80fbe commit f0818b0

29 files changed

+11072
-0
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{js,jsx,ts,tsx,vue}]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf
5+
trim_trailing_whitespace = true
6+
insert_final_newline = true
7+
max_line_length = 100

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'@vue/airbnb',
9+
'@vue/typescript/recommended',
10+
],
11+
parserOptions: {
12+
ecmaVersion: 2020,
13+
},
14+
rules: {
15+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
17+
'max-len': ['error', 120],
18+
'import/prefer-default-export': 'off',
19+
},
20+
overrides: [
21+
{
22+
files: [
23+
'**/__tests__/*.{j,t}s?(x)',
24+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
25+
],
26+
env: {
27+
mocha: true,
28+
},
29+
},
30+
],
31+
};

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
built-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Set-up Node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: "12.x"
19+
20+
- run: yarn -v
21+
- run: yarn
22+
- run: yarn build
23+
- run: yarn deploy
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
# Editor directories and files
16+
.idea
17+
.vscode
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?
23+
24+
yarn.lock

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# vue-text-editor
2+
This project is a simple Rich text editor made with vue 2 compostion API. I chose for not use `document.execComand` because he is deprecated. So I using native javascript DOM manipulators to remove and insert nodes.
3+
4+
## Project setup
5+
```
6+
yarn
7+
```
8+
9+
### Run development serve
10+
```
11+
yarn dev
12+
```
13+
14+
### Run your unit tests
15+
```
16+
yarn test:unit
17+
```
18+
19+
## License
20+
[MIT](LICENSE)

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset',
4+
],
5+
};

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "vue-text-editor",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"deploy": "gh-pages -d dist",
9+
"test:unit": "vue-cli-service test:unit",
10+
"lint": "vue-cli-service lint"
11+
},
12+
"dependencies": {
13+
"@vue/composition-api": "^1.0.0-beta.14",
14+
"core-js": "^3.6.5",
15+
"vue": "^2.6.11",
16+
"vue-material-design-icons": "^4.9.0"
17+
},
18+
"devDependencies": {
19+
"@types/chai": "^4.2.11",
20+
"@types/mocha": "^5.2.4",
21+
"@typescript-eslint/eslint-plugin": "^2.33.0",
22+
"@typescript-eslint/parser": "^2.33.0",
23+
"@vue/cli-plugin-babel": "~4.5.0",
24+
"@vue/cli-plugin-eslint": "~4.5.0",
25+
"@vue/cli-plugin-typescript": "~4.5.0",
26+
"@vue/cli-plugin-unit-mocha": "~4.5.0",
27+
"@vue/cli-service": "~4.5.0",
28+
"@vue/eslint-config-airbnb": "^5.0.2",
29+
"@vue/eslint-config-typescript": "^5.0.2",
30+
"@vue/test-utils": "^1.0.3",
31+
"chai": "^4.1.2",
32+
"eslint": "^6.7.2",
33+
"eslint-plugin-import": "^2.20.2",
34+
"eslint-plugin-vue": "^6.2.2",
35+
"gh-pages": "^3.1.0",
36+
"node-sass": "^4.12.0",
37+
"sass-loader": "^8.0.2",
38+
"typescript": "~3.9.3",
39+
"vue-template-compiler": "^2.6.11"
40+
}
41+
}

src/@types/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface CommandsItem {
2+
command: string;
3+
value: string;
4+
}

src/App.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<template>
2+
<div id="app">
3+
<the-header />
4+
5+
<main>
6+
<div class="container">
7+
<VEditor />
8+
</div>
9+
</main>
10+
</div>
11+
</template>
12+
13+
<script lang="ts">
14+
import { defineComponent } from '@vue/composition-api';
15+
import TheHeader from '@/components/unique/TheHeader.vue';
16+
import VEditor from '@/components/editor/VEditor.vue';
17+
18+
export default defineComponent({
19+
name: 'App',
20+
21+
components: {
22+
TheHeader,
23+
VEditor,
24+
},
25+
});
26+
27+
</script>
28+
29+
<style lang="scss">
30+
@import '@/assets/scss/app.scss';
31+
</style>

0 commit comments

Comments
 (0)