mirror of https://github.com/embarklabs/embark.git
update boilerplate and demo
This commit is contained in:
parent
569734a80d
commit
4b8a353720
|
@ -5,6 +5,7 @@ NOTES
|
||||||
demo/dist/
|
demo/dist/
|
||||||
demo/.embark/development/
|
demo/.embark/development/
|
||||||
demo/config/production/password
|
demo/config/production/password
|
||||||
|
demo/node_modules/
|
||||||
boilerplate/dist/
|
boilerplate/dist/
|
||||||
docs/_build
|
docs/_build
|
||||||
docs/utils/__pycache_
|
docs/utils/__pycache_
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
|
|
||||||
|
// import your contracts
|
||||||
|
// e.g if you have a contract named SimpleStorage:
|
||||||
|
//import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
"contracts": ["app/contracts/**"],
|
"contracts": ["app/contracts/**"],
|
||||||
"app": {
|
"app": {
|
||||||
"css/app.css": ["app/css/**"],
|
"css/app.css": ["app/css/**"],
|
||||||
"js/app.js": ["embark.js", "app/js/**"],
|
"js/app.js": ["app/js/index.js"],
|
||||||
|
"images/": ["app/images/**"],
|
||||||
"index.html": "app/index.html"
|
"index.html": "app/index.html"
|
||||||
},
|
},
|
||||||
"buildDir": "dist/",
|
"buildDir": "dist/",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Embark - SimpleStorage Demo</title>
|
<title>Embark - SimpleStorage Demo</title>
|
||||||
<link rel="stylesheet" href="css/app.css">
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js"></script>
|
||||||
<script src="js/app.js"></script>
|
<script src="js/app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="container">
|
<body class="container">
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,11 @@
|
||||||
/*globals $, SimpleStorage, document*/
|
/*globals $, SimpleStorage, document*/
|
||||||
|
|
||||||
|
import $ from 'jquery';
|
||||||
|
import 'bootstrap';
|
||||||
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
|
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||||
|
|
||||||
var addToLog = function(id, txt) {
|
var addToLog = function(id, txt) {
|
||||||
$(id + " .logs").append("<br>" + txt);
|
$(id + " .logs").append("<br>" + txt);
|
||||||
};
|
};
|
||||||
|
@ -48,19 +54,19 @@ $(document).ready(function() {
|
||||||
//EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});
|
//EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});
|
||||||
|
|
||||||
$("#storage .error").hide();
|
$("#storage .error").hide();
|
||||||
EmbarkJS.Storage.ipfsConnection.ping()
|
//EmbarkJS.Storage.ipfsConnection.version()
|
||||||
.then(function(){
|
// .then(function(){
|
||||||
$("#status-storage").addClass('status-online');
|
$("#status-storage").addClass('status-online');
|
||||||
$("#storage-controls").show();
|
$("#storage-controls").show();
|
||||||
})
|
// })
|
||||||
.catch(function(err) {
|
// .catch(function(err) {
|
||||||
if(err){
|
// if(err){
|
||||||
console.log("IPFS Connection Error => " + err.message);
|
// console.log("IPFS Connection Error => " + err.message);
|
||||||
$("#storage .error").show();
|
// $("#storage .error").show();
|
||||||
$("#status-storage").addClass('status-offline');
|
// $("#status-storage").addClass('status-offline');
|
||||||
$("#storage-controls").hide();
|
// $("#storage-controls").hide();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
$("#storage button.setIpfsText").click(function() {
|
$("#storage button.setIpfsText").click(function() {
|
||||||
var value = $("#storage input.ipfsText").val();
|
var value = $("#storage input.ipfsText").val();
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"contracts": ["app/contracts/**"],
|
"contracts": ["app/contracts/**"],
|
||||||
"app": {
|
"app": {
|
||||||
|
"js/app.js": ["app/js/index.js"],
|
||||||
|
"js/jquery.js": ["app/js/_vendor/jquery.js"],
|
||||||
|
"index.html": "app/index.html",
|
||||||
"css/app.css": ["app/css/**"],
|
"css/app.css": ["app/css/**"],
|
||||||
"images/": ["app/images/**"],
|
"images/": ["app/images/**"]
|
||||||
"js/app.js": ["embark.js", "app/js/_vendor/jquery.min.js", "app/js/_vendor/bootstrap.min.js", "app/js/**"],
|
|
||||||
"index.html": "app/index.html"
|
|
||||||
},
|
},
|
||||||
"buildDir": "dist/",
|
"buildDir": "dist/",
|
||||||
"config": "config/",
|
"config": "config/",
|
||||||
|
|
|
@ -10,5 +10,7 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"bootstrap": "^3.3.6",
|
||||||
|
"jquery": "^1.11.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue