Skip to content

Commit

Permalink
typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Caden Marinozzi committed Apr 4, 2024
1 parent 4cdd219 commit 757f369
Show file tree
Hide file tree
Showing 15 changed files with 748 additions and 572 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/node_modules
**/DS_Store
**/DS_Store
**/dist
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
**/build
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"arrowParens": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxSingleQuote": true,
"useTabs": true,
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
133 changes: 130 additions & 3 deletions package-lock.json

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

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "csformat",
"version": "1.0.3",
"description": "The only package you need to format CS2 item queries into the Steam Market format",
"main": "src/index.js",
"main": "dist/index.js",
"keywords": [
"CS2",
"market_hash_name",
Expand All @@ -11,7 +11,7 @@
"Steam Hash Name"
],
"files": [
"src"
"dist"
],
"author": "cadenmarinozzi",
"repository": {
Expand All @@ -20,10 +20,14 @@
},
"license": "MIT",
"scripts": {
"start": "node ./src/example.js",
"start": "node dist/example.js",
"build": "tsc",
"test": "jest"
},
"devDependencies": {
"jest": "^29.7.0"
"@types/jest": "^29.5.12",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^5.4.3"
}
}
7 changes: 0 additions & 7 deletions src/example.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import MarketHashNameBuilder from './index';

const builder = new MarketHashNameBuilder();
const result = builder.build('AWP | Asiimov (Field-Tested)');

console.log(result);
Loading

0 comments on commit 757f369

Please sign in to comment.