Remove bundle.js from index

This commit is contained in:
boryslevytskyi
2017-05-13 19:41:38 +03:00
parent 1d1d6ea3b7
commit 65d9a2acdd
6 changed files with 12 additions and 68 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ node_modules
build
BitwiseCmdPages/
.DS_Store
bundle.js
bundle.js.map

View File

@@ -110,6 +110,8 @@ var expression = {
}
});
// Represents numeric value
export class Operand {
constructor(input) {
this.input = input;
@@ -130,14 +132,12 @@ export class Operand {
return Math.floor(Math.log(this.value) / Math.log(2)) + 1;
};
getOtherKind(kind) {
switch(kind || this.kind) {
case 'dec': return 'hex';
case 'hex': return 'dec';
default : throw new Error(kind + " kind doesn't have opposite kind")
}
getOtherKind(kind) {
switch(kind || this.kind) {
case 'dec': return 'hex';
case 'hex': return 'dec';
default : throw new Error(kind + " kind doesn't have opposite kind")
}
};
toString() {
@@ -195,6 +195,7 @@ export class Operand {
};
}
// Expressions like ~1
export class SingleOperandExpression {
constructor(expressionString, operand, sign) {
this.expressionString = expressionString;
@@ -222,6 +223,7 @@ export class SingleOperandExpression {
}
}
// Expression like 1|2 or 4^5
export class TwoOperandExpression {
constructor(expressionString, operand1, operand2, sign) {
this.expressionString = expressionString;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,20 +0,0 @@
describe("cloned container", function() {
var objA = { id: "a"};
var objB = { id: "b" };
var objC = { id: 'c'};
var parent = new core.Container();
parent.register('a', objA);
parent.register('b', objB);
var cloned = parent.clone();
cloned.register('a', objC);
it("should be independent from source container", function() {
expect(parent.resolve('a')).toBe(objA);
expect(cloned.resolve('a')).toBe(objC);
expect(parent.resolve('b')).toBe(objB);
expect(cloned.resolve('b')).toBe(objB);
});
});

View File

@@ -1,18 +0,0 @@
describe('html templates', function () {
var html = core.html;
it('should compile template', function() {
var t = "<div>{m.name}</div>";
var compiled = html.compileTemplate(t);
expect(typeof compiled).toBe("function");
expect(compiled({name: 'test'})).toBe('<div>test</div>');
});
it('should support each', function () {
var t = '{each n in m.lst}{each c in m.lst2}{n}{c}{/}{/}';
var compiled = html.compileTemplate(t);
var result = compiled({lst:[1,2,3], lst2:['a','b']});
console.log(result);
expect(result).toBe('1a1b2a2b3a3b');
});
});