Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernized project build #14

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jspm_packages
.npm
.node_repl_history
.idea
lib
dist
package-lock.json
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

6 changes: 4 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"recommendations": ["esbenp.prettier-vscode"]
}
"recommendations": [
"biomejs.biome"
]
}
10 changes: 6 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.useTabs": true
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"editor.defaultFormatter": "biomejs.biome",
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
23 changes: 23 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noParameterAssign": "off"
}
}
},
"files": {
"ignore": ["dist/*"]
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}
65 changes: 24 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"name": "ml-classify-text",
"version": "2.0.1",
"version": "3.0.0",
"description": "Text classification using n-grams and cosine similarity",
"module": "./lib",
"main": "./lib",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"clean": "rimraf lib",
"test": "jest --coverage",
"test:watch": "jest --watchAll",
"test:prod": "cross-env BABEL_ENV=production npm run test",
"lint": "eslint src test",
"build": "webpack --mode=production --config=webpack.config.js",
"prepublish": "npm run clean && npm run lint && npm run test && npm run build"
"dev": "vitest",
"test": "vitest run",
"lint": "biome lint src test",
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
"prepublish": "npm run lint && npm run test && npm run build",
"format": "biome check --apply ."
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/andreekeberg/ml-classify-text-js.git"
Expand Down Expand Up @@ -50,34 +55,12 @@
},
"homepage": "https://github.com/andreekeberg/ml-classify-text-js",
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-transform-modules-amd": "^7.20.11",
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"@babel/runtime-corejs3": "^7.20.13",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^9.1.2",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-minify": "^0.5.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.27.2",
"cross-env": "^7.0.3",
"eslint": "^8.33.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-node": "^11.1.0",
"jest": "^29.4.1",
"jsdoc": "^4.0.0",
"jsdoc-to-markdown": "^8.0.0",
"rimraf": "^4.1.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
"@biomejs/biome": "1.6.3",
"jsdoc": "^4.0.2",
"jsdoc-to-markdown": "^8.0.1",
"tsup": "^8.0.2",
"typescript": "^5.4.3",
"vitest": "^1.4.0"
},
"dependencies": {
"xregexp": "^5.1.1"
Expand Down
Loading