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_and_package_binaries
|
||||||
- build_docker
|
- build_docker
|
||||||
- build_and_deploy
|
- build_and_deploy
|
||||||
|
- ide-unit-test
|
||||||
- ide-build
|
- ide-build
|
||||||
- ide-e2e-test
|
- ide-e2e-test
|
||||||
- ide-deploy
|
- ide-deploy
|
||||||
@ -23,9 +24,8 @@ dont-merge-to-master:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
.build_binary:
|
.build_binary: &build_binary
|
||||||
&build_binary # To run in sequence and save CPU usage, use stage: build_and_package_binaries
|
stage: test # To run in sequence and save CPU usage, use stage: build_and_package_binaries
|
||||||
stage: test
|
|
||||||
script:
|
script:
|
||||||
- $build_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
- $build_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
||||||
- $package_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
- $package_binary_script "$target_os_family" "$target_os" "$target_os_version"
|
||||||
@ -213,15 +213,20 @@ pages-attempt:
|
|||||||
# WEBIDE jobs
|
# WEBIDE jobs
|
||||||
|
|
||||||
run-webide-unit-tests:
|
run-webide-unit-tests:
|
||||||
stage: test
|
stage: ide-unit-test
|
||||||
image: node:12-alpine
|
dependencies:
|
||||||
|
- build-and-package-debian-10
|
||||||
|
image: node:12-buster
|
||||||
script:
|
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
|
- cd tools/webide/packages/server
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm run test
|
- export LIGO_CMD=/bin/ligo && npm run test
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- tools/webide/**
|
- tools/webide/**
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
build-publish-ide-image:
|
build-publish-ide-image:
|
||||||
@ -245,7 +250,7 @@ build-publish-ide-image:
|
|||||||
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- tools/webide/**
|
- tools/webide/**
|
||||||
when: always
|
when: always
|
||||||
- if: '$CI_COMMIT_REF_NAME == "dev"'
|
- if: '$CI_COMMIT_REF_NAME == "dev"'
|
||||||
when: always
|
when: always
|
||||||
@ -260,7 +265,7 @@ run-webide-e2e-tests:
|
|||||||
- docker-compose run e2e
|
- docker-compose run e2e
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- tools/webide/**
|
- tools/webide/**
|
||||||
when: always
|
when: always
|
||||||
- if: '$CI_COMMIT_REF_NAME == "dev"'
|
- if: '$CI_COMMIT_REF_NAME == "dev"'
|
||||||
when: always
|
when: always
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
# Quick Start
|
# Quick Start
|
||||||
|
|
||||||
Install `yarn`.
|
1. Install `yarn`
|
||||||
Run `yarn` to install dependencies.
|
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
|
## 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
|
## 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
|
## Available Scripts
|
||||||
|
|
||||||
|
@ -4,6 +4,12 @@ const join = require('path').join;
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const YAML = require('yamljs');
|
const YAML = require('yamljs');
|
||||||
|
|
||||||
|
const CURATED_EXAMPLES = [
|
||||||
|
'cameligo/arithmetic-contract.ligo',
|
||||||
|
'pascaligo/arithmetic-contract.ligo',
|
||||||
|
'reasonligo/arithmetic-contract.ligo'
|
||||||
|
];
|
||||||
|
|
||||||
function urlFriendlyHash(content) {
|
function urlFriendlyHash(content) {
|
||||||
const hash = createHash('md5');
|
const hash = createHash('md5');
|
||||||
hash.update(content);
|
hash.update(content);
|
||||||
@ -103,12 +109,6 @@ async function main() {
|
|||||||
// const EXAMPLES_GLOB = '**/*.ligo';
|
// const EXAMPLES_GLOB = '**/*.ligo';
|
||||||
// const files = await findFiles(EXAMPLES_GLOB, EXAMPLES_DIR);
|
// 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');
|
const EXAMPLES_DEST_DIR = join(process.cwd(), 'build', 'static', 'examples');
|
||||||
fs.mkdirSync(EXAMPLES_DEST_DIR, { recursive: true });
|
fs.mkdirSync(EXAMPLES_DEST_DIR, { recursive: true });
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ In the project directory, you can run:
|
|||||||
|
|
||||||
## `yarn start`
|
## `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`
|
## `yarn test`
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"prestart": "cd ../client && npm run build",
|
"prestart": "cd ../client && npm run build",
|
||||||
"start": "nodemon -r @ts-tools/node/r -r tsconfig-paths/register ./src/index.ts",
|
"start": "nodemon -r @ts-tools/node/r -r tsconfig-paths/register ./src/index.ts",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "jest"
|
"test": "export DATA_DIR=/tmp && jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ts-tools/node": "^1.0.0",
|
"@ts-tools/node": "^1.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user