Skip to content

Commit

Permalink
feat: init utils package
Browse files Browse the repository at this point in the history
  • Loading branch information
v8tenko committed Aug 29, 2024
1 parent f4297b4 commit 9a91670
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ node_modules
/dist
/build
/cache
/coverage
/coverage
/scripts
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

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

jobs:
verify_files:
name: Verify Files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
cache: 'npm'
- name: Install Packages
run: npm ci
- name: Lint Files
run: npm run lint
- name: Tests
run: npm run test
- name: Typecheck
run: npm run typecheck
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches: [master]

name: release

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: yandex-cloud/ui-release-action@main
with:
github-token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
npm-token: ${{ secrets.ROBOT_DATAUI_NPM_TOKEN }}
node-version: 18
6 changes: 4 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The Diplodoc ecosystem consists of many packages that have similar problems and

## Table of contents

- [AttrsParser](#AttrsParser)

### AttrsParser

### Purpose
Expand All @@ -21,7 +23,7 @@ Support [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs)-like att
```typescript
/*
optional first query
if provided parser will parse it imminently
if provided parser will parse it immediately
each 'parse' call is pure
*/
const attrs = new AttrsParser('{.class #id data-name=diplodoc}');
Expand All @@ -30,6 +32,6 @@ Support [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs)-like att

const other = attrs.parse('{data-wide title="Support quotes too"}')

other /* { attr: ['data-wide'], title: ['Support quotes too'] }
other /* { attr: ['data-wide'], title: ['Support quotes too'] } */
```

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
"build": "npm run build:clean && npm run build:code",
"build:code": "tsc -p tsconfig.types.json && node scripts/bundle.js",
"build:clean": "rm -rf lib",
"build:dev": "npm run build:dev:clean && npm run build:dev:code",
"build:dev:code": "node scripts/development.js",
"build:dev:clean": "rm -rf dist",
"prepublishOnly": "npm run build",
"lint": "lint update && lint",
"lint:fix": "lint update && lint fix",
"pre-commit": "lint update && lint-staged",
"prepare": "husky"
"prepare": "husky",
"typecheck": "tsc --noEmit"
},
"license": "MIT",
"devDependencies": {
Expand Down
22 changes: 0 additions & 22 deletions scripts/development.js

This file was deleted.

4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {AttrsParser} from './attrs';

export {
AttrsParser
}
export {AttrsParser};

0 comments on commit 9a91670

Please sign in to comment.