-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from berty/html-mods
feat: web module system
- Loading branch information
Showing
67 changed files
with
28,492 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package labs | ||
|
||
type Config struct { | ||
Address string | ||
Address string | ||
HTMLModules string | ||
} | ||
|
||
func NewConfig() *Config { | ||
return &Config{ | ||
Address: "127.0.0.1:9315", | ||
Address: "127.0.0.1:9315", | ||
HTMLModules: "html-mods.bundle", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/html-mods | ||
/html-mods.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
NAME=ipfs-upload-file | ||
RN_ROOT=../.. | ||
BUNDLE_ROOT=$(RN_ROOT)/html-mods.bundle | ||
BUILD_TARGET=$(BUNDLE_ROOT)/$(NAME) | ||
INDEX_HTML=$(BUILD_TARGET)/index.html | ||
REPO_ROOT=repo | ||
NODE_MODULES_TARGET=$(REPO_ROOT)/node_modules/.mkt | ||
REPO_TARGET=$(REPO_ROOT)/.mkt | ||
DIST_DIR=$(REPO_ROOT)/dist | ||
|
||
$(INDEX_HTML): $(REPO_TARGET) $(NODE_MODULES_TARGET) info.json | ||
rm -fr $(DIST_DIR) | ||
cd $(REPO_ROOT) && npm run build | ||
rm -fr $(BUILD_TARGET) | ||
cp -r $(DIST_DIR) $(BUILD_TARGET) | ||
cp info.json $(BUILD_TARGET)/info.json | ||
|
||
$(REPO_TARGET): remote commit | ||
rm -fr $(REPO_ROOT) | ||
git clone $(shell cat remote) $(REPO_ROOT) | ||
cd $(REPO_ROOT) && git checkout $(shell cat commit) | ||
touch $@ | ||
|
||
$(NODE_MODULES_TARGET): $(REPO_TARGET) $(REPO_ROOT)/package.json | ||
cd $(REPO_ROOT) && npm install | ||
touch $@ | ||
|
||
dev: $(REPO_TARGET) $(NODE_MODULES_TARGET) | ||
cd $(REPO_ROOT) &&npm start | ||
.PHONY: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
44f4cd8bd0178e39e59eb8ab685dccecc4b64c89 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"displayName": "IPFS File Upload", | ||
"shortDescription": "Upload a file to IPFS", | ||
"iconKind": "UTF", | ||
"iconUTF": "⬆️" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected]:ipfs-examples/js-ipfs-http-client-upload-file.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
NAME=ipns-publish | ||
RN_ROOT=../.. | ||
BUNDLE_ROOT=$(RN_ROOT)/html-mods.bundle | ||
BUILD_TARGET=$(BUNDLE_ROOT)/$(NAME) | ||
INDEX_HTML=$(BUILD_TARGET)/index.html | ||
REPO_ROOT=repo | ||
NODE_MODULES_TARGET=$(REPO_ROOT)/node_modules/.mkt | ||
REPO_TARGET=$(REPO_ROOT)/.mkt | ||
DIST_DIR=$(REPO_ROOT)/dist | ||
|
||
$(INDEX_HTML): $(REPO_TARGET) $(NODE_MODULES_TARGET) info.json | ||
rm -fr $(DIST_DIR) | ||
cd $(REPO_ROOT) && npm run build | ||
rm -fr $(BUILD_TARGET) | ||
cp -r $(DIST_DIR) $(BUILD_TARGET) | ||
cp info.json $(BUILD_TARGET)/info.json | ||
|
||
$(REPO_TARGET): remote commit | ||
rm -fr $(REPO_ROOT) | ||
git clone $(shell cat remote) $(REPO_ROOT) | ||
cd $(REPO_ROOT) && git checkout $(shell cat commit) | ||
touch $@ | ||
|
||
$(NODE_MODULES_TARGET): $(REPO_TARGET) $(REPO_ROOT)/package.json | ||
cd $(REPO_ROOT) && npm install | ||
touch $@ | ||
|
||
dev: $(REPO_TARGET) $(NODE_MODULES_TARGET) | ||
cd $(REPO_ROOT) &&npm start | ||
.PHONY: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b5d5bf16236ad3052101e5893b9adcde332fbc23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"displayName": "IPNS Publish", | ||
"shortDescription": "Publish to IPNS using JS and Go", | ||
"iconKind": "UTF", | ||
"iconUTF": "📰" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected]:ipfs-examples/js-ipfs-browser-ipns-publish.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
NAME=react-typescript | ||
RN_ROOT=../.. | ||
BUNDLE_ROOT=$(RN_ROOT)/html-mods.bundle | ||
BUILD_TARGET=$(BUNDLE_ROOT)/$(NAME) | ||
INDEX_HTML=$(BUILD_TARGET)/index.html | ||
NODE_MODULES_TARGET=node_modules/.mkt | ||
DIST_DIR=build | ||
SOURCES=$(shell find src public) | ||
|
||
$(INDEX_HTML): $(NODE_MODULES_TARGET) $(SOURCES) info.json | ||
rm -fr $(DIST_DIR) | ||
npm run build | ||
rm -fr $(BUILD_TARGET) | ||
cp -r $(DIST_DIR) $(BUILD_TARGET) | ||
cp info.json $(BUILD_TARGET)/info.json | ||
|
||
$(NODE_MODULES_TARGET): package.json | ||
npm install | ||
touch $@ | ||
|
||
dev: $(NODE_MODULES_TARGET) | ||
npm start | ||
.PHONY: dev |
Oops, something went wrong.