diff --git a/.eslintrc.js b/.eslintrc.js
index 7fbb299..3dcb4ce 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -3,15 +3,13 @@ module.exports = {
env: {
node: true
},
- 'extends': [
- 'plugin:vue/essential',
- '@vue/prettier'
- ],
+ extends: ['plugin:vue/essential', '@vue/prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+ quotes: ['error', 'single']
},
parserOptions: {
parser: 'babel-eslint'
}
-}
\ No newline at end of file
+}
diff --git a/.gitignore b/.gitignore
index 185e663..056eeae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.DS_Store
node_modules
-/dist
+/dist/demo.html
+/demo
# local env files
.env.local
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..55bfa8f
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+ singleQuote: true,
+ semi: false
+};
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1e3483e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Yichang Liu
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e5507cf
--- /dev/null
+++ b/README.md
@@ -0,0 +1,100 @@
+# vue-highlight-words
+
+> A simple port from [`react-highlight-words`](https://github.com/bvaughn/react-highlight-words)
+>
+> Vue component to highlight words within a larger body of text.
+
+## Usage
+
+To use it, just provide it with an array of search terms and a body of text to highlight.
+
+```html
+
+