Skip to content

Commit

Permalink
Merge pull request #36 from OpenF2/1.1-wip
Browse files Browse the repository at this point in the history
F2 1.1 release
  • Loading branch information
Mark Healey committed Mar 7, 2013
2 parents 0fddca0 + c676bd4 commit e8bbca1
Show file tree
Hide file tree
Showing 106 changed files with 7,292 additions and 3,367 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ _UpgradeReport/
src/UpgradeLog.XML
*.gpState
src/_UpgradeReport_Files/
*.dbmdl
*.dbmdl
tmp
18 changes: 9 additions & 9 deletions build/F2.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"docs": {
"version": "1.0.5",
"shortVersion": "1.0",
"releaseDate": "2012-09-25T22:40:16.217Z",
"lastUpdateDate": "2013-02-01T19:18:35.487Z",
"lastUpdateDateFormatted": "1 February 2013"
"version": "1.1.0",
"shortVersion": "1.1",
"releaseDate": "2013-03-07T19:10:50.102Z",
"lastUpdateDate": "2013-03-07T19:10:51.648Z",
"lastUpdateDateFormatted": "7 March 2013"
},
"sdk": {
"version": "1.0.3",
"shortVersion": "1.0",
"releaseDate": "2012-11-11T06:09:36.490Z",
"lastUpdateDate": "2013-02-01T19:18:34.480Z"
"version": "1.1.0",
"shortVersion": "1.1",
"releaseDate": "2013-03-07T19:10:50.102Z",
"lastUpdateDate": "2013-03-07T19:10:50.589Z"
},
"branch": "master"
}
121 changes: 100 additions & 21 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,41 @@ var argv = optimist
.boolean('n').alias('n', 'nuget').describe('n', 'Build just the Nuget Package')
.boolean('v').alias('v', 'version').describe('v', 'Output the verison information for F2')
.boolean('y').alias('y', 'yuidoc').describe('y', 'Build the YUIDoc for the SDK')
.string('prep').describe('prep', 'Updates F2Info, does \'build -a\' including rebuild of templates')
.string('release').describe('release', 'Updates the sdk release version in F2.json and creates a tag on GitHub')
.string('release-docs').describe('release-docs', 'Update the docs release version in F2.json')
.string('release-sdk').describe('release-sdk', 'Update the sdk release version in F2.json')
.argv;

// constants
var JS_HEADER = { src: 'sdk/src/template/header.js.tmpl', minify: false };
var JS_FOOTER = { src: 'sdk/src/template/footer.js.tmpl', minify: false };

// only the files that represent f2
var CORE_FILES = [
'sdk/src/preamble.js',
'sdk/src/classes.js',
'sdk/src/constants.js',
'sdk/src/events.js',
'sdk/src/rpc.js',
'sdk/src/ui.js',
'sdk/src/container.js'
{ src: 'sdk/src/F2.js', minify: true },
{ src: 'sdk/src/classes.js', minify: true },
{ src: 'sdk/src/constants.js', minify: true },
{ src: 'sdk/src/events.js', minify: true },
{ src: 'sdk/src/rpc.js', minify: true },
{ src: 'sdk/src/ui.js', minify: true },
{ src: 'sdk/src/container.js', minify: true }
];
var ENCODING = 'utf-8';
var EOL = '\n';
// files to be packaged
var PACKAGE_FILES = [
// requirejs not yet necessary
// { src: 'sdk/src/third-party/require.min.js', minify: false },
{ src: 'sdk/src/third-party/json2.js', minify: true },
{ src: 'sdk/src/third-party/jquery.min.js', minify: false },
{ src: 'sdk/src/third-party/bootstrap-modal.js', minify: false },
{ src: 'sdk/src/third-party/jquery.noconflict.js', minify: false },
{ src: 'sdk/src/third-party/eventemitter2.js', minify: true },
{ src: 'sdk/src/third-party/easyXDM/easyXDM.min.js', minify: false },
{ src: 'sdk/f2.no-third-party.js', minify: true } // this file is created by the build process
{ src: 'sdk/src/third-party/easyXDM/easyXDM.min.js', minify: false }
];
var VERSION_REGEX = /^(\d+)\.(\d+)\.(\d+)$/;

var globalUpdateBranch = true;

