-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonathan Casarrubias
committed
Dec 7, 2016
1 parent
82b1fac
commit b37f916
Showing
14 changed files
with
172 additions
and
2 deletions.
There are no files selected for viewing
Submodule boot-script
deleted from
5ec2e7
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 @@ | ||
export function BootScript(): any; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,19 @@ | ||
/** | ||
* @author Jonathan Casarrubias | ||
* @module BootScript Decorator | ||
* @license MIT | ||
* @description | ||
* This decorator will return boot script instances | ||
* This avoids the need of creating static bootscripts | ||
**/ | ||
export function BootScript() { | ||
function f(target: any) | ||
{ | ||
function BootScriptInstance(reference: any) | ||
{ | ||
return new target(reference); | ||
} | ||
return <any>BootScriptInstance; | ||
} | ||
return f | ||
} |
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,31 @@ | ||
{ | ||
"name": "@mean-expert/boot-script", | ||
"version": "1.0.0", | ||
"description": "FireLoop BootScript Decorator", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.js.map", | ||
"index.d.ts", | ||
"package.json" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/mean-expert-official/boot-script.git" | ||
}, | ||
"keywords": [ | ||
"FireLoop" | ||
], | ||
"author": "Jonathan Casarrubias", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/mean-expert-official/boot-script/issues" | ||
}, | ||
"homepage": "https://github.com/mean-expert-official/boot-script#readme", | ||
"dependencies": {}, | ||
"devDependencies": {} | ||
} |
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,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"sourceMap": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
Submodule model
deleted from
b40551
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 @@ | ||
export function Model(arg?: { hooks?: {}, remotes?: {} }): any; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,27 @@ | ||
declare var Object: any; | ||
declare var module: any; | ||
import { ModelRegister } from '@mean-expert/model-register/index'; | ||
/** | ||
* @author Jonathan Casarrubias | ||
* @module Model Decorator | ||
* @license MIT | ||
* @description | ||
* This decorator will register fireloop models | ||
**/ | ||
export function Model(arg: { hooks?: {}, remotes?: {} }) { | ||
function f(target: any) | ||
{ | ||
function ff(reference: any) | ||
{ | ||
let instance: any = new target(reference); | ||
if (!arg || Object.keys(arg).length === 0) { | ||
return instance; | ||
} | ||
instance = Object.assign(instance, arg); | ||
new ModelRegister(instance, reference); | ||
return instance; | ||
} | ||
return <any>ff; | ||
} | ||
return f | ||
} |
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,32 @@ | ||
{ | ||
"name": "@mean-expert/model", | ||
"version": "1.0.9", | ||
"description": "FireLoop Model Decorator", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.js.map", | ||
"index.d.ts", | ||
"package.json" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/mean-expert-official/model.git" | ||
}, | ||
"keywords": [ | ||
"FireLoop" | ||
], | ||
"author": "Jonathan Casarrubias", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/mean-expert-official/model/issues" | ||
}, | ||
"homepage": "https://github.com/mean-expert-official/model#readme", | ||
"dependencies": { | ||
"@mean-expert/model-register": "1.0.5" | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"sourceMap": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |