# Initial Commit
# Create new npm project
- Create new project
npm init
- Make project private
Add
"private": trueto package.json
# Create "Hello World" Application
- Add
App.vuetosrc/directory - Create minimal "Hello World" application
# Run the application in development mode
-
Install Vue
npm add vue
-
Install Vue CLI
npm add -D @vue/cli @vue/cli-service-global
-
Create
index.jsfile insrc/directory Instanciate a vue instance with<App>component. Mount the app instance on#appelement. -
Add script
devto run application in development modenpm run dev
# Configure testing environment
-
Install jest and vue test utils
npm add -D jest @vue/test-utils
-
Install jest transformers
npm add -D vue-jest babel-jest babel-preset-env
-
Configure jest Add
.vueto file extensions Add transformer for vue Add transformer for es6 Add module name alias for src directory -
Configure babel Add .babelrc with test env configuration
-
Write tests for
App.vueCheckAppcomponent rendersHello Worldtext.
# Create <Editor> Component
-
Create
Editor.vuefile insrc/componentsdirectory -
Create
Editor.spec.jsfile intest/componentsdirectory -
Write unit tests for
<Editor>component Ensure it has a name. Ensure it has correct props. Ensure it emits correct event on change. -
Write minimal code required to pass all tests.
-
Use
<Editor>component in<App>component Write unit test for<App>component. Ensure it renders<Editor>component. Write minimal code required to pass all tests. -
Add CSS to
Editor.vueStart vue dev server. (npm run dev) Preview the<Editor>component in browser. Write required style in style inspector. Move final styles toEditor.vuefile.
# Create <Markdown> Component
-
Create
Markdown.vuefile insrc/componentsdirectory -
Create
Markdown.spec.jsfile intest/componentsdirectory -
Write unit tests for
<Editor>component Ensure it has a name. Ensure it has correct props. Ensure it renders correct HTML for given markdown string. Ensure it sanitizes markdown string. -
Install marked
npm add marked
-
Write minimal code required to pass all tests.
-
Use
<Markdown>component in<App>component Write unit test for<App>component. Ensure it renders<Markdown>component. Write minimal code required to pass all tests. -
Add CSS to
Markdown.vueStart vue dev server. (npm run dev) Preview the<Markdown>component in browser. Write required style in style inspector. Move final styles toMarkdown.vuefile.
# Add support for emojis in <Markdown> component
-
Write unit tests for
<Markdown>component Ensure it renders image for imoji. Ensure it has correct alt text. Ensure it has correct src url. -
Write minimal code required to pass all tests.
# Create Icon components
-
Install vue-server-renderer jest-serializer-vue
npm add -D vue-server-renderer jest-serializer-vue
-
Create
Icondirectory insrc/componentsdirectory -
Create icon components with svg template
-
Write snapshot test for each Icon component
# Create <MarkdownEditor> Component
-
Create
MarkdownEditor.vuefile insrc/componentsdirectory -
Create
MarkdownEditor.spec.jsfile intest/componentsdirectory -
Write unit tests for
<MarkdownEditor>component Ensure it has a name. Ensure it has correct props. Ensure it emits correct events. Ensure it renders slots correctly. Ensure it displays correct stats. Ensure it renders both<Markdown>and<Editor>components. -
Write minimal code required to pass all tests.
-
Add CSS to
MarkdownEditor.vueStart vue dev server../node_modules/.bin/vue serve src/components/MarkdownEditor.vuePreview the<MarkdownEditor>component in browser. Write required style in style inspector. Move final styles toMarkdownEditor.vuefile.
# Add support for client side routing
-
Install vue-router
npm add vue-router
-
Create
router.jsfile insrc/directory Registervue-routerplugin Export a history router -
Use router in the application Add
routerto Vue constructor options -
Use
<router-view>component inApp.vueto render routes -
Remove
App.spec.js
# Create /notes/create page
-
Create
Create.vuefile insrc/pages/directory Use<MarkdownEditor>component to create new note. -
Register
/notes/createroute withCreate.vuefile -
Add CSS to
Create.vueStart vue dev server. (npm run dev) Goto/notes/createpage. Write required style in style inspector. Move final styles toEditor.vuefile.
# Create /notes page
-
Create
Home.vuefile insrc/pages/ -
Register
/notesroute withHome.vueAdd redirect rule for/route.
# Add support for centralized state management
-
Install vuex
npm add vuex
-
Create
store.jsfile insrc/directory Registervuexplugin Expose aStoreinstance -
Use store in the application Add
storeto Vue constructor options
# Create <Note> Component
-
Create
Note.vuefile insrc/componentsdirectory -
Create
Note.spec.jsfile intest/componentsdirectory -
Write unit tests for
<Note>component Ensure it has a name. Ensure it has correct props. -
Write minimal code required to pass all tests.
-
Use
<Note>component in/notespage -
Add CSS to
Editor.vueStart vue dev server. (npm run dev) Preview the<Note>component in browser. Write required style in style inspector. Move final styles toNote.vuefile.
# Add note create and update functions
-
Add
createandupdateactions -
Add
CREATEandUPDATEmutations -
Add computed getters Get note by ID Get notes sorted by last updated at
# Link /notes/create page with vuex store
- Create note Watch for changes and persist before navigating away.
# Create /notes/:id and /notes/:id/edit pages
-
Create
Edit.vuefile insrc/pages/directory ExtendCreate.vuecomponent to edit a note. -
Register
/notes/:id/pagesroute withEdit.vuefile Configure route to map params to props. -
Create
View.vuefile insrc/pages/directory -
Register
/notes/:idroute withEdit.vuefile Configure route to map params to props.
# Use local storage to persist notes
-
Subscribe to store mutations
-
Store state to localStorage after
CREATEorUPDATEmutation -
Load state from localStorage if available
# Deployment
-
Install surge
npm add -D surge
-
Create an icon for the application Use android icon generator tool: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
-
Generate favicon and application meta Use favicon generator tool: https://realfavicongenerator.net
-
Create
public/directory Copy the favicon and meta files Createindex.htmlfile -
Add application name in
public/manifest.jsonandpublic/index.html -
Add following npm scripts to package.json
"build": "vue build src/index.js", "prebuild": "npm run test", "postbuild": "cp dist/index.html dist/200.html", "deploy": "surge -p ./dist", "predeploy": "npm run build"
-
Add
CNAMEfile topublicdirectory -
Execute
npm run deploy
# Create /login page
-
Add
Login.vuefile insrc/pages/directory -
Register
/loginroute withLogin.vue -
Add
<Trash>icon component CreateTrash.vuefile insrc/components/Icon/directory -
Install firebase & vuexfire
npm add firebase vuexfire
-
Configure firebase
# Add firebase auth and database support
-
Add router navigation guard to redirect unauthenticated user to
/loginpage -
Use vuexfire to integrate firebase database with vuex
-
Initialize firebase and vuex state when
<App>is created