Merge branch 'improve-readme' into 'dev'
Revised README See merge request ligolang/ligo!469
This commit is contained in:
commit
8d53bc762c
@ -11,6 +11,7 @@ stages:
|
||||
- build_and_package_binaries
|
||||
- build_docker
|
||||
- build_and_deploy
|
||||
- ide-unit-test
|
||||
- ide-build
|
||||
- ide-e2e-test
|
||||
- ide-deploy
|
||||
@ -23,9 +24,8 @@ dont-merge-to-master:
|
||||
only:
|
||||
- master
|
||||
|
||||
.build_binary:
|
||||
&build_binary # To run in sequence and save CPU usage, use stage: build_and_package_binaries
|
||||
stage: test
|
||||
.build_binary: &build_binary
|
||||
stage: test # To run in sequence and save CPU usage, use stage: build_and_package_binaries
|
||||
script:
|
||||
- $build_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
||||
- $package_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
||||
@ -213,12 +213,17 @@ pages-attempt:
|
||||
# WEBIDE jobs
|
||||
|
||||
run-webide-unit-tests:
|
||||
stage: test
|
||||
image: node:12-alpine
|
||||
stage: ide-unit-test
|
||||
dependencies:
|
||||
- build-and-package-debian-10
|
||||
image: node:12-buster
|
||||
script:
|
||||
- mv $(realpath dist/package/debian-10/*.deb) ligo_deb10.deb
|
||||
- apt-get update && apt-get -y install libev-dev perl pkg-config libgmp-dev libhidapi-dev m4 libcap-dev bubblewrap rsync
|
||||
- dpkg -i ligo_deb10.deb
|
||||
- cd tools/webide/packages/server
|
||||
- npm ci
|
||||
- npm run test
|
||||
- export LIGO_CMD=/bin/ligo && npm run test
|
||||
rules:
|
||||
- changes:
|
||||
- tools/webide/**
|
||||
|
@ -1,12 +1,23 @@
|
||||
# Quick Start
|
||||
|
||||
Install `yarn`.
|
||||
Run `yarn` to install dependencies.
|
||||
1. Install `yarn`
|
||||
1. Run `yarn` to install dependencies
|
||||
1. Install Ligo compiler by following [Ligo installation instructions][install-ligo]
|
||||
1. Go to `packages/server/` directory
|
||||
1. Run `yarn start` to start the development server
|
||||
1. Open http://localhost:8080
|
||||
|
||||
# Dependency on Examples
|
||||
|
||||
Examples that are displayed in the Web IDE are curated from `/src/test/examples` folder and packaged during the build of the client. To add a new example to the Web IDE, first add the example file to `/src/test/examples` folder; it may live under any level of subdirectories. Then, add the path to the example to the `CURATED_EXAMPLES` array in the `packages/client/package-examples.js` script. The path has to be relative to `/src/test/examples`.
|
||||
|
||||
## Server
|
||||
|
||||
See the README under the `packages/server/` for information about how to get started on the server development.
|
||||
The server source code is located under `packages/server/`. Please see README under `packages/server/` for information about how to get started on the server development.
|
||||
|
||||
## Client
|
||||
|
||||
See the README under the `packages/client/` for information about how to get started on the client development.
|
||||
The client source code is located under `packages/client/`. See the README under the `packages/client/` for information about how to get started on the client development.
|
||||
|
||||
|
||||
[install-ligo]: https://ligolang.org/docs/intro/installation/
|
||||
|
@ -1,4 +1,15 @@
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
# Quick Start
|
||||
|
||||
```sh
|
||||
yarn start
|
||||
open http://localhost:3000
|
||||
```
|
||||
|
||||
Note: Some features such as compiler commands and examples will be unavailable. In order to have these features you have to start the server. See README under `../packages/server` for details.
|
||||
|
||||
# Dependency on Examples
|
||||
|
||||
Examples that are displayed in the Web IDE are curated from `/src/test/examples` folder and packaged during the build of the client. To add a new example to the Web IDE, first add the example file to `/src/test/examples` folder; it may live under any level of subdirectories. Then, add the path to the example to the `CURATED_EXAMPLES` array in the `packages/client/package-examples.js` script. The path has to be relative to `/src/test/examples`.
|
||||
|
||||
## Available Scripts
|
||||
|
||||
|
@ -4,6 +4,12 @@ const join = require('path').join;
|
||||
const fs = require('fs');
|
||||
const YAML = require('yamljs');
|
||||
|
||||
const CURATED_EXAMPLES = [
|
||||
'cameligo/arithmetic-contract.ligo',
|
||||
'pascaligo/arithmetic-contract.ligo',
|
||||
'reasonligo/arithmetic-contract.ligo'
|
||||
];
|
||||
|
||||
function urlFriendlyHash(content) {
|
||||
const hash = createHash('md5');
|
||||
hash.update(content);
|
||||
@ -103,12 +109,6 @@ async function main() {
|
||||
// const EXAMPLES_GLOB = '**/*.ligo';
|
||||
// const files = await findFiles(EXAMPLES_GLOB, EXAMPLES_DIR);
|
||||
|
||||
const CURATED_EXAMPLES = [
|
||||
'cameligo/arithmetic-contract.ligo',
|
||||
'pascaligo/arithmetic-contract.ligo',
|
||||
'reasonligo/arithmetic-contract.ligo'
|
||||
];
|
||||
|
||||
const EXAMPLES_DEST_DIR = join(process.cwd(), 'build', 'static', 'examples');
|
||||
fs.mkdirSync(EXAMPLES_DEST_DIR, { recursive: true });
|
||||
|
||||
|
@ -11,7 +11,7 @@ In the project directory, you can run:
|
||||
|
||||
## `yarn start`
|
||||
|
||||
Runs the server in development mode. This will also start the client.
|
||||
Runs the server in development mode. This will also build and server the client.
|
||||
|
||||
## `yarn test`
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
"prestart": "cd ../client && npm run build",
|
||||
"start": "nodemon -r @ts-tools/node/r -r tsconfig-paths/register ./src/index.ts",
|
||||
"build": "tsc",
|
||||
"test": "jest"
|
||||
"test": "export DATA_DIR=/tmp && jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ts-tools/node": "^1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user