Skip to content
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,json,yml,yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-unused-vars": "warn",
"no-console": "off",
"no-trailing-spaces": "error",
"eol-last": ["error", "always"]
}
}
57 changes: 57 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Node.js CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint:
name: Lint Code Quality
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm install

- name: Install ESLint and Prettier
run: |
npm install --save-dev eslint prettier

- name: Run ESLint
run: npx eslint . --ext .js,.json --ignore-path .prettierignore

- name: Check Prettier formatting
run: |
npx prettier --check . --ignore-path .prettierignore || {
echo "Some files are not formatted. Run 'npx prettier --write .' to format them."
exit 1
}

test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test
33 changes: 33 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python CI

on:
push:
branches: [ main, master ]
pull_request:
Comment on lines +1 to +6

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -e . 2>/dev/null || pip install -r requirements.txt 2>/dev/null || true
pip install pytest pytest-cov flake8 mypy
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Type check with mypy
run: |
mypy . --ignore-missing-imports 2>/dev/null || echo "mypy not configured"
- name: Run tests
run: |
pytest --tb=short --cov=. --cov-report=term-missing 2>/dev/null || python -m unittest discover 2>/dev/null || echo "No test framework found"
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependencies
node_modules/

# Build outputs
dist/
build/

# IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*

# Testing
coverage/

# Temporary files
*.tmp
*.temp
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
icons/tsx/
*.map
*.json
*.min.css
dist/
coverage/
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"arrowParens": "avoid",
"endOfLine": "lf"
}
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
export * from "./icons/icons.js";
export * from "./icons/icons.d.ts";

export * from "./icons/icons.js";
export * from "./icons/icons.d.ts";

import glyphs from "./glyphs/glyphs.json";
export { glyphs };
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"glyphs"
],
"scripts": {
"test": " "
"lint": "eslint . --ext .js,.json",
"lint:fix": "eslint . --ext .js,.json --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test": "echo \"No tests specified\""
},
"repository": {
"type": "git",
Expand Down