Giter VIP home page Giter VIP logo

haruneko's Introduction

HakuNeko


Prototype of HakuNeko based on NW.js + TypeScript + Vite

1. Status

total?color=blue&label=HaruNeko%20%28Nightly%29&logo=azure devops badge localized

2. Development

Make sure git and NodeJS + NPM are installed on your system.

2.1. Installation

First start by cloning the repository from https://github.com/manga-download/haruneko.git

git clone "https://github.com/manga-download/haruneko.git"

Then change into the project directory and install the dependencies
⚠️ NW.js is not yet available for Apple Silicon (M1/arm64)

# If you are developing on an Apple Silicon (M1/arm64) device, run:
export npm_config_nwjs_process_arch="x64" && npm install

# Otherwise, run:
npm install

2.2. Run

HakuNeko consists of two parts, a web-application that needs to be hosted and an NW.js client running the web-application.

As a developer you probably want to launch the application and also want changes made to the source code reflecting in the running application. This can be achieved by hosting the source code directly on http://localhost:3000

npm run serve:dev --workspace web

Then launch the NW.js application to load the hosted web-application

npm run launch:dev --workspace app/nw

The same procedure can be applied to run a production build of both parts, but these can not be modified while running. Host the production web-application on http://localhost:5000

npm run serve:prod --workspace web

And then start the production NW.js application

npm run launch:prod --workspace app/nw

2.3. Continuous Inspection

After making changes to the source code, it is recommend to validate the code style, check for code smells and perform a static code analysis.

npm run check

2.4. Testing

To ensure the application behaves as expected, tests need to be added. The popular jest framework is used as test runner and for mocking. All tests are written side by side to their (logical) corresponding implementation directly in the source code directory. Overall, there are two test categories.

2.4.1. Unit and Component Tests

Unit tests (file extension ⋆.test.ts) are very lightweight within a limited scope (e.g. single method of a class). Component tests (file extension ⋆.spec.ts) can be more complex and test relations and coherences within a module (e.g. a composed UI control). To start these tests, simply run

npm run test

2.4.2. End-To-End Tests

End-To-End tests (file extension ⋆.e2e.ts) are performed by interacting with the (web-)application itself. This includes tests which are consuming the engine API as well as tests that run against the UI. The environment for these tests is a running instance of the NW.js production build, controlled by the tests through puppeteer. To start these tests, simply run

npm run test:e2e

2.4.3. Website Tests

Website tests (file extension ⋆.e2e.ts in /src/engine/websites) will run some basic checks for each website. The environment for these tests is a running instance of the NW.js production build, controlled by the tests through puppeteer.

⚠️
Running all tests will take very very long and may use up a lot of your internet bandwidth.

To start these test(s), simply run

# Test all websites
npm run test:websites
# Test a certain website
npm run test:websites -- MangaDex

haruneko's People

Contributors

ronny1982 avatar mikezedev avatar sheepux avatar manga-download-owner avatar pierre-monier avatar yoshiyes avatar sisco0 avatar

Stargazers

Edwin Marroquin <devem> avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.