Skip to content

Commit

Permalink
config gitpod (#23)
Browse files Browse the repository at this point in the history
* config gitpod

* fix

* fix

* update vscode plugin

* bump dfx

* fix

* bump 0.5.7

* fix

* fix
  • Loading branch information
chenyan-dfinity authored May 11, 2020
1 parent 4cb74c8 commit f11b9f5
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM gitpod/workspace-full

USER gitpod

# Install custom tools, runtime, etc. using apt-get
# For example, the command below would install "bastet" - a command line tetris clone:
#
# RUN sudo apt-get -q update && # sudo apt-get install -yq bastet && # sudo rm -rf /var/lib/apt/lists/*
#
# More information: https://www.gitpod.io/docs/config-docker/
RUN wget https://sdk.dfinity.org/install.sh -O /tmp/install-sdk.sh \
&& sh -c 'yes Y | sh /tmp/install-sdk.sh'
20 changes: 20 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
tasks:
- init: npm install && pip install crc8
command: |
gp await-port 8000
dfx build
dfx canister install --all
ID=$(xxd -u -p canisters/linkedup/_canister.id)
CRC=$(python2 -c "import crc8;h=crc8.crc8();h.update('$ID'.decode('hex'));print(h.hexdigest().upper())")
gp preview $(gp url 8000)/?canisterId=ic:$ID$CRC
- command: dfx start
name: replica
openMode: tab-after
image:
file: .gitpod.Dockerfile
ports:
- port: 8000
onOpen: ignore
vscode:
extensions:
- dfinity-foundation.vscode-motoko@0.3.4:94sM6KNSH0sWMuF40BrlUQ==
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Build Status](https://travis-ci.org/dfinity-lab/linkedup.svg?branch=master)](https://travis-ci.org/dfinity-lab/linkedup?branch=master)

[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/dfinity-lab/linkedup)

### Demo

Install the required Node modules (only needed the first time).
Expand Down
2 changes: 1 addition & 1 deletion dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"port": 8000
}
},
"dfx": "0.5.5"
"dfx": "0.5.7"
}
4 changes: 2 additions & 2 deletions src/connectd/digraph.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Array "mo:stdlib/array";
import Iter "mo:stdlib/iter";
import Array "mo:base/Array";
import Iter "mo:base/Iter";
import Types "./types";

module {
Expand Down
2 changes: 1 addition & 1 deletion src/connectd/types.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Principal "mo:stdlib/principalId";
import Principal "mo:base/Principal";

module {
public type Vertex = Principal;
Expand Down
10 changes: 5 additions & 5 deletions src/linkedup/database.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Array "mo:stdlib/array";
import HashMap "mo:stdlib/hashMap";
import Iter "mo:stdlib/iter";
import Option "mo:stdlib/option";
import Principal "mo:stdlib/principalId";
import Array "mo:base/Array";
import HashMap "mo:base/HashMap";
import Iter "mo:base/Iter";
import Option "mo:base/Option";
import Principal "mo:base/Principal";
import Types "./types";

module {
Expand Down
2 changes: 1 addition & 1 deletion src/linkedup/types.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Principal "mo:stdlib/principalId";
import Principal "mo:base/Principal";

module {
public type UserId = Principal;
Expand Down
4 changes: 2 additions & 2 deletions src/linkedup/utils.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Array "mo:stdlib/array";
import Option "mo:stdlib/option";
import Array "mo:base/Array";
import Option "mo:base/Option";
import Database "./database";
import Types "./types";

Expand Down

0 comments on commit f11b9f5

Please sign in to comment.