From 57ae4866d7a67a2ccd0a084e4a3bd5bae87506fc Mon Sep 17 00:00:00 2001 From: d-d-wolfe Date: Mon, 8 Jun 2020 22:29:45 -0700 Subject: [PATCH 1/2] initial commit with basic framework --- .eslintrc.json | 25 ++++++ .gitignore | 144 ++++++++++++++++++++++++++++++++++ README.md | 38 ++++++++- __tests__/input.test.js | 0 __tests__/notes.test.js | 0 index.js | 9 +++ lib/input.js | 3 + lib/model/notes-collection.js | 0 lib/model/notes-schema.js | 0 lib/notes.js | 0 notes.js | 0 package-lock.json | 13 +++ package.json | 25 ++++++ 13 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 __tests__/input.test.js create mode 100644 __tests__/notes.test.js create mode 100644 index.js create mode 100644 lib/input.js create mode 100644 lib/model/notes-collection.js create mode 100644 lib/model/notes-schema.js create mode 100644 lib/notes.js create mode 100644 notes.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..7018e1b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "env": { + "browser": true, + "node": true, + "commonjs": true, + "jest": true, + "es6": true + }, + "globals": { + "fail":true + }, + "extends": "eslint:recommended", + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2018 + }, + "rules": { + "no-console": "off", + "indent": [ "error", 2 ], + "quotes": ["error", "single", { "allowTemplateLiterals": true }], + "comma-dangle": ["error", "always-multiline"], + "semi": [ "error", "always" ], + "no-unused-vars": [1, {"vars": "local", "args": "none"}] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25975f --- /dev/null +++ b/.gitignore @@ -0,0 +1,144 @@ +# 401 JS +db +.env +temp +build + +# Created by https://www.gitignore.io/api/vim,osx,node,linux,windows +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file + + +### OSX ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Vim ### +# swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/vim,osx,node,linux,windows diff --git a/README.md b/README.md index bfeccc1..086b8af 100644 --- a/README.md +++ b/README.md @@ -1 +1,37 @@ -# notes \ No newline at end of file +# LAB - Class 01 + +## Project: Notesy + +### Author: Dave Wolfe + +### Links and Resources + +- [submission PR](http://xyz.com) +- [ci/cd](http://xyz.com) (GitHub Actions) +- [back-end server url](http://xyz.com) (when applicable) +- [front-end application](http://xyz.com) (when applicable) + +### Setup + +#### `.env` requirements (where applicable) + +i.e. + +- `PORT` - Port Number +- `MONGODB_URI` - URL to the running mongo instance/db + +#### How to initialize/run your application (where applicable) + +- e.g. `npm start` + +#### How to use your library (where applicable) + +#### Tests + +- How do you run tests? +- Any tests of note? +- Describe any tests that you did not complete, skipped, etc + +#### UML + +Link to an image of the UML for your application and response to events diff --git a/__tests__/input.test.js b/__tests__/input.test.js new file mode 100644 index 0000000..e69de29 diff --git a/__tests__/notes.test.js b/__tests__/notes.test.js new file mode 100644 index 0000000..e69de29 diff --git a/index.js b/index.js new file mode 100644 index 0000000..daa3993 --- /dev/null +++ b/index.js @@ -0,0 +1,9 @@ +'use strict'; + +console.log('App EXISTS'); + +const Input = require('./lib/input.js'); +const Notes = require('./lib/notes.js'); + +let parsed = new Input(process.argv.slice(2)); +let notes = new Notes(parsed); \ No newline at end of file diff --git a/lib/input.js b/lib/input.js new file mode 100644 index 0000000..66ba4ae --- /dev/null +++ b/lib/input.js @@ -0,0 +1,3 @@ +'use strict'; + +const minimist = require('minimist'); \ No newline at end of file diff --git a/lib/model/notes-collection.js b/lib/model/notes-collection.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/model/notes-schema.js b/lib/model/notes-schema.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/notes.js b/lib/notes.js new file mode 100644 index 0000000..e69de29 diff --git a/notes.js b/notes.js new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..91bf262 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "y", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7bbd241 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "y", + "version": "1.0.0", + "description": "## Notesy", + "main": "index.js", + "directories": { + "lib": "lib" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wolfes-401-advanced-javascript/notes.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/wolfes-401-advanced-javascript/notes/issues" + }, + "homepage": "https://github.com/wolfes-401-advanced-javascript/notes#readme", + "dependencies": { + "minimist": "^1.2.5" + } +} From fe465c1cb69e466133e3930e55fc091f7f944653 Mon Sep 17 00:00:00 2001 From: d-d-wolfe Date: Mon, 8 Jun 2020 22:31:50 -0700 Subject: [PATCH 2/2] initial commit with basic framework --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 086b8af..b6d4d07 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ### Links and Resources -- [submission PR](http://xyz.com) +- [submission PR](https://github.com/wolfes-401-advanced-javascript/notes/pull/1) - [ci/cd](http://xyz.com) (GitHub Actions) - [back-end server url](http://xyz.com) (when applicable) - [front-end application](http://xyz.com) (when applicable)