Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmao committed Sep 25, 2023
1 parent 973baa0 commit 09b5470
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = tab
tab_size = 3
insert_final_newline = true
end_of_line = lf

[*.{md,yml}]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

**/.DS_Store
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "github.vscode-github-actions"]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# bem-node
# bem-node

Parses a BEM file into a TypeScript type.
223 changes: 223 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "@vortex-design/bem",
"version": "1.0.0",
"description": "Parses a BEM file into a TypeScript type.",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vortex-design/bem-node.git"
},
"keywords": [
"bem",
"typescript"
],
"author": "Vortex Design (http://vortex.design)",
"license": "MIT",
"bugs": {
"url": "https://github.com/vortex-design/bem-node/issues"
},
"homepage": "https://github.com/vortex-design/bem-node#readme",
"dependencies": {
"@types/node": "^20.6.5",
"bem-neon": "^1.0.0",
"meow": "^12.1.1",
"typescript": "^5.2.2"
},
"devDependencies": {
"ts-node": "^10.9.1"
}
}
9 changes: 9 additions & 0 deletions src/BEMBlock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type BEMBlock<
TName extends string,
TElements extends Record<string, string | never>,
TModifiers extends string | undefined
> = {
name: TName
elements: TElements
modifiers: TModifiers
}
Loading

0 comments on commit 09b5470

Please sign in to comment.