GithubHelp home page GithubHelp logo

holochain / hc-ts-template Goto Github PK

View Code? Open in Web Editor NEW
29.0 19.0 4.0 131 KB

Typescript + React + Redux + holochain-proto starter app

License: GNU General Public License v3.0

JavaScript 75.27% TypeScript 21.72% HTML 2.34% CSS 0.67%

hc-ts-template's Introduction

Typescript + React + Redux + holochain-proto Template

Use this template to quickly get up and running with a Typescript build system with hot reloading.

GitHub last commit GitHub

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Ensure holochain-proto (at least version 26) is installed on your machine by running.

hcd -v

Subsequent steps also assumes npm/yarn is installed.

Installing

Install the javascript/typescript packages with

npm install

Build the Holochain dna using

npm run hc:build

and build the UI with

npm run build

The app can now be started for development purposes using

npm run hc:dev

and opening the browser to http://localhost:4141


If you would like to persist data between sessions install to the local holochain directory by running the following from the project root directory:

hcadmin init <id/name string>
hcadmin join ./build/ minesweeper
hcd minesweeper

Running the tests

Run holochain test using

npm run hc:build && npm run hc:test

Run jest front-end tests using

npm run test

Built With

Authors

License

This project is licensed under the GPL-3 License - see the LICENSE.md file for details

hc-ts-template's People

Contributors

maackle avatar zo-el avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hc-ts-template's Issues

error TS2393: Duplicate function implementation.

I cloned this project and added another Zome to the DNA. Now it fails to compile saying that all core functions are duplicates.

dna-src/user/user.ts:133:10 - error TS2393: Duplicate function implementation.

133 function genesis () {
             ~~~~~~~


dna-src/user/user.ts:141:10 - error TS2393: Duplicate function implementation.

141 function validate(entryName, entry, header, sources) {
             ~~~~~~~~


dna-src/user/user.ts:157:10 - error TS2393: Duplicate function implementation.

157 function validateCommit (entryName, entry, header, pkg, sources) {
             ~~~~~~~~~~~~~~


dna-src/user/user.ts:170:10 - error TS2393: Duplicate function implementation.

170 function validatePut (entryName, entry, header, pkg, sources) {
             ~~~~~~~~~~~


dna-src/user/user.ts:184:10 - error TS2393: Duplicate function implementation.

184 function validateMod (entryName, entry, header, replaces, pkg, sources) {
             ~~~~~~~~~~~


dna-src/user/user.ts:205:10 - error TS2393: Duplicate function implementation.

205 function validateDel (entryName, hash, pkg, sources) {
             ~~~~~~~~~~~


dna-src/user/user.ts:227:10 - error TS2393: Duplicate function implementation.

227 function validateLink (entryName, baseHash, links, pkg, sources) {
             ~~~~~~~~~~~~


dna-src/user/user.ts:245:10 - error TS2393: Duplicate function implementation.

245 function validatePutPkg (entryName) {
             ~~~~~~~~~~~~~~


dna-src/user/user.ts:254:10 - error TS2393: Duplicate function implementation.

254 function validateModPkg (entryName) {
             ~~~~~~~~~~~~~~


dna-src/user/user.ts:263:10 - error TS2393: Duplicate function implementation.

263 function validateDelPkg (entryName) {
             ~~~~~~~~~~~~~~


dna-src/user/user.ts:272:10 - error TS2393: Duplicate function implementation.

272 function validateLinkPkg (entryName) {
             ~~~~~~~~~~~~~~~

It seems the both Zomes are colliding in some shared namespace. I'm not too familiar with TypeScript, got any ideas?

Thanks.

Build fails on Windows

C:\Users<user>\dev\HcTcTemplate\hc-ts-template>npm run hc:build

[email protected] hc:build C:\Users<user>\dev\HcTcTemplate\hc-ts-template
rm -r build/dna; npm run hc:build-common

'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] hc:build: rm -r build/dna; npm run hc:build-commonnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] hc:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users<user>\AppData\Roaming\npm-cache_logs\2018-10-28T02_37_28_801Z-debug.log

C:\Users<user>\dev\HcTcTemplate\hc-ts-template>

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.