Skip to content

Commit

Permalink
add tests, move to lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
SirajChokshi committed Apr 11, 2023
1 parent bd42511 commit 5b12733
Show file tree
Hide file tree
Showing 16 changed files with 14,262 additions and 3,598 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]],
"plugins": ["babel-plugin-transform-vite-meta-env"]
}
28 changes: 21 additions & 7 deletions docs/URL.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# URL Processing

## Github

### URL Patterns

| View | URL |
| ------- | --------------------------------------------------------------------- |
| Project | `https://github.com/<USER>/<REPO_NAME>` |
| Folder | `https://github.com/<USER>/<REPO_NAME>/tree/<BRANCH_NAME>/<FOLDER>` |
| File | `https://github.com/<USER>/<REPO_NAME>/blob/<BRANCH_NAME>/<FILE>.ext` |

### Raw File Pattern

- `https://raw.githubusercontent.com/<USER>/<REPO_NAME>/<BRANCH_NAME>/<FOLDER>/<FILE>.ext`

## Gitlab

### UI URL Patterns
### URL Patterns

| View | URL |
| ----------- | ------------------------------------------------------------------------------------------ |
| Project | `https://gitlab.com/<USER>/projects/<REPO_NAME>` |
| Folder View | `https://gitlab.com/<USER>/projects/<REPO_NAME>/-/tree/<BRANCH_NAME>/<FOLDER>` |
| File View | `https://gitlab.com/<USER>/projects/<REPO_NAME>/-/blob/<BRANCH_NAME>/<FOLDER>/<FILE>.html` |
| View | URL |
| ----------- | -------------------------------------------------------------------------------------------- |
| Project | `https://gitlab.com/<USER>/<?SUBGROUP>/<REPO_NAME>` |
| Folder View | `https://gitlab.com/<USER>/<?SUBGROUP>/<REPO_NAME>/-/tree/<BRANCH_NAME>/<FOLDER>` |
| File View | `https://gitlab.com/<USER>/<?SUBGROUP>/<REPO_NAME>/-/blob/<BRANCH_NAME>/<FOLDER>/<FILE>.ext` |

### Raw File Pattern

- `https://gitlab.com/<USER>/projects/<REPO_NAME>/-/raw/<BRANCH_NAME>/<FOLDER>/<FILE>.md`
- `https://gitlab.com/<USER>/<?SUBGROUP>/<REPO_NAME>/-/raw/<BRANCH_NAME>/<FOLDER>/<FILE>.ext`
20 changes: 20 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
transform: {
'^.+\\.js$': 'babel-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.svelte$': [
'svelte-jester',
{
preprocess: true,
},
],
'^.+\\.ts$': 'ts-jest',
},

moduleFileExtensions: ['svelte', 'js', 'ts'],
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
}

0 comments on commit 5b12733

Please sign in to comment.