diff --git a/package.json b/package.json
index 52d70e6..b4aac48 100644
--- a/package.json
+++ b/package.json
@@ -12,9 +12,11 @@
},
"scripts": {
"start": "yarn --cwd ./packages/example start",
+ "watch": "wsrun -m watch",
"lint": "wsrun -c -s lint",
"lint:fix": "wsrun -c -s lint:fix",
"build": "wsrun -e -c -s build",
+ "clean:all": "wsrun -e -c -s clean:all && rm -r ./node_modules",
"test": "wsrun -e -c -s --exclude-missing test"
},
"dependencies": {
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 9346c41..df53984 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -5,7 +5,8 @@
"repository": "git@github.com:EthWorks/status-waku-voting.git",
"license": "MIT",
"scripts": {
- "clean": "rm -r ./{build,dist,flatten}",
+ "clean:all": "yarn clean && rimraf node_modules/",
+ "clean": "rimraf build/ && rimraf dist/ && rimraf flatten/ rimraf cache/",
"build:sol": "waffle waffle.config.json",
"build:ts": "tsc",
"build": "yarn build:sol && yarn build:ts",
@@ -25,6 +26,7 @@
"eslint": "^7.28.0",
"ethereum-waffle": "^3.3.0",
"mocha": "^9.0.0",
+ "rimraf": "^3.0.2",
"prettier": "^2.3.1",
"prettier-plugin-solidity": "^1.0.0-beta.13",
"solhint": "^3.3.6",
diff --git a/packages/core/package.json b/packages/core/package.json
index 98c3ef8..16cde94 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -5,7 +5,17 @@
"types": "dist/esm/src/index.d.ts",
"version": "0.1.0",
"license": "MIT",
+ "watch": {
+ "build": {
+ "patterns": ["src"],
+ "extensions": "ts,tsx",
+ "runOnChangeOnly": false
+ }
+ },
"scripts": {
+ "clean:all": "yarn clean && rimraf node_modules/",
+ "clean": "rimraf dist/",
+ "watch": "yarn npm-watch",
"build": "yarn run build:esm && yarn run build:cjs",
"build:esm": "tsc --module es2020 --target es2017 --outDir dist/esm",
"build:cjs": "tsc --outDir dist/cjs",
@@ -26,6 +36,7 @@
"jsdom": "^16.7.0",
"jsdom-global": "^3.0.2",
"mocha": "^9.0.3",
+ "npm-watch": "^0.11.0",
"ts-node": "^10.1.0",
"typescript": "^4.3.5"
},
diff --git a/packages/example/package.json b/packages/example/package.json
index 341219c..80b1d3a 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -4,6 +4,8 @@
"main": "index.js",
"license": "MIT",
"scripts": {
+ "clean:all": "yarn clean && rimraf node_modules/",
+ "clean": "rimraf dist/",
"build": "rm -rf dist && webpack --mode=production --env ENV=production",
"start": "webpack serve --mode=development --env ENV=development --https",
"test": "mocha -r jsdom-global/register",
@@ -13,8 +15,8 @@
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
},
"dependencies": {
- "@status-waku-voting/react-components": "^0.1.0",
- "@usedapp/core": "^0.4.6",
+ "@status-waku-voting/polling-page": "^0.1.0",
+ "@status-waku-voting/proposal-page": "^0.1.0",
"assert": "^2.0.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
@@ -22,8 +24,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
- "stream-browserify": "^3.0.0",
- "styled-components": "^5.3.0"
+ "stream-browserify": "^3.0.0"
},
"devDependencies": {
"@testing-library/react-hooks": "^7.0.1",
diff --git a/packages/example/src/assets/images/close.svg b/packages/example/src/assets/images/close.svg
deleted file mode 100644
index 6f9425b..0000000
--- a/packages/example/src/assets/images/close.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/packages/example/src/assets/images/dapp.svg b/packages/example/src/assets/images/dapp.svg
deleted file mode 100644
index ea6750b..0000000
--- a/packages/example/src/assets/images/dapp.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/packages/example/src/assets/images/metamask.svg b/packages/example/src/assets/images/metamask.svg
deleted file mode 100644
index eb78c2b..0000000
--- a/packages/example/src/assets/images/metamask.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/packages/example/src/assets/images/status.svg b/packages/example/src/assets/images/status.svg
deleted file mode 100644
index 28f3f58..0000000
--- a/packages/example/src/assets/images/status.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/packages/example/src/components/Modal.tsx b/packages/example/src/components/Modal.tsx
deleted file mode 100644
index 5523c9d..0000000
--- a/packages/example/src/components/Modal.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import React, { ReactNode, useEffect } from 'react'
-import styled from 'styled-components'
-import closeButton from '../assets/images/close.svg'
-
-type ModalProps = {
- heading: string
- children: ReactNode
- setShowModal: (val: boolean) => void
-}
-
-export function Modal({ heading, children, setShowModal }: ModalProps) {
- const body = document.getElementById('root')
-
- useEffect(() => {
- if (body) {
- body.style.position = 'fixed'
- return () => {
- body.style.position = 'static'
- }
- }
- }, [])
-
- return (
-