Skip to content

Commit e8bbca1

Browse files
author
Mark Healey
committed
Merge pull request #36 from OpenF2/1.1-wip
F2 1.1 release
2 parents 0fddca0 + c676bd4 commit e8bbca1

File tree

106 files changed

+7292
-3367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+7292
-3367
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ _UpgradeReport/
4141
src/UpgradeLog.XML
4242
*.gpState
4343
src/_UpgradeReport_Files/
44-
*.dbmdl
44+
*.dbmdl
45+
tmp

build/F2.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"docs": {
3-
"version": "1.0.5",
4-
"shortVersion": "1.0",
5-
"releaseDate": "2012-09-25T22:40:16.217Z",
6-
"lastUpdateDate": "2013-02-01T19:18:35.487Z",
7-
"lastUpdateDateFormatted": "1 February 2013"
3+
"version": "1.1.0",
4+
"shortVersion": "1.1",
5+
"releaseDate": "2013-03-07T19:10:50.102Z",
6+
"lastUpdateDate": "2013-03-07T19:10:51.648Z",
7+
"lastUpdateDateFormatted": "7 March 2013"
88
},
99
"sdk": {
10-
"version": "1.0.3",
11-
"shortVersion": "1.0",
12-
"releaseDate": "2012-11-11T06:09:36.490Z",
13-
"lastUpdateDate": "2013-02-01T19:18:34.480Z"
10+
"version": "1.1.0",
11+
"shortVersion": "1.1",
12+
"releaseDate": "2013-03-07T19:10:50.102Z",
13+
"lastUpdateDate": "2013-03-07T19:10:50.589Z"
1414
},
1515
"branch": "master"
1616
}

build/build.js

+100-21
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,41 @@ var argv = optimist
3333
.boolean('n').alias('n', 'nuget').describe('n', 'Build just the Nuget Package')
3434
.boolean('v').alias('v', 'version').describe('v', 'Output the verison information for F2')
3535
.boolean('y').alias('y', 'yuidoc').describe('y', 'Build the YUIDoc for the SDK')
36+
.string('prep').describe('prep', 'Updates F2Info, does \'build -a\' including rebuild of templates')
3637
.string('release').describe('release', 'Updates the sdk release version in F2.json and creates a tag on GitHub')
3738
.string('release-docs').describe('release-docs', 'Update the docs release version in F2.json')
3839
.string('release-sdk').describe('release-sdk', 'Update the sdk release version in F2.json')
3940
.argv;
4041

4142
// constants
43+
var JS_HEADER = { src: 'sdk/src/template/header.js.tmpl', minify: false };
44+
var JS_FOOTER = { src: 'sdk/src/template/footer.js.tmpl', minify: false };
45+
4246
// only the files that represent f2
4347
var CORE_FILES = [
44-
'sdk/src/preamble.js',
45-
'sdk/src/classes.js',
46-
'sdk/src/constants.js',
47-
'sdk/src/events.js',
48-
'sdk/src/rpc.js',
49-
'sdk/src/ui.js',
50-
'sdk/src/container.js'
48+
{ src: 'sdk/src/F2.js', minify: true },
49+
{ src: 'sdk/src/classes.js', minify: true },
50+
{ src: 'sdk/src/constants.js', minify: true },
51+
{ src: 'sdk/src/events.js', minify: true },
52+
{ src: 'sdk/src/rpc.js', minify: true },
53+
{ src: 'sdk/src/ui.js', minify: true },
54+
{ src: 'sdk/src/container.js', minify: true }
5155
];
5256
var ENCODING = 'utf-8';
5357
var EOL = '\n';
5458
// files to be packaged
5559
var PACKAGE_FILES = [
60+
// requirejs not yet necessary
61+
// { src: 'sdk/src/third-party/require.min.js', minify: false },
5662
{ src: 'sdk/src/third-party/json2.js', minify: true },
63+
{ src: 'sdk/src/third-party/jquery.min.js', minify: false },
64+
{ src: 'sdk/src/third-party/bootstrap-modal.js', minify: false },
65+
{ src: 'sdk/src/third-party/jquery.noconflict.js', minify: false },
5766
{ src: 'sdk/src/third-party/eventemitter2.js', minify: true },
58-
{ src: 'sdk/src/third-party/easyXDM/easyXDM.min.js', minify: false },
59-
{ src: 'sdk/f2.no-third-party.js', minify: true } // this file is created by the build process
67+
{ src: 'sdk/src/third-party/easyXDM/easyXDM.min.js', minify: false }
6068
];
6169
var VERSION_REGEX = /^(\d+)\.(\d+)\.(\d+)$/;
62-
70+
var globalUpdateBranch = true;
6371

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

