Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raathigesh committed Aug 9, 2021
0 parents commit 4850aaa
Show file tree
Hide file tree
Showing 38 changed files with 10,990 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"projectName": "Jest tools",
"projectOwner": "Raathigesh",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "none",
"contributors": [
{
"login": "Raathigesh",
"name": "Raathi Kugarajan",
"avatar_url": "https://avatars.githubusercontent.com/u/3108160?v=4",
"profile": "https://github.com/Raathigesh",
"contributions": [
"code",
"doc",
"ideas",
"infra",
"maintenance"
]
}
],
"contributorsPerLine": 7
}
22 changes: 22 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
"@babel/preset-react",
[
"@babel/preset-typescript",
{
"isTSX": true,
"allExtensions": true
}
],
"@babel/preset-env"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
"@babel/plugin-proposal-object-rest-spread",
"babel-plugin-styled-components",
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-optional-chaining",
"@babel/plugin-proposal-optional-chaining"
]
}
25 changes: 25 additions & 0 deletions .github/workflows/production-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Test

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [10.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install and build
run: |
yarn install --ignore-engines
yarn build
env:
CI: true
25 changes: 25 additions & 0 deletions .github/workflows/publish-to-market.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
tags:
- '*'
name: Publish to market
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: yarn install, build, and test
run: |
yarn install --ignore-engines
yarn build
- uses: lannonbr/vsce-action@master
with:
args: 'publish -p $VSCE_TOKEN --yarn'
env:
CI: true
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
out
.vscode-test
cypress/videos
cypress/screenshots
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"env": {
"dev": "true"
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/src/test/dummy-project-used-by-tests",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"]
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${fileBasename}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "on",
"typescript.tsdk": "node_modules\\typescript\\lib"
}
13 changes: 13 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
**/tsconfig.json
**/*.map
**/*.ts
**/webpack.config.js
website
docs
.babelrc
cypress
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
network-timeout 600000
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Raathi Kugarajan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<img src="https://raw.githubusercontent.com/Raathigesh/Jest-tools/main/icons/Github%20banner.png">

Jest tools let you inspect html from your Jest tests with ease when logging to console is not enough.

### Getting started

- Install the [VSCode extension.](https://marketplace.visualstudio.com/items?itemName=Raathigeshan.jest-tools)
- From VSCode's command palette, run the `Jest tools: Start jest tools` command.
- This will show you the Jest tools UI. **The initial screen will ask you to start Jest with additional command line arguments (A custom jest reporter to capture console logs).**
- Then simply `console.log()` a html string and it will appear in the inspector.

#### An example usage

Logging the entire body content after rendering a component.

```javascript
import { render } from '@testing-library/react';

test('should work', () => {
render(<App />);
console.log(document.body.innerHtml); // this html will appear in jest tools
});
```

### Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/Raathigesh"><img src="https://avatars.githubusercontent.com/u/3108160?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Raathi Kugarajan</b></sub></a><br /><a href="https://github.com/Raathigesh/Jest tools/commits?author=Raathigesh" title="Code">💻</a> <a href="https://github.com/Raathigesh/Jest tools/commits?author=Raathigesh" title="Documentation">📖</a> <a href="#ideas-Raathigesh" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-Raathigesh" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Raathigesh" title="Maintenance">🚧</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Empty file added contributing.md
Empty file.
Binary file added docs/assets/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Github banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/tiny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 145 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"name": "paper",
"displayName": "Paper",
"description": "Take code notes",
"publisher": "raathigeshan",
"version": "0.1.0",
"engines": {
"vscode": "^1.50.0"
},
"categories": [
"Other"
],
"repository": {
"type": "git",
"url": "https://github.com/Raathigesh/paper"
},
"icon": "icons/icon.png",
"galleryBanner": {
"color": "#111111",
"theme": "dark"
},
"activationEvents": [
"*"
],
"main": "./out/extension/extension",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "paper-view",
"title": "Paper",
"icon": "icons/icon.png"
}
]
},
"views": {
"paper-view": [
{
"type": "webview",
"id": "paper",
"name": "Paper"
}
]
}
},
"scripts": {
"vscode:prepublish": "yarn run build",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./src/extension --project ./tsconfig.json",
"postinstall": "node ./node_modules/vscode/bin/install",
"ui": "webpack-dev-server --env.development --config ./webpack.config.js",
"build-ui": "webpack --env.production --config ./webpack.config.js",
"build": "rimraf out && yarn compile && yarn build-ui",
"package-ext": "vsce package --yarn",
"publish-ext": "vsce publish --yarn",
"pretty": "prettier --write \"src/**/*.{ts,tsx}\"",
"test": "jest",
"ship": "yarn version && git push origin --tag"
},
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.3",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-syntax-optional-chaining": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.5.0",
"@babel/preset-env": "^7.4.3",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.7.2",
"@chakra-ui/react": "^1.6.5",
"@devtools-ds/dom-inspector": "^1.1.2",
"@devtools-ds/themes": "^1.1.2",
"@emotion/core": "^10.0.22",
"@emotion/react": "11",
"@emotion/styled": "11",
"@types/babel-traverse": "^6.25.5",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/jest": "^24.0.21",
"@types/mocha": "^2.2.42",
"@types/node": "^10.12.21",
"@types/react": "^16.8.14",
"@types/react-dom": "^16.8.4",
"@types/react-resizable": "^1.7.2",
"@types/react-resize-detector": "^4.2.0",
"@types/react-router-dom": "^4.3.3",
"all-contributors-cli": "^6.17.0",
"babel-loader": "^8.0.5",
"babel-plugin-styled-components": "^1.10.0",
"concurrently": "^5.2.0",
"copy-to-clipboard": "^3.3.1",
"cross-env": "^5.2.0",
"css-loader": "^2.1.1",
"emotion-theming": "^10.0.19",
"file-loader": "^3.0.1",
"framer-motion": "4",
"html-webpack-plugin": "^3.2.0",
"html-webpack-template": "^6.2.0",
"husky": "^3.0.9",
"jest": "^24.9.0",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-feather": "^1.1.6",
"rimraf": "^2.6.3",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^2.3.5",
"typescript": "^4.1.3",
"url-loader": "^3.0.0",
"vscode": "^1.1.28",
"vscode-test": "^1.4.0",
"wait-on": "^5.1.0",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1",
"webpack-dev-server": "^3.3.1"
},
"dependencies": {
"@tiptap/extension-link": "^2.0.0-beta.19",
"@tiptap/react": "^2.0.0-beta.55",
"@tiptap/starter-kit": "^2.0.0-beta.89",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"get-port": "^5.1.1",
"temp-dir": "^2.0.0"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"jest": {
"testPathIgnorePatterns": [
"/node_modules/",
"/out/"
],
"moduleNameMapper": {
"^common(.*)$": "<rootDir>/src/common$1",
"^entities(.*)$": "<rootDir>/src/entities$1",
"^indexer(.*)$": "<rootDir>/src/indexer$1"
}
}
}
Loading

0 comments on commit 4850aaa

Please sign in to comment.