Skip to content

possible quanto basta solution #5

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
};
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run tests

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install dependencies
run: npm ci
- run: npm run build --if-present
- run: npm test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install dependencies
run: npm ci
- run: npm run build --if-present
- run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ npm-debug.log
node_modules
lib
testDist
yarn-error.log
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "path_to_submodule"]
path = 'https://github.com/suprmat95/recipe-parser.git'
url = [email protected]:suprmat95/recipe-parser.git'
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid'
};
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
"**/.DS_Store": true,
"node_modules": true,
"lib": true
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ This project was built on top of code written by [nsafai](https://github.com/nsa

What's different from the original?

- added support for the Italian language.
- added support for numbers written in words (for example `six cups milk`)
- added support for preposition before name of ingredient (for example `six cups of milk` or `sei tazze di latte`)
- No longer uses the "natural" library
- Works with Node.js, browser, React Native
- Added support for the Italian and German languages.
- Added support for numbers written in words (for example `six cups milk`)
- Added support for preposition before name of ingredient (for example `six cups of milk` or `sei tazze di latte`)

## To install

Expand Down Expand Up @@ -74,6 +76,7 @@ Will return
Languages currently supported:

- English `eng`
- German `deu`
- Italian `ita`

### Unicode Fractions
Expand All @@ -84,10 +87,6 @@ Will also correctly parse unicode fractions into the proper amount

Clone the repo and `yarn` to install packages. If `yarn test` comes back good after your code changes, give yourself a pat on the back.

## Natural Language Parsing

This project uses Natural, for more information, see https://dzone.com/articles/using-natural-nlp-module

### Publishing

Checkout https://docs.npmjs.com/getting-started/publishing-npm-packages for more info
12 changes: 0 additions & 12 deletions next.config.js

This file was deleted.

Loading