Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force line ending to lf #4

Merged
merged 1 commit into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary
* text !filter !merge !diff
* text !filter !merge !diff
* text=auto eol=lf
*.txt text=auto !eol

*.png -text
*.jpg -text
*.gif -text
*.pdf -text
30 changes: 15 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.cache-loader
node_modules
dist
nyc
*.log
# Rush: Temporary files
common/temp
# Rush: Incremental build state (must ignore, see 'rush build -h')
package-deps.json
*.tsbuildinfo
# Temporary api-extractor build artifacts
.cache-loader
node_modules
dist
nyc
*.log

# Rush: Temporary files
common/temp

# Rush: Incremental build state (must ignore, see 'rush build -h')
package-deps.json

*.tsbuildinfo

# Temporary api-extractor build artifacts
packages/_api-extractor-temp/**
50 changes: 25 additions & 25 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "fluid-build",
"type": "process",
"command": "node",
"args": [
"${workspaceRoot}/tools/fluid-build/dist/fluidBuild.js",
"--root",
"${workspaceRoot}",
"--vscode"
],
"group": "build",
"problemMatcher": [
{
"base": "$tsc",
"fileLocation": "absolute",
},
"$tslint5"
]
}
]
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "fluid-build",
"type": "process",
"command": "node",
"args": [
"${workspaceRoot}/tools/fluid-build/dist/fluidBuild.js",
"--root",
"${workspaceRoot}",
"--vscode"
],
"group": "build",
"problemMatcher": [
{
"base": "$tsc",
"fileLocation": "absolute",
},
"$tslint5"
]
}
]
}
54 changes: 27 additions & 27 deletions docs/api_overview.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Fluid Framework API overview
## Framework
Base classes and interfaces for Fluid Framework that implements basic default behavior of components and containers.
## Distributed Data Structure
Distributed data structures (DDS) that allow real time sharing of states across clients. There are two types of DDS:
* `Shared*` - distributed data structures which are based on eventual consistency; that is, these data structures
eagerly update local state on changes and resolve conflicting changes on the client as operations are sequenced by
the ordering service
* `Consensus*` - distributed data structures which are based on consensus; that is, operations are only applied
*after* they are sequenced by the ordering service
## Runtime
Runtime interfaces and implementation.
## Loader
Loader for host pages to load a Fluid container, or just a component within the container.
## Driver
Client driver that implements the protocols that talks to a Fluid service backend (the ordering and storage services).
# Fluid Framework API overview

## Framework

Base classes and interfaces for Fluid Framework that implements basic default behavior of components and containers.

## Distributed Data Structure

Distributed data structures (DDS) that allow real time sharing of states across clients. There are two types of DDS:

* `Shared*` - distributed data structures which are based on eventual consistency; that is, these data structures
eagerly update local state on changes and resolve conflicting changes on the client as operations are sequenced by
the ordering service
* `Consensus*` - distributed data structures which are based on consensus; that is, operations are only applied
*after* they are sequenced by the ordering service

## Runtime

Runtime interfaces and implementation.

## Loader

Loader for host pages to load a Fluid container, or just a component within the container.

## Driver

Client driver that implements the protocols that talks to a Fluid service backend (the ordering and storage services).
178 changes: 89 additions & 89 deletions docs/templates/fluid/UniversalReference.extension.js
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.
/**
* This method will be called at the start of exports.transform in UniversalReference.html.primary.js
*/
exports.preTransform = function (model) {
return model;
}
/**
* This method will be called at the end of exports.transform in UniversalReference.html.primary.js
*/
exports.postTransform = function (model) {
// The model is the data in the yml file after the default transform done by UniversalReference.common.js in the default template
// The default template can be viewed via "docfx template export default" command
if (model.isClass && model.children) {
// Split the properties and method group into protected/static groups
const children = [];
const protectedChildren = [];
model.children.forEach(function (c) {
if (c.inMethod && c.children) {
stripVoidReturn(c.children);
splitProtectStatic(children, protectedChildren, c, "Method", "methods");
} else if (c.inProperty && c.children) {
splitProtectStatic(children, protectedChildren, c, "Property", "properties");
} else {
children.push(c);
}
});
model.children = children.concat(protectedChildren)
}
return model;
}
function stripVoidReturn(children) {
// If the return type is void, remove it so that it doesn't show up
children.forEach(function (m) {
try {
if (m.syntax.return[0].value.type[0].uid === "void") {
m.syntax.return = undefined;
}
} catch (e) {
}
});
}
function initGroup(prefix, name, idPrefix, idName) {
const group = {};
const inName = "in" + prefix + name;
const id = idPrefix ? idPrefix + "_" + idName : idName
group[inName] = true;
group.typePropertyName = inName;
group.id = id;
group.children = [];
return group;
}
function splitProtectStatic(children, protectedChildren, c, name, idName) {
const group = initGroup("", name, undefined, idName);
const protectedGroup = initGroup("Protected", name, "protected", idName);
const staticGroup = initGroup("Static", name, "static", idName);
const protectedStaticGroup = initGroup("ProtectedStatic", name, "protected_static", idName);
c.children.forEach(function (m) {
const name = m.syntax && m.syntax.content && m.syntax.content[0]
&& m.syntax.content[0].value ? m.syntax.content[0].value : ""
if (name.indexOf("protected static ") === 0) {
protectedStaticGroup.children.push(m);
} else if (name.indexOf("protected ") === 0) {
protectedGroup.children.push(m);
} else if (name.indexOf("static ") === 0) {
staticGroup.children.push(m);
} else {
group.children.push(m);
}
});
if (staticGroup.children.length > 0) {
children.push(staticGroup);
}
if (group.children.length > 0) {
children.push(group);
}
if (protectedStaticGroup.children.length > 0) {
protectedChildren.push(protectedStaticGroup);
}
if (protectedGroup.children.length > 0) {
protectedChildren.push(protectedGroup);
}
}
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.

