This is the Space Climate Observatory webapp.
Clone the SCO repository and open the webapp folder using your terminal:
git clone https://github.com/MizarWeb/sco
cd sco
Ensure you are using Node v8 (or above) and NPM v5 and you are not log as root.
Install dependencies with the following:
npm install
Congratulation, you're now ready to launch the application.
Run the application with the following :
npm start
Then opens your browser at http://localhost:3333/ to browse the application.
npm run build
It runs tests in then terminal, then creates a report in reports/mocha/ folder:
npm test
To run tests with coverage, then creates coverage reports (lcov, xunit) inside reports/coverage/ folder:
npm run test:coverage
You shall lint the entire app using our Regards OSS lint rules before commiting:
npm run lint:fix
This webapp uses a fixed version of Mizar as long as it isn't available on npm.
To use a newest version, open the package.json file and change the commit id in the dependencies.Mizar url.
Then run npm i.
Everytime there is a new file or a file deleted in the Mizar library, you need to adapt the @sco/adapter module.
Run the app with npm start then edit the file ./web_modules/adapter/src/adapters/MizarLoader.js.
On one hand, you will see in the node console if webpack tries to import a file that doesn't exist.
In another hand, you will see in the browser console if require.js requires a missing file.
You can clone Mizar inside the repository and use that version while developping. You just need to do the following:
cd web_modules && git clone https://github.com/MizarWeb/Mizar- edit the
package.jsonfile and change thedependencies.Mizarvalue withfile:web_modules/Mizar - remove the previously installed version of Mizar:
rm -rf node_modules/Mizar/ - clean your installation with
npm i && npm prune
- node v8.10
- npm v5.7.1 (
npm i -g npmto upgrade)
When you install this application, all these NPM warnings can be safely ignored :
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENTnpm WARN optional SKIPPING OPTIONAL DEPENDENCYnpm WARN enoent ENOENT: no such file or directorynpm WARN <some dependency>@<version> requires a peer of <another dependency>@<version> but none is installed. You must install peer dependencies yourself.npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform