diff --git a/minimal-app/.gitignore b/inventory-app/.gitignore similarity index 100% rename from minimal-app/.gitignore rename to inventory-app/.gitignore diff --git a/minimal-app/package-lock.json b/inventory-app/package-lock.json similarity index 99% rename from minimal-app/package-lock.json rename to inventory-app/package-lock.json index 9d4e5d41f2c165d88b55e61e3df526fede061b74..c3f3538001f64da612544491f1a5527e3a1ce153 100644 --- a/minimal-app/package-lock.json +++ b/inventory-app/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@unlsoft/minimal-app", + "name": "@unlsoft/inventory-app", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@unlsoft/minimal-app", + "name": "@unlsoft/inventory-app", "version": "1.0.0", "license": "UNLICENSED", "dependencies": { diff --git a/minimal-app/package.json b/inventory-app/package.json similarity index 94% rename from minimal-app/package.json rename to inventory-app/package.json index e726731eb68a128fd9f540f700730591c8954892..8c57fbefb7ee8ea3f1369af754170fbe710635d6 100644 --- a/minimal-app/package.json +++ b/inventory-app/package.json @@ -1,7 +1,7 @@ { - "name": "@unlsoft/minimal-app", + "name": "@unlsoft/inventory-app", "version": "1.0.0", - "description": "A minimal app to be used as starter code for labs and homework.", + "description": "A store/ordering based app that adds items into the users inventory.", "private": true, "license": "UNLICENSED", "scripts": { diff --git a/minimal-app/public/index.html b/inventory-app/public/index.html similarity index 86% rename from minimal-app/public/index.html rename to inventory-app/public/index.html index 334b00e880936e215c05ff5438593f31e66267a3..cffec0753a9b90bdeb7d61e0e5e2b2a7b61f92df 100644 --- a/minimal-app/public/index.html +++ b/inventory-app/public/index.html @@ -6,7 +6,7 @@ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <meta name="description" - content="A minimal app to be used as starter code for labs and homework." + content="A store/ordering based app that adds items into the users inventory." /> <meta name="theme-color" content="#d00000" /> <link rel="icon" href="%PUBLIC_URL%/logo.png" /> @@ -15,7 +15,7 @@ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" /> <link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.png" /> <link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.svg" /> - <title>Minimal React Redux App</title> + <title>Inventory Ordering App</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> diff --git a/minimal-app/public/logo.png b/inventory-app/public/logo.png similarity index 100% rename from minimal-app/public/logo.png rename to inventory-app/public/logo.png diff --git a/minimal-app/public/logo.svg b/inventory-app/public/logo.svg similarity index 100% rename from minimal-app/public/logo.svg rename to inventory-app/public/logo.svg diff --git a/minimal-app/public/manifest.json b/inventory-app/public/manifest.json similarity index 72% rename from minimal-app/public/manifest.json rename to inventory-app/public/manifest.json index 31d7bfd948705adf2fb8e85572e3519b98eae7b5..2bed1a15eba13183cea4e06b33aa8556b33d5f98 100644 --- a/minimal-app/public/manifest.json +++ b/inventory-app/public/manifest.json @@ -1,7 +1,7 @@ { - "short_name": "Minimal App", - "name": "Minimal React Redux App", - "description": "A minimal app to be used as starter code for labs and homework.", + "short_name": "Inventory App", + "name": "Inventory Ordering App", + "description": "A store/ordering based app that adds items into the users inventory.", "icons": [ { "src": "logo.svg", diff --git a/inventory-app/src/__snapshots__/app.test.js.snap b/inventory-app/src/__snapshots__/app.test.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..6c4af2a43dfc3c664bd87d48435c0d194dd57066 --- /dev/null +++ b/inventory-app/src/__snapshots__/app.test.js.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`the app has one labeled button that displays the value from the store 1`] = `<div />`; diff --git a/minimal-app/src/app.js b/inventory-app/src/app.js similarity index 68% rename from minimal-app/src/app.js rename to inventory-app/src/app.js index e875b5f1efaa2f9d67b50f129e9b056491157407..c963f0978a2e1d90e012743d53e336a1f1522f6f 100644 --- a/minimal-app/src/app.js +++ b/inventory-app/src/app.js @@ -1,11 +1,8 @@ import { Routes, Route } from 'react-router-dom'; -import { Counter } from './features/counter/counter.js'; - export function App() { const page = <> - <Counter label={'Taps'} /> </>; return ( <Routes> diff --git a/minimal-app/src/app.test.js b/inventory-app/src/app.test.js similarity index 66% rename from minimal-app/src/app.test.js rename to inventory-app/src/app.test.js index cea18d811df2753271a4762fa0c1dfe567ae5755..8874d91067fa6c32919095315664a3b6ebc4807f 100644 --- a/minimal-app/src/app.test.js +++ b/inventory-app/src/app.test.js @@ -4,16 +4,8 @@ import { MemoryRouter as Router } from 'react-router-dom'; import { App } from './app.js'; -import { - selectValue, -} from './features/counter/counterSlice.js'; -jest.mock('./features/counter/counterSlice.js', () => ({ - selectValue: jest.fn().mockName('selectValue'), -})); - describe('the app', () => { test('has one labeled button that displays the value from the store', () => { - selectValue.mockReturnValue(9999); const { container } = render( <Router initialEntries={['/']}> <App /> diff --git a/minimal-app/src/app/store.js b/inventory-app/src/app/store.js similarity index 50% rename from minimal-app/src/app/store.js rename to inventory-app/src/app/store.js index ff522e191c94a67fbc4f4aa5164fcd9fb6511ca9..6ebfbc7a32b6390d6672351d0789cf0ef6389ab7 100644 --- a/minimal-app/src/app/store.js +++ b/inventory-app/src/app/store.js @@ -1,9 +1,6 @@ import { configureStore } from '@reduxjs/toolkit'; -import counterSlice from '../features/counter/counterSlice.js'; - export const store = configureStore({ reducer: { - [counterSlice.name]: counterSlice.reducer, }, }); diff --git a/minimal-app/src/features/counter/counter.js b/inventory-app/src/features/counter/counter.js similarity index 100% rename from minimal-app/src/features/counter/counter.js rename to inventory-app/src/features/counter/counter.js diff --git a/minimal-app/src/features/counter/counter.module.css b/inventory-app/src/features/counter/counter.module.css similarity index 100% rename from minimal-app/src/features/counter/counter.module.css rename to inventory-app/src/features/counter/counter.module.css diff --git a/minimal-app/src/features/counter/counter.test.js b/inventory-app/src/features/counter/counter.test.js similarity index 100% rename from minimal-app/src/features/counter/counter.test.js rename to inventory-app/src/features/counter/counter.test.js diff --git a/minimal-app/src/features/counter/counterSlice.js b/inventory-app/src/features/counter/counterSlice.js similarity index 100% rename from minimal-app/src/features/counter/counterSlice.js rename to inventory-app/src/features/counter/counterSlice.js diff --git a/minimal-app/src/features/counter/counterSlice.test.js b/inventory-app/src/features/counter/counterSlice.test.js similarity index 100% rename from minimal-app/src/features/counter/counterSlice.test.js rename to inventory-app/src/features/counter/counterSlice.test.js diff --git a/minimal-app/src/index.css b/inventory-app/src/index.css similarity index 100% rename from minimal-app/src/index.css rename to inventory-app/src/index.css diff --git a/minimal-app/src/index.js b/inventory-app/src/index.js similarity index 100% rename from minimal-app/src/index.js rename to inventory-app/src/index.js diff --git a/minimal-app/src/setupTests.js b/inventory-app/src/setupTests.js similarity index 100% rename from minimal-app/src/setupTests.js rename to inventory-app/src/setupTests.js diff --git a/minimal-app/src/testing/mockRedux.js b/inventory-app/src/testing/mockRedux.js similarity index 100% rename from minimal-app/src/testing/mockRedux.js rename to inventory-app/src/testing/mockRedux.js diff --git a/minimal-app/src/__snapshots__/app.test.js.snap b/minimal-app/src/__snapshots__/app.test.js.snap deleted file mode 100644 index ce50593a1264fefe9e1e6f5b2728f70ba16a88e5..0000000000000000000000000000000000000000 --- a/minimal-app/src/__snapshots__/app.test.js.snap +++ /dev/null @@ -1,15 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`the app has one labeled button that displays the value from the store 1`] = ` -<div> - <label> - Taps - : - <button - class="blue" - > - 9999 - </button> - </label> -</div> -`; diff --git a/package-lock.json b/package-lock.json index 579628df85c95d64131eb72d67e97946da7517a5..d3d8f30d51dfd60b45a27aad6d46d1eb1520dca3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,9 @@ "version": "1.0.0", "hasInstallScript": true, "license": "UNLICENSED", + "dependencies": { + "caniuse-lite": "^1.0.30001524" + }, "devDependencies": { "ghooks": "^2.0.4", "npm-run-all": "^4.1.5" @@ -55,6 +58,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001524", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", + "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -883,9 +905,9 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -1138,6 +1160,11 @@ "get-intrinsic": "^1.0.2" } }, + "caniuse-lite": { + "version": "1.0.30001524", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", + "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==" + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -1752,9 +1779,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "shebang-command": { diff --git a/package.json b/package.json index b1cdc8932e49669c96851da14e0985f8c7da265f..bdc267c7acaf58430403569ee41d75c898eeecb0 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { "name": "@unlsoft/starter-code", "version": "1.0.0", - "description": "A project skeleton to be used as starter code for labs and homework.", + "description": "A store/ordering based app that adds items into the users inventory.", "private": true, "license": "UNLICENSED", "scripts": { "postinstall:stylelint-config": "cd stylelint-config && npm install", "postinstall:eslint-config": "cd eslint-config && npm install", - "postinstall:app": "cd minimal-app && npm install", + "postinstall:app": "cd inventory-app && npm install", "postinstall": "run-s postinstall:**", - "lint:app": "cd minimal-app && npm run lint", + "lint:app": "cd inventory-app && npm run lint", "lint": "run-s --continue-on-error lint:**", - "test-once:app": "cd minimal-app && npm run test-once", + "test-once:app": "cd inventory-app && npm run test-once", "test-once": "run-s --continue-on-error test-once:**", "test": "run-s test-once", - "start": "cd minimal-app && npm run start", - "build:app": "cd minimal-app && npm run build", + "start": "cd inventory-app && npm run start", + "build:app": "cd inventory-app && npm run build", "build": "run-s build:**" }, "devDependencies": { @@ -26,5 +26,8 @@ "ghooks": { "pre-commit": "npm run lint" } + }, + "dependencies": { + "caniuse-lite": "^1.0.30001524" } }