English/日本語
A knitting and crochet pattern editor.
The GitHub Page of this repository delivers a prototype application. The prototype application is a Progressive Web App (PWA).
Please refer to scenarios.md.
The prototype application can be locally tested.
The /docs/pwa
folder contains a JavsScript that starts a server that delivers the prototype application on localhost:8000
.
Please take the following steps to start the server.
-
Move down to
docs/pwa
.cd docs/pwa
-
Install necessary modules (first time only).
npm install
-
Start the service.
npm start
-
A server will start waiting for requests at http://localhost:8000/. It will show a screen similar to the following,
The docs/pwa/www
directory contains the latest prototype application files.
Those files can be built from the source files in the src
directory with Webpack.
If you want to build a new application from the source files and deploy it, please take the following steps,
-
Suppose you are in the root directory of your copy of this repository.
-
Install necessary modules (first time only).
npm install
-
Build an application.
npm run build
-
You will find application files in a
dist
directory. -
Replace the contents of the
docs/pwa/www
direcotry with those of thedist
directory.rm -rf docs/pwa/www cp -r dist docs/pwa/www
Now you can run your application as described in the section Locally testing the prototype application.
Before deploying your application, you should want to debug it.
Copying artifacts to the docs/pwa/www
directory every time you build an application is cumbersome, so you can use a Wabpack Dev Server during you debug your application.
To start a Webpack Dev Server, please take the following steps,
-
Suppose you are in the root directory of your copy of this repository.
-
Install necessary modules (first time only).
npm install
-
Start a Webpack Dev Server.
npm run dev
-
Your default browser will open http://localhost:8080.
As a Webpack Dev Server monitors changes on source files and will automatically reload a rebuilt application, you do not need to manually reload the application when you edit a source file.
Unit testing of Amidz is backed by the following packages,
- Mochapack as a test runner
- Chai as an assertion library
- Sinon for spying
- Vue Test Utils for testing Vue components
To run unit tests, please take the following steps,
-
Suppose you are in the root directory of your copy of this repository.
-
Install necessary modules (first time only).
npm install
-
Run unit tests.
npm test
-
You will see test results printed on the console.
You can run tests in the watch mode by specifying -- --watch
at the step 3.
npm test -- --watch
End-to-End (E2E) testing is conducted by Cypress. To run E2E tests, please take the following steps,
-
Suppose you are in the root directory of your copy of this repository.
-
Install necessary modules (first time only).
npm install
-
Start a Webpack Dev Server in the background.
npm run dev &
-
Run Cypress.
npm run cypress:run
-
You will see test results printed on the console.
You can run Cypress in the interactive mode by running cypress:open
instead of cypress:run
at the step 3.
npm run cypress:open
The source code of Amidz is documented with JSDoc + the jsdoc-vuejs plugin. If you want to generate documentation of the code, please take the following steps,
-
Suppose you are in the root directory of your copy of this repository.
-
Install necessary modules (first time only).
npm install
-
Run JSDoc.
npm run build:doc
-
You will find documentation in an
api-doc
directory.