mirror of https://github.com/embarklabs/embark.git
move basic import so it's always available
This commit is contained in:
parent
99a66a05ef
commit
a174b94702
|
@ -31,13 +31,10 @@ class Pipeline {
|
||||||
self.logger.trace("reading " + file.filename);
|
self.logger.trace("reading " + file.filename);
|
||||||
|
|
||||||
if (file.filename.indexOf('.js') >= 0) {
|
if (file.filename.indexOf('.js') >= 0) {
|
||||||
|
|
||||||
console.log("---");
|
|
||||||
console.log(fs.dappPath());
|
|
||||||
console.log(file.filename);
|
|
||||||
console.log("---");
|
|
||||||
|
|
||||||
let importsList = {};
|
let importsList = {};
|
||||||
|
|
||||||
|
importsList["Embark/EmbarkJS"] = fs.embarkPath("js/embark.js");
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function findImports(next) {
|
function findImports(next) {
|
||||||
webpack({
|
webpack({
|
||||||
|
@ -52,11 +49,7 @@ class Pipeline {
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
console.log("request " + request);
|
console.log("request " + request);
|
||||||
if (request === "Embark/EmbarkJS") {
|
if (request.indexOf('Embark/contracts/') === 0) {
|
||||||
importsList["Embark/EmbarkJS"] = fs.embarkPath("js/embark.js");
|
|
||||||
} else if (request === "Embark/test") {
|
|
||||||
importsList["Embark/test"] = fs.embarkPath("js/test.js");
|
|
||||||
} else if (request.indexOf('Embark/contracts/') === 0) {
|
|
||||||
let contractName = request.split('/')[2];
|
let contractName = request.split('/')[2];
|
||||||
let contractCode = self.buildContractJS(contractName);
|
let contractCode = self.buildContractJS(contractName);
|
||||||
let filePath = utils.joinPath(fs.dappPath(), ".embark", contractName + '.js');
|
let filePath = utils.joinPath(fs.dappPath(), ".embark", contractName + '.js');
|
||||||
|
|
|
@ -8,7 +8,7 @@ import $ from './_vendor/jquery.min';
|
||||||
//console.log("finished importing web3");
|
//console.log("finished importing web3");
|
||||||
import EmbarkJS from 'Embark/EmbarkJS';
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||||
//import web3 from 'Embark/web3';
|
import web3 from 'Embark/web3';
|
||||||
|
|
||||||
console.log("SimpleStorage")
|
console.log("SimpleStorage")
|
||||||
console.log(SimpleStorage);
|
console.log(SimpleStorage);
|
||||||
|
|
Loading…
Reference in New Issue