95+
if (argv['prep']){
96+
argv.a = true;
97+
buildSteps.unshift({ arg: 'prepareBranch', f: prepBranch });
98+
}
99+
87100
// process -l if -d or -y is passed
88101
argv.l = argv.l || argv.d || argv.y;
89102

@@ -225,26 +238,37 @@ function help() {
225238
* @method js
226239
*/
227240
function js() {
228-
241+
var files, contents;
229242
console.log('Building f2.no-third-party.js...');
230-
var contents = CORE_FILES.map(function(f) {
231-
return fs.readFileSync(f, ENCODING);
243+
244+
files = [JS_HEADER]
245+
.concat(CORE_FILES)
246+
.concat([JS_FOOTER]);
247+
248+
contents = files.map(function(f) {
249+
return fs.readFileSync(f.src, ENCODING);
232250
});
251+
233252
contents = processTemplate(contents.join(EOL), f2Info);
234253
fs.writeFileSync('./sdk/f2.no-third-party.js', contents, ENCODING);
235254
console.log('COMPLETE');
236255

237256

238257
console.log('Building Debug Package...');
239-
var contents = PACKAGE_FILES.map(function(f) {
258+
files = [JS_HEADER]
259+
.concat(PACKAGE_FILES)
260+
.concat(CORE_FILES)
261+
.concat([JS_FOOTER]);
262+
263+
contents = files.map(function(f) {
240264
return fs.readFileSync(f.src, ENCODING);
241265
});
242266
fs.writeFileSync('./sdk/f2.debug.js', contents.join(EOL), ENCODING);
243267
console.log('COMPLETE');
244268

245269

246270
console.log('Building Minified Package...');
247-
var contents = PACKAGE_FILES.map(function(f) {
271+
contents = files.map(function(f) {
248272

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

@@ -280,20 +304,29 @@ function js() {
280304
console.log('COMPLETE');
281305

282306
//copy F2.min.js over to docs/js folder so it makes to gh-pages
283-
console.log('Copying F2.js to ./docs/js...');
307+
console.log('Copying f2.min.js to ./docs/js/f2.js...');
284308
fs.copy('./sdk/f2.min.js', './docs/js/f2.js', function(err){
285309
if (err) {
286310
die(err);
287311
} else {
288312
console.log("COMPLETE");
289-
// wouldn't it be nice if there was a copySync...
290-
console.log('Copying F2.min.js to /f2.js...');
291-
fs.copy('./sdk/f2.min.js', './f2.js', function(err){
313+
// Issue #35
314+
console.log('Copying f2.min.js to ./docs/js/f2.min.js...');
315+
fs.copy('./sdk/f2.min.js', './docs/js/f2.min.js', function(err){
292316
if (err) {
293317
die(err);
294318
} else {
295319
console.log("COMPLETE");
296-
nextStep();
320+
321+
console.log('Copying F2.min.js to /f2.js...');
322+
fs.copy('./sdk/f2.min.js', './f2.js', function(err){
323+
if (err) {
324+
die(err);
325+
} else {
326+
console.log("COMPLETE");
327+
nextStep();
328+
}
329+
});
297330
}
298331
});
299332
}
@@ -530,6 +563,11 @@ function setCurrentBranch(callback){
530563
* @method saveF2Info
531564
*/
532565
function saveF2Info() {
566+
//sometimes we don't want to update the F2Info.branch property
567+
if (!globalUpdateBranch){
568+
fs.writeFileSync('./build/F2.json', JSON.stringify(f2Info, null, '\t'), ENCODING);
569+
return;
570+
}
533571
setCurrentBranch(function(){
534572
fs.writeFileSync('./build/F2.json', JSON.stringify(f2Info, null, '\t'), ENCODING);
535573
});
@@ -622,4 +660,45 @@ function yuidoc() {
622660
console.log('COMPLETE');
623661
nextStep();
624662
});
625-
};
663+
};
664+
665+
/**
666+
* Added new build step to prepare branches refd in pull requests so they
667+
* can more easily be merged from Github without re-building templates in 'master'.
668+
*
669+
* This step is just for @markhealey and @brianbaker
670+
*/
671+
function prepBranch(){
672+
console.log("Preparing current branch for merging into master...");
673+
//set this to false to tell docs() not to touch branch prop
674+
//before compiling templates
675+
globalUpdateBranch = false;
676+
//add FIRST step to update F2.json
677+
buildSteps.unshift({
678+
arg: 'updateF2Info',
679+
f: function() {
680+
//sync-up dates
681+
var dat = new Date();
682+
f2Info.docs.releaseDate = f2Info.sdk.releaseDate = dat.toJSON();
683+
f2Info.docs.lastUpdateDate = f2Info.sdk.lastUpdateDate = dat.toJSON();
684+
f2Info.docs.lastUpdateDateFormatted = dateFormat(dat);
685+
//set branch name
686+
f2Info.branch = 'master';
687+
//save
688+
saveF2Info();
689+
//go
690+
nextStep();
691+
}
692+
});
693+
//add step to display version # (serenity now)...and then we're done.
694+
buildSteps.push({
695+
arg: 'versCheck',
696+
f: function(){
697+
version();
698+
console.log("PREP COMPLETE -- You can now commit changes & merge with 'master'.");
699+
}
700+
});
701+
//run all build steps
702+
//start queue
703+
nextStep();
704+
}

docs/app-development.html

+15-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>F2 - App Development</title>
55
<meta charset="utf-8">
6-
<meta name="dcterms.date" content="1 February 2013">
6+
<meta name="dcterms.date" content="7 March 2013">
77
<meta name="gitbranch" content="master">
88
<meta name="description" content="F2: The Open Financial Framework. An open framework created for the financial services industry.">
99
<meta name="keywords" content="F2, Open F2, Open Financial Framework, Markit, Markit On Demand, MOD, web, web framework, apps, context, container, Hub">
@@ -17,7 +17,7 @@
1717
<script src="./js/respond.min.js"></script>
1818

1919
<link href="./css/prettify.css" rel="stylesheet">
20-
<link href="./css/F2.Docs.css?1.0.5" rel="stylesheet">
20+
<link href="./css/F2.Docs.css?1.1.0" rel="stylesheet">
2121

2222
<link rel="icon" href="./img/favicon-32px.png" type="image/png"/>
2323
<link rel="apple-touch-icon" sizes="57x57" href="./img/touch-icon-57.png" />
@@ -71,8 +71,10 @@
7171
<li class="divider-vertical"></li>
7272
<li><a href="https://developer.openf2.org">Developer</a></li>
7373
<li class="divider-vertical"></li>
74-
<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>
75-
<li class="ghWrapResp"><a href="https://github.com/OpenF2/F2/">View on GitHub (v 1.0.3)</a></li>
74+
<li><a href="http://blog.openf2.org" target="_blank">Blog</a></li>
75+
<li class="divider-vertical"></li>
76+
<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>
77+
<li class="ghWrapResp"><a href="https://github.com/OpenF2/F2/">View on GitHub (v 1.1.0)</a></li>
7678
</ul>
7779
</div>
7880
</div>
@@ -123,7 +125,7 @@
123125
<h1 class="title">App Development</h1>
124126
</header>
125127
<p class="lead">
126-
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.
128+
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.
127129
</p>
128130

129131
<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>
@@ -247,7 +249,7 @@ <h3>Configuration</h3>
247249
</section>
248250
<section class="level2" id="app-design">
249251
<h2>App Design</h2>
250-
<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>
252+
<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>
251253
<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>
252254
<section class="level3" id="choices">
253255
<h3>Choices</h3>
@@ -551,7 +553,8 @@ <h5>
551553
</section>
552554
<section class="level2" id="namespacing">
553555
<h2>Namespacing</h2>
554-
<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>
556+
<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>
557+
<p><span class="label">Note</span> Continue reading for <a href="#secure-apps">more specifics about secure apps</a>.</p>
555558
<section class="level3" id="namespacing-css">
556559
<h3>Namespacing CSS</h3>
557560
<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>
@@ -967,17 +970,17 @@ <h3>Considerations</h3>
967970
<hr>
968971

969972
<footer>
970-
<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>
971-
<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>
973+
<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>
974+
<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>
972975
</footer>
973976

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

976979
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
977-
<script src="./js/bootstrap.min.2.1.1.js"></script>
980+
<script src="./js/bootstrap.min.2.3.0.js"></script>
978981
<script src="./js/prettify.js"></script>
979-
<script src="./js/f2.js?1.0.3"></script>
980-
<script src="./js/docs.js?1.0.5"></script>
982+
<script src="./js/f2.js?1.1.0"></script>
983+
<script src="./js/docs.js?1.1.0"></script>
981984
<script>F2.extend('gitbranch', (function(){ return 'master'; }));</script>
982985
</body>
983986
</html>

0 commit comments

Comments
 (0)