diff --git a/Makefile b/Makefile index 5ce62ac..4e8e7cc 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ -all: coreLib +all: coreLib stdLib -#symbolLib editorLib testsLib +#editorLib testsLib coreLib: (cd components/Core; make all) -symbolLib: - (cd components/Symbol; make all) +stdLib: + (cd components/Std; make all) editorLib: (cd components/Editor; make all) diff --git a/components/Core/Makefile b/components/Core/Makefile index b00ca1d..59efcd4 100644 --- a/components/Core/Makefile +++ b/components/Core/Makefile @@ -1,5 +1,5 @@ OutputName=coreLib -SourceFiles=src/Core.ts src/Fragment.ts src/Paper.ts src/Value.ts src/StandardLibrary.ts src/Dictionary.ts +SourceFiles=src/Core.ts src/Fragment.ts src/Paper.ts src/Value.ts src/Dictionary.ts BaseDir=../.. OutputDir=$(BaseDir)/js Out=$(OutputDir)/$(OutputName).js diff --git a/components/Core/lib.ts b/components/Core/lib.ts index 32e71ba..b4f278a 100644 --- a/components/Core/lib.ts +++ b/components/Core/lib.ts @@ -2,5 +2,4 @@ /// /// /// -/// /// diff --git a/components/Symbol/Makefile b/components/Std/Makefile similarity index 87% rename from components/Symbol/Makefile rename to components/Std/Makefile index e6ac299..f515882 100644 --- a/components/Symbol/Makefile +++ b/components/Std/Makefile @@ -1,5 +1,5 @@ -OutputName=symbolLib -SourceFiles=src/Rect.ts +OutputName=stdLib +SourceFiles=src/justAnExample.ts BaseDir=../.. OutputDir=$(BaseDir)/js diff --git a/components/Symbol/declareFiles/coreLib.d.ts b/components/Std/declareFiles/coreLib.d.ts similarity index 100% rename from components/Symbol/declareFiles/coreLib.d.ts rename to components/Std/declareFiles/coreLib.d.ts diff --git a/components/Std/lib.ts b/components/Std/lib.ts new file mode 100644 index 0000000..c63f53e --- /dev/null +++ b/components/Std/lib.ts @@ -0,0 +1,13 @@ +/// + +module Sanara.Std { + export var dictionary : Sanara.Core.Dictionary = (function() { + var entries = []; + // + entries.push(Sanara.Std.Circle); + entries.push(Sanara.Std.Bitree); + entries.push(Sanara.Std.FillColor); + // + return new Sanara.Core.Dictionary(entries); + })(); +} diff --git a/components/Core/src/StandardLibrary.ts b/components/Std/src/justAnExample.ts similarity index 92% rename from components/Core/src/StandardLibrary.ts rename to components/Std/src/justAnExample.ts index e18aa3f..8c178f2 100644 --- a/components/Core/src/StandardLibrary.ts +++ b/components/Std/src/justAnExample.ts @@ -1,9 +1,7 @@ -/// -/// +/// module Sanara.Std { - export class Bitree extends Sanara.Core.Fragment { static doc:Sanara.Core.FragmentClassDoc = { name : "bitree", @@ -147,14 +145,4 @@ module Sanara.Std { this.child.paint(context); } } - - export var dictionary : Sanara.Core.Dictionary = (function() { - var entries = []; - // - entries.push(Sanara.Std.Circle); - entries.push(Sanara.Std.Bitree); - entries.push(Sanara.Std.FillColor); - // - return new Sanara.Core.Dictionary(entries); - })(); } diff --git a/components/Symbol/tsconfig.json b/components/Std/tsconfig.json similarity index 89% rename from components/Symbol/tsconfig.json rename to components/Std/tsconfig.json index 19cc356..f972429 100644 --- a/components/Symbol/tsconfig.json +++ b/components/Std/tsconfig.json @@ -11,6 +11,6 @@ "files": [ "./declareFiles/coreLib.d.ts", "./lib.ts", - "./src/Rect.ts" + "./src/justAnExample.ts" ] } diff --git a/components/Symbol/lib.ts b/components/Symbol/lib.ts deleted file mode 100644 index 7ca7325..0000000 --- a/components/Symbol/lib.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/components/Symbol/src/Rect.ts b/components/Symbol/src/Rect.ts deleted file mode 100644 index c6ca43c..0000000 --- a/components/Symbol/src/Rect.ts +++ /dev/null @@ -1,16 +0,0 @@ -/// - -module Sanara.Symbol { - export class Rect extends Sanara.Core.BaseFragment { - w : number; - h : number; - constructor(w: number=100, h: number=100){ - super(); - this.w = w; - this.h = h; - } - paintMe (paper : Sanara.Core.Paper) { - paper.context.fillRect(0,0,this.w,this.h); - } - } -} diff --git a/components/declareFiles/coreLib.d.ts b/components/declareFiles/coreLib.d.ts index 1406308..68542cc 100644 --- a/components/declareFiles/coreLib.d.ts +++ b/components/declareFiles/coreLib.d.ts @@ -100,27 +100,3 @@ declare module Sanara.Core { listNames(): string[]; } } -declare module Sanara.Std { - class Bitree extends Sanara.Core.Fragment { - static doc: Sanara.Core.FragmentClassDoc; - private content; - private lefty; - private righty; - constructor(children: Sanara.Core.Fragment[]); - paintImplementation(context: Sanara.Core.SanaraContext): void; - } - class Circle extends Sanara.Core.Fragment { - static doc: Sanara.Core.FragmentClassDoc; - private static CIRCLE; - constructor(); - paintImplementation(context: Sanara.Core.SanaraContext): void; - } - class FillColor extends Sanara.Core.Fragment { - static doc: Sanara.Core.FragmentClassDoc; - private color; - private child; - constructor(children: Sanara.Core.Fragment[], parameters: Sanara.Core.Value[]); - paintImplementation(context: Sanara.Core.SanaraContext): void; - } - var dictionary: Sanara.Core.Dictionary; -} diff --git a/components/declareFiles/editorLib.d.ts b/components/declareFiles/editorLib.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/components/declareFiles/stdLib.d.ts b/components/declareFiles/stdLib.d.ts new file mode 100644 index 0000000..33228c0 --- /dev/null +++ b/components/declareFiles/stdLib.d.ts @@ -0,0 +1,26 @@ +declare module Sanara.Std { + class Bitree extends Sanara.Core.Fragment { + static doc: Sanara.Core.FragmentClassDoc; + private content; + private lefty; + private righty; + constructor(children: Sanara.Core.Fragment[]); + paintImplementation(context: Sanara.Core.SanaraContext): void; + } + class Circle extends Sanara.Core.Fragment { + static doc: Sanara.Core.FragmentClassDoc; + private static CIRCLE; + constructor(); + paintImplementation(context: Sanara.Core.SanaraContext): void; + } + class FillColor extends Sanara.Core.Fragment { + static doc: Sanara.Core.FragmentClassDoc; + private color; + private child; + constructor(children: Sanara.Core.Fragment[], parameters: Sanara.Core.Value[]); + paintImplementation(context: Sanara.Core.SanaraContext): void; + } +} +declare module Sanara.Std { + var dictionary: Sanara.Core.Dictionary; +} diff --git a/components/declareFiles/symbolLib.d.ts b/components/declareFiles/symbolLib.d.ts deleted file mode 100644 index ed37089..0000000 --- a/components/declareFiles/symbolLib.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module Sanara.Symbol { - class Rect extends Sanara.Core.BaseFragment { - w: number; - h: number; - constructor(w?: number, h?: number); - paintMe(paper: Sanara.Core.Paper): void; - } -} diff --git a/components/declareFiles/testsLib.d.ts b/components/declareFiles/testsLib.d.ts deleted file mode 100644 index 0af007e..0000000 --- a/components/declareFiles/testsLib.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// -declare module Sanara.Tests { - var simplePaper: Core.BasicPaper; -} diff --git a/index.html b/index.html index 472123c..e350f16 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,13 @@ +