Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
surajair committed Feb 4, 2024
1 parent 77e98fc commit b0e1a46
Show file tree
Hide file tree
Showing 34 changed files with 7,477 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', 'src/package/ui/**', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'react/prop-type': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm-lock.yaml
node_modules
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2024, Chai Builder
Copyright (c) 2024, Suraj Air

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -12,7 +12,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
3. Neither the name "Chai Builder" nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand Down
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Chai Builder - Multipurpose Tailwind CSS Builder

Chai Builder is a simple multipurpose Tailwind CSS builder designed to streamline and enhance your web development workflow. This tool simplifies the process of customizing and generating Tailwind CSS styles, providing an intuitive interface for creating, editing, and exporting Tailwind configurations.

## Features

- **Visual Editor**: Easily tweak and fine-tune Tailwind CSS settings visually.
- **Live Preview**: See real-time changes in a live preview, enabling quick design decisions.
- **Customization**: Modify colors, spacing, typography, and more to match your design requirements.
- **Responsive Design**: Test and preview designs across various screen sizes to ensure responsiveness.


## Usage

2. **Install dependencies**:

```bash
npm/pnpm/yarn install chaibuilder
```

3. **Start the development server**:

```bash
npm run start
```

4. **Access the application**:

Visit `http://localhost:3000` in your browser to start using Chai Builder.

## Fair Usage Policy
Chai Builder operates under a Fair Usage Policy. While this tool is available for free and open use, we kindly request users to employ it responsibly and ethically. The Fair Usage Policy for Chai Builder encompasses:

Free Usage: Chai Builder is freely accessible for personal and commercial use without charge.

**Attribution**: While not mandatory, giving credit to Chai Builder in your projects or documentation is appreciated.

**Responsible Use**: Users are encouraged to avoid excessive automated use or any actions that may impair the service's availability or performance.

**Non-Endorsement**: This policy does not imply an endorsement or partnership with users or their projects.

This Fair Usage Policy aims to ensure equal and fair access to Chai Builder for all users. Your use of Chai Builder constitutes acceptance of this policy.

For specific legal details, please refer to the full LICENSE document.

If there are any particular clauses or details you'd like to add or modify, feel free to let me know!


## Acknowledgments

Chai Builder stands on the shoulders of many open-source libraries and tools. We extend our gratitude to the developers and maintainers of these projects for their contributions.

---

Feel free to adjust this to fit the specifics of your project, and add any additional sections or details as needed.
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Chai Builder</title>
</head>
<body>
<div id="root"></div>
<script src="/src/main.tsx" type="module"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
22 changes: 22 additions & 0 deletions jsdoc.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc", "closure"]
},
"source": {
"include": ["src/package"],
"includePattern": ".+\\.ts(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": ["plugins/markdown", "better-docs/component", "node_modules/better-docs/typescript"],
"templates": {
"better-docs": {
"name": "Chai Builder"
}
},
"opts": {
"destination": "docs",
"recurse": true,
"readme": "README.md"
}
}
65 changes: 65 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@chaibuilder/runtime",
"private": false,
"version": "0.2.0",
"type": "module",
"files": [
"dist"
],
"main": "dist/index.js",
"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "jest --colors",
"test:watch": "jest --watch --colors",
"test:coverage": "jest --coverage --colors",
"docs": "jsdoc -c jsdoc.conf.json",
"prepare": "husky"
},
"dependencies": {
"lodash": "4.17.21",
"react": "^18.2.0"
},
"devDependencies": {
"@commitlint/cli": "17.7.1",
"@commitlint/config-conventional": "17.7.0",
"@playwright/test": "^1.39.0",
"@types/jest": "^29.5.7",
"@types/lodash": "^4.14.200",
"@types/node": "^20.8.10",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.16",
"better-docs": "^2.7.2",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"husky": "^9.0.10",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdoc": "^4.0.2",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.6",
"prop-types": "^15.8.1",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.5",
"ts-jest": "^29.1.1",
"typescript": "^5.0.2",
"vite": "^5.0.12",
"vite-plugin-dts": "^3.6.3"
}
}
Loading

0 comments on commit b0e1a46

Please sign in to comment.