/**
* This method will be called at the start of exports.transform in UniversalReference.html.primary.js
*/
exports.preTransform = function (model) {
return model;
}

/**
* This method will be called at the end of exports.transform in UniversalReference.html.primary.js
*/
exports.postTransform = function (model) {
// The model is the data in the yml file after the default transform done by UniversalReference.common.js in the default template
// The default template can be viewed via "docfx template export default" command
if (model.isClass && model.children) {
// Split the properties and method group into protected/static groups
const children = [];
const protectedChildren = [];
model.children.forEach(function (c) {
if (c.inMethod && c.children) {
stripVoidReturn(c.children);
splitProtectStatic(children, protectedChildren, c, "Method", "methods");
} else if (c.inProperty && c.children) {
splitProtectStatic(children, protectedChildren, c, "Property", "properties");
} else {
children.push(c);
}
});
model.children = children.concat(protectedChildren)
}
return model;
}

function stripVoidReturn(children) {
// If the return type is void, remove it so that it doesn't show up
children.forEach(function (m) {
try {
if (m.syntax.return[0].value.type[0].uid === "void") {
m.syntax.return = undefined;
}
} catch (e) {
}
});
}

function initGroup(prefix, name, idPrefix, idName) {
const group = {};
const inName = "in" + prefix + name;
const id = idPrefix ? idPrefix + "_" + idName : idName
group[inName] = true;
group.typePropertyName = inName;
group.id = id;
group.children = [];
return group;

}
function splitProtectStatic(children, protectedChildren, c, name, idName) {
const group = initGroup("", name, undefined, idName);
const protectedGroup = initGroup("Protected", name, "protected", idName);
const staticGroup = initGroup("Static", name, "static", idName);
const protectedStaticGroup = initGroup("ProtectedStatic", name, "protected_static", idName);
c.children.forEach(function (m) {
const name = m.syntax && m.syntax.content && m.syntax.content[0]
&& m.syntax.content[0].value ? m.syntax.content[0].value : ""
if (name.indexOf("protected static ") === 0) {
protectedStaticGroup.children.push(m);
} else if (name.indexOf("protected ") === 0) {
protectedGroup.children.push(m);
} else if (name.indexOf("static ") === 0) {
staticGroup.children.push(m);
} else {
group.children.push(m);
}
});
if (staticGroup.children.length > 0) {
children.push(staticGroup);
}
if (group.children.length > 0) {
children.push(group);
}
if (protectedStaticGroup.children.length > 0) {
protectedChildren.push(protectedStaticGroup);
}
if (protectedGroup.children.length > 0) {
protectedChildren.push(protectedGroup);
}
}

Loading