// a list of buildSteps that maps an argument to a function. the buildSteps need
// to be in order of dependency in case -a is passed
Expand All @@ -84,6 +92,11 @@ if (argv['release-sdk']) {
buildSteps.unshift({ arg: 'release-sdk', f: releaseSdk });
}

if (argv['prep']){
argv.a = true;
buildSteps.unshift({ arg: 'prepareBranch', f: prepBranch });
}

// process -l if -d or -y is passed
argv.l = argv.l || argv.d || argv.y;

Expand Down Expand Up @@ -225,26 +238,37 @@ function help() {
* @method js
*/
function js() {

var files, contents;
console.log('Building f2.no-third-party.js...');
var contents = CORE_FILES.map(function(f) {
return fs.readFileSync(f, ENCODING);

files = [JS_HEADER]
.concat(CORE_FILES)
.concat([JS_FOOTER]);

contents = files.map(function(f) {
return fs.readFileSync(f.src, ENCODING);
});

contents = processTemplate(contents.join(EOL), f2Info);
fs.writeFileSync('./sdk/f2.no-third-party.js', contents, ENCODING);
console.log('COMPLETE');


console.log('Building Debug Package...');
var contents = PACKAGE_FILES.map(function(f) {
files = [JS_HEADER]
.concat(PACKAGE_FILES)
.concat(CORE_FILES)
.concat([JS_FOOTER]);

contents = files.map(function(f) {
return fs.readFileSync(f.src, ENCODING);
});
fs.writeFileSync('./sdk/f2.debug.js', contents.join(EOL), ENCODING);
console.log('COMPLETE');


console.log('Building Minified Package...');
var contents = PACKAGE_FILES.map(function(f) {
contents = files.map(function(f) {

var code = fs.readFileSync(f.src, ENCODING);

Expand Down Expand Up @@ -280,20 +304,29 @@ function js() {
console.log('COMPLETE');

//copy F2.min.js over to docs/js folder so it makes to gh-pages
console.log('Copying F2.js to ./docs/js...');
console.log('Copying f2.min.js to ./docs/js/f2.js...');
fs.copy('./sdk/f2.min.js', './docs/js/f2.js', function(err){
if (err) {
die(err);
} else {
console.log("COMPLETE");
// wouldn't it be nice if there was a copySync...
console.log('Copying F2.min.js to /f2.js...');
fs.copy('./sdk/f2.min.js', './f2.js', function(err){
// Issue #35
console.log('Copying f2.min.js to ./docs/js/f2.min.js...');
fs.copy('./sdk/f2.min.js', './docs/js/f2.min.js', function(err){
if (err) {
die(err);
} else {
console.log("COMPLETE");
nextStep();

console.log('Copying F2.min.js to /f2.js...');
fs.copy('./sdk/f2.min.js', './f2.js', function(err){
if (err) {
die(err);
} else {
console.log("COMPLETE");
nextStep();
}
});
}
});
}
Expand Down Expand Up @@ -530,6 +563,11 @@ function setCurrentBranch(callback){
* @method saveF2Info
*/
function saveF2Info() {
//sometimes we don't want to update the F2Info.branch property
if (!globalUpdateBranch){
fs.writeFileSync('./build/F2.json', JSON.stringify(f2Info, null, '\t'), ENCODING);
return;
}
setCurrentBranch(function(){
fs.writeFileSync('./build/F2.json', JSON.stringify(f2Info, null, '\t'), ENCODING);
});
Expand Down Expand Up @@ -622,4 +660,45 @@ function yuidoc() {
console.log('COMPLETE');
nextStep();
});
};
};

/**
* Added new build step to prepare branches refd in pull requests so they
* can more easily be merged from Github without re-building templates in 'master'.
*
* This step is just for @markhealey and @brianbaker
*/
function prepBranch(){
console.log("Preparing current branch for merging into master...");
//set this to false to tell docs() not to touch branch prop
//before compiling templates
globalUpdateBranch = false;
//add FIRST step to update F2.json
buildSteps.unshift({
arg: 'updateF2Info',
f: function() {
//sync-up dates
var dat = new Date();
f2Info.docs.releaseDate = f2Info.sdk.releaseDate = dat.toJSON();
f2Info.docs.lastUpdateDate = f2Info.sdk.lastUpdateDate = dat.toJSON();
f2Info.docs.lastUpdateDateFormatted = dateFormat(dat);
//set branch name
f2Info.branch = 'master';
//save
saveF2Info();
//go
nextStep();
}
});
//add step to display version # (serenity now)...and then we're done.
buildSteps.push({
arg: 'versCheck',
f: function(){
version();
console.log("PREP COMPLETE -- You can now commit changes & merge with 'master'.");
}
});
//run all build steps
//start queue
nextStep();
}
27 changes: 15 additions & 12 deletions docs/app-development.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>F2 - App Development</title>
<meta charset="utf-8">
<meta name="dcterms.date" content="1 February 2013">
<meta name="dcterms.date" content="7 March 2013">
<meta name="gitbranch" content="master">
<meta name="description" content="F2: The Open Financial Framework. An open framework created for the financial services industry.">
<meta name="keywords" content="F2, Open F2, Open Financial Framework, Markit, Markit On Demand, MOD, web, web framework, apps, context, container, Hub">
Expand All @@ -17,7 +17,7 @@
<script src="./js/respond.min.js"></script>

<link href="./css/prettify.css" rel="stylesheet">
<link href="./css/F2.Docs.css?1.0.5" rel="stylesheet">
<link href="./css/F2.Docs.css?1.1.0" rel="stylesheet">

<link rel="icon" href="./img/favicon-32px.png" type="image/png"/>
<link rel="apple-touch-icon" sizes="57x57" href="./img/touch-icon-57.png" />
Expand Down Expand Up @@ -71,8 +71,10 @@
<li class="divider-vertical"></li>
<li><a href="https://developer.openf2.org">Developer</a></li>
<li class="divider-vertical"></li>
<li class="ghWrap"><a class="gitHubLink" href="https://github.com/OpenF2/F2/"><strong>VIEW </strong><span class="onDecoration">ON</span><strong> GITHUB</strong><span class="F2VersionIndicator">v 1.0.3</span></a></li>
<li class="ghWrapResp"><a href="https://github.com/OpenF2/F2/">View on GitHub (v 1.0.3)</a></li>
<li><a href="http://blog.openf2.org" target="_blank">Blog</a></li>
<li class="divider-vertical"></li>
<li class="ghWrap"><a class="gitHubLink" href="https://github.com/OpenF2/F2/"><strong>VIEW </strong><span class="onDecoration">ON</span><strong> GITHUB</strong><span class="F2VersionIndicator">v 1.1.0</span></a></li>
<li class="ghWrapResp"><a href="https://github.com/OpenF2/F2/">View on GitHub (v 1.1.0)</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -123,7 +125,7 @@
<h1 class="title">App Development</h1>
</header>
<p class="lead">
You've come to the right place if you want to start building F2 apps. Before continuing, make sure you've <a href="https://github.com/OpenF2/F2#quick-start">cloned the F2 repository on GitHub</a> or <a href="index.html#get-started">downloaded the latest framework build</a> (v1.0.3). Secondly, <a href="index.html#framework">read about the F2 Framework</a>. There are a few important concepts to help you better understand apps, containers and context.
You've come to the right place if you want to start building F2 apps. Before continuing, make sure you've <a href="https://github.com/OpenF2/F2#quick-start">cloned the F2 repository on GitHub</a> or <a href="index.html#get-started">downloaded the latest framework build</a> (v1.1.0). Secondly, <a href="index.html#framework">read about the F2 Framework</a>. There are a few important concepts to help you better understand apps, containers and context.
</p>

<p>F2 apps are synonymous with modules, widgets and portlets. Think charts, portfolios, trade tickets, and screeners. F2 apps only need to be programmed once, no matter where they will be used. To start, F2 Apps are either:</p>
Expand Down Expand Up @@ -247,7 +249,7 @@ <h3>Configuration</h3>
</section>
<section class="level2" id="app-design">
<h2>App Design</h2>
<p>Design considerations are an important first step when creating a new app. Content can range from news to research to multimedia, and content should be presented using <a href="(http://www.alistapart.com/articles/understandingprogressiveenhancement/">Progressive Enhancement</a>, <a href="http://www.lukew.com/presos/preso.asp?26">Mobile First</a> and <a href="http://www.abookapart.com/products/responsive-web-design">Responsive Design</a> methodologies. That is to say multimedia content, for example, should be shown plugin-free (using HTML5 video or audio elements) for capable browsers and fallback to Flash-based players for browsers that do not yet support HTML5 related technologies. (<a href="http://videojs.com/">VideoJS</a> is good example of open-source JavaScript and CSS &quot;that makes it easier to work with and build on HTML5 video, today.&quot;)</p>
<p>Design considerations are an important first step when creating a new app. Content can range from news to research to multimedia, and content should be presented using <a href="http://www.alistapart.com/articles/understandingprogressiveenhancement/">Progressive Enhancement</a>, <a href="http://www.lukew.com/presos/preso.asp?26">Mobile First</a> and <a href="http://www.abookapart.com/products/responsive-web-design">Responsive Design</a> methodologies. That is to say multimedia content, for example, should be shown plugin-free (using HTML5 video or audio elements) for capable browsers and fallback to Flash-based players for browsers that do not yet support HTML5 related technologies. (<a href="http://videojs.com/">VideoJS</a> is good example of open-source JavaScript and CSS &quot;that makes it easier to work with and build on HTML5 video, today.&quot;)</p>
<p>If App Developers embed URLs back to their own websites or to third party sites, URLs must be opened in a new window as to not interrupt the experience of someone using the container. If authentication is required on an App Developer's site, this can be accomplished with pass-through authentication using encrypted URLs as discussed in <a href="#single-sign-on">Single Sign On</a>.</p>
<section class="level3" id="choices">
<h3>Choices</h3>
Expand Down Expand Up @@ -551,7 +553,8 @@ <h5>
</section>
<section class="level2" id="namespacing">
<h2>Namespacing</h2>
<p>F2 is a <em>web</em> integration framework which means are apps are inherently insecure—at least <em>non-secure</em> apps. Following this spec, App Developers must avoid CSS collisions and JavaScript namespace issues to provide users with the best possible experience.</p>
<p>F2 is a <em>web</em> integration framework which means apps are inherently insecure—at least those <em>non-secure</em> apps. Following this spec, App Developers must avoid CSS collisions and JavaScript namespace issues to provide users with the best possible experience.</p>
<p><span class="label">Note</span> Continue reading for <a href="#secure-apps">more specifics about secure apps</a>.</p>
<section class="level3" id="namespacing-css">
<h3>Namespacing CSS</h3>
<p>As discussed in <a href="#f2-appid">Developing F2 Apps: F2 AppID</a>, to develop an F2 app, you need a unique identifier called an AppID. This AppID will be unique to your app across the entire open financial framework ecosystem. The format of the AppID looks like this: <code>com_companyName_appName</code>, where the <code>companyName</code> &quot;namespace&quot; is your company name and <code>appName</code> is the name of your app.</p>
Expand Down Expand Up @@ -967,17 +970,17 @@ <h3>Considerations</h3>
<hr>

<footer>
<p class="pull-left"><small><strong>F2&nbsp;&nbsp;|&nbsp;&nbsp;The Open Financial Framework</strong><br><a href="mailto:[email protected]">[email protected]</a></small></p>
<p class="pull-right"><small>F2 is maintained by <a href="http://www.markitondemand.com/">Markit On Demand</a> on <a href="https://github.com/OpenF2/F2">GitHub</a>.<br>Code licensed under the <a href="https://github.com/OpenF2/F2#copyright-and-license">MIT License</a>.<br> Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a><br><em>Specification 1.0.5, 1 February 2013</em></small></p>
<p class="pull-left"><small><strong>F2&nbsp;&nbsp;|&nbsp;&nbsp;The Open Financial Framework</strong><br><a href="mailto:[email protected]">[email protected]</a><br>Specification 1.1.0, published 7 March 2013</small></p>
<p class="pull-right"><small>F2 is maintained by <a href="http://www.markitondemand.com/">Markit On Demand</a> on <a href="https://github.com/OpenF2/F2">GitHub</a>.<br>Code licensed under the <a href="https://github.com/OpenF2/F2#copyright-and-license">MIT License</a>.<br> Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</small></p>
</footer>

</div><!--/.container-->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="./js/bootstrap.min.2.1.1.js"></script>
<script src="./js/bootstrap.min.2.3.0.js"></script>
<script src="./js/prettify.js"></script>
<script src="./js/f2.js?1.0.3"></script>
<script src="./js/docs.js?1.0.5"></script>
<script src="./js/f2.js?1.1.0"></script>
<script src="./js/docs.js?1.1.0"></script>
<script>F2.extend('gitbranch', (function(){ return 'master'; }));</script>
</body>
</html>
Loading

0 comments on commit e8bbca1

Please sign in to comment.