Skip to content

Commit fe5eac0

Browse files
committed
init project v1.0.0
0 parents  commit fe5eac0

27 files changed

+4683
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
quote_type = single
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
bin/
3+
.history/
4+
**/*.min.js
5+
**/*-min.js
6+
**/*.bundle.js

.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
extends: ['alloy', 'alloy/typescript', 'eslint:recommended'],
3+
env: {
4+
node: true,
5+
},
6+
rules: {
7+
'@typescript-eslint/no-unused-vars': 'off',
8+
'arrow-parens': 'off',
9+
'class-methods-use-this': 'off',
10+
'comma-dangle': ['error', 'always-multiline'],
11+
'eol-last': ['error', 'always'],
12+
'import/extensions': 'off',
13+
'import/no-extraneous-dependencies': 'off',
14+
'import/no-named-as-default': 'off',
15+
'import/no-unresolved': 'off',
16+
'indent': ['error', 4],
17+
'jsx-a11y/label-has-associated-control': 'off',
18+
'key-spacing': ['error'],
19+
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
20+
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
21+
'max-len': ['error', { code: 256 }],
22+
'newline-before-return': 'off',
23+
'no-console': 'off',
24+
'no-debugger': 'off',
25+
'no-multiple-empty-lines': 'off',
26+
'no-prototype-builtins': 'off',
27+
'no-trailing-spaces': ['error', { ignoreComments: true, skipBlankLines: true }],
28+
'no-underscore-dangle': 'off',
29+
'padded-blocks': ['error', 'never'],
30+
'quotes': ['error', 'single'],
31+
'require-jsdoc': 'off',
32+
'semi': 'error',
33+
'space-in-parens': 'off',
34+
},
35+
};

.gitignore

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2+
3+
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,node
4+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,node
5+
6+
### Node ###
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# Diagnostic reports (https://nodejs.org/api/report.html)
16+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
*.lcov
30+
31+
# nyc test coverage
32+
.nyc_output
33+
34+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35+
.grunt
36+
37+
# Bower dependency directory (https://bower.io/)
38+
bower_components
39+
40+
# node-waf configuration
41+
.lock-wscript
42+
43+
# Compiled binary addons (https://nodejs.org/api/addons.html)
44+
build/Release
45+
46+
# Dependency directories
47+
node_modules/
48+
jspm_packages/
49+
50+
# TypeScript v1 declaration files
51+
typings/
52+
53+
# TypeScript cache
54+
*.tsbuildinfo
55+
56+
# Optional npm cache directory
57+
.npm
58+
59+
# Optional eslint cache
60+
.eslintcache
61+
62+
# Microbundle cache
63+
.rpt2_cache/
64+
.rts2_cache_cjs/
65+
.rts2_cache_es/
66+
.rts2_cache_umd/
67+
68+
# Optional REPL history
69+
.node_repl_history
70+
71+
# Output of 'npm pack'
72+
*.tgz
73+
74+
# Yarn Integrity file
75+
.yarn-integrity
76+
77+
# dotenv environment variables file
78+
.env
79+
.env.test
80+
.env*.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
89+
# Nuxt.js build / generate output
90+
.nuxt
91+
dist
92+
_temp
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# Serverless directories
104+
.serverless/
105+
106+
# FuseBox cache
107+
.fusebox/
108+
109+
# DynamoDB Local files
110+
.dynamodb/
111+
112+
# TernJS port file
113+
.tern-port
114+
115+
# Stores VSCode versions used for testing VSCode extensions
116+
.vscode-test
117+
118+
### VisualStudioCode ###
119+
.vscode/*
120+
!.vscode/settings.json
121+
!.vscode/tasks.json
122+
!.vscode/launch.json
123+
!.vscode/extensions.json
124+
*.code-workspace
125+
126+
### VisualStudioCode Patch ###
127+
# Ignore all local history of files
128+
.history
129+
.ionide
130+
131+
### Windows ###
132+
# Windows thumbnail cache files
133+
Thumbs.db
134+
Thumbs.db:encryptable
135+
ehthumbs.db
136+
ehthumbs_vista.db
137+
138+
# Dump file
139+
*.stackdump
140+
141+
# Folder config file
142+
[Dd]esktop.ini
143+
144+
# Recycle Bin used on file shares
145+
$RECYCLE.BIN/
146+
147+
# Windows Installer files
148+
*.cab
149+
*.msi
150+
*.msix
151+
*.msm
152+
*.msp
153+
154+
# Windows shortcuts
155+
*.lnk
156+
157+
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,node
158+
159+
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
160+
temp
161+
bin

.npmignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.history
2+
.babelrc
3+
.vscode
4+
.editorconfig
5+
.eslintignore
6+
.eslintrc.js
7+
.prettierrc.js
8+
CHANGELOG.md
9+
main.ts
10+
rollup.config.js
11+
tsconfig.json

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": true
5+
},
6+
"editor.formatOnSave": true,
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"files.eol": "\n",
9+
"editor.tabSize": 2
10+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Hamid
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Convert HTML to Object
2+
3+
The `convert-html-to-object` CLI is a simple tool that allows you to convert HTML files into JavaScript objects and write them to a JSON file. This can be useful when you want to extract structured data from HTML documents and work with it programmatically.
4+
5+
## Installation
6+
7+
You can easily install the `convert-html-to-object` CLI using npm. Open your terminal and run the following command:
8+
9+
```shell
10+
npm install -g convert-html-to-object
11+
```
12+
13+
This will install the CLI globally on your system, allowing you to use it from anywhere.
14+
15+
## Usage
16+
17+
Once you have installed the CLI, you can use it to convert HTML files to JSON objects with the following command:
18+
19+
```shell
20+
hto convert --src path/to/file.html
21+
```
22+
23+
- `convert`: This is the command to convert an HTML file to a JSON object.
24+
- `--src`: Use this option to specify the path to the HTML file you want to convert.
25+
26+
### Example
27+
28+
Let's say you have an HTML file named `example.html` located in the `/project` directory. To convert this file to a JSON object, you would run:
29+
30+
```shell
31+
hto convert --src /project/example.html
32+
```
33+
34+
This will generate a JSON file in the same directory as the HTML file with the `output.json` name. The JSON file will contain the structured data extracted from the HTML document.
35+
36+
---
37+
38+
Happy converting! If you have any questions or need assistance, feel free to reach out.

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {presets: ['@babel/preset-env']};

0 commit comments

Comments
 (0)