Merge branch 'master' of https://github.com/kubernetes/kubernetes.github.io into release-1.8
* 'master' of https://github.com/kubernetes/kubernetes.github.io: Add noindex to vnext-staging Add note for 1.8 release. (#4632) fix create-cluster-kubeadm docs Update aws.md add newline above kube-apiserver Update scheduling-gpus.md Fix spacing with shell commands Documenting another (potential) callout issue (#4604) Update reference docs with most recent version of brodocs (#4600) Update kubernetes-api.md fix spelling mistake fix typos in fedration docs fix kubelet garbage collected typo fix typo in network-policies.md fix typo Add /_includes/glossary directory for snippets (#4628) Fixed typo in getting started guide using minikube Update to include Python library (#4624) Rename OWNERS assignees: to approvers:
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
> NOTE: Please check the “Allow edits from maintainers” box (see image below) to
|
||||
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> For 1.8 Features: set Milestone to `1.8` and Base Branch to `release-1.8`
|
||||
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>
|
||||
> NOTE: Please check the “Allow edits from maintainers” box (see image below) to
|
||||
> [allow reviewers to fix problems](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) on your patch and speed up the review process.
|
||||
>
|
||||
> Please delete this note before submitting the pull request.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- smarterclayton
|
||||
- janetkuo
|
||||
- pwittrock
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Instructions for Glossary snippets
|
||||
|
||||
Markdown snippets of glossary terms to be reused throughout the documentation should be placed in this directory.
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- k8s-merge-robot
|
||||
|
||||
title: 认识 Kubernetes?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- thockin
|
||||
title: CentOS
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- thockin
|
||||
title: Offline
|
||||
@@ -705,4 +705,4 @@ IaaS Provider | Config. Mgmt | OS | Networking | Docs
|
||||
-------------------- | ------------ | ------ | ---------- | --------------------------------------------- | ---------| ----------------------------
|
||||
Bare-metal (Offline) | CoreOS | CoreOS | flannel | [docs](/docs/getting-started-guides/coreos/bare_metal_offline) | | Community ([@jeffbean](https://github.com/jeffbean))
|
||||
|
||||
有关所有解决方案的支持级别信息,请参阅[解决方案列表](/docs/getting-started-guides/#table-of-solutions)。
|
||||
有关所有解决方案的支持级别信息,请参阅[解决方案列表](/docs/getting-started-guides/#table-of-solutions)。
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- k8s-merge-robot
|
||||
|
||||
title: 认识 Kubernetes?
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- derekwaynecarr
|
||||
- mikedanese
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- bgrant0607
|
||||
- erictune
|
||||
- lavalamp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- bprashanth
|
||||
- davidopp
|
||||
- derekwaynecarr
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- ericchiang
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- deads2k
|
||||
@@ -152,4 +152,4 @@ file:
|
||||
The apiserver will need to be restarted to pickup the new policy lines.
|
||||
|
||||
{% endcapture %}
|
||||
{% include templates/concept.md %}
|
||||
{% include templates/concept.md %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- deads2k
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- timstclair
|
||||
- deads2k
|
||||
- liggitt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- deads2k
|
||||
- liggitt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- erictune
|
||||
- lavalamp
|
||||
- deads2k
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- jbeda
|
||||
title: Authenticating with Bootstrap Tokens
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- davidopp
|
||||
- lavalamp
|
||||
title: Building Large Clusters
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- smarterclayton
|
||||
- lavalamp
|
||||
- whitlockjc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- madhusudancs
|
||||
- mml
|
||||
- nikhiljindal
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- madhusudancs
|
||||
- mml
|
||||
- nikhiljindal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- davidopp
|
||||
- lavalamp
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- mikedanese
|
||||
- luxas
|
||||
- errordeveloper
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- liggitt
|
||||
title: Kubelet authentication/authorization
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- ericchiang
|
||||
- mikedanese
|
||||
- jcbsmpsn
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- derekwaynecarr
|
||||
- janetkuo
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- davidopp
|
||||
- madhusudancs
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- jlowdermilk
|
||||
- justinsb
|
||||
- quinton-hoole
|
||||
@@ -74,7 +74,7 @@ located in a single zone. Users that want a highly available control
|
||||
plane should follow the [high availability](/docs/admin/high-availability) instructions.
|
||||
|
||||
|
||||
## Walkthough
|
||||
## Walkthrough
|
||||
|
||||
We're now going to walk through setting up and using a multi-zone
|
||||
cluster on both GCE & AWS. To do so, you bring up a full cluster
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- derekwaynecarr
|
||||
- janetkuo
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- Random-Liu
|
||||
title: Validate Node Setup
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- thockin
|
||||
title: Kubernetes OpenVSwitch GRE/VxLAN networking
|
||||
---
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
assignees:
|
||||
approvers:
|
||||
- derekwaynecarr
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- davidopp
|
||||
title: Configuring Kubernetes with Salt
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
assignees:
|
||||
approvers:
|
||||
- bprashanth
|
||||
- davidopp
|
||||
- lavalamp
|
||||
|
||||
@@ -153,7 +153,7 @@ function generateNestedNav(parent, nest) {
|
||||
|
||||
function generateNavJson(data) {
|
||||
var navJson = JSON.stringify(data);
|
||||
navScript = `(function(){navData = ${navJson}})();`;
|
||||
navScript = `(function(){navData = ${navJson};})();`;
|
||||
fs.writeFile('./navData.js', navScript, function(err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
|
||||
+2505
-2086
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-2
@@ -59,8 +59,7 @@ publishTask('ejs', ['build'], function () {
|
||||
'package.json',
|
||||
'ejs.js',
|
||||
'ejs.min.js',
|
||||
'lib/**',
|
||||
'test/**'
|
||||
'lib/**'
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ Embedded JavaScript templates
|
||||
|
||||
[](https://travis-ci.org/mde/ejs)
|
||||
[](https://david-dm.org/mde/ejs?type=dev)
|
||||
[](https://snyk.io/test/npm/ejs)
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
+73
-48
@@ -122,16 +122,36 @@ exports.resolveInclude = function(name, filename, isDir) {
|
||||
* @param {Options} options compilation options
|
||||
* @return {String}
|
||||
*/
|
||||
function getIncludePath(path, options){
|
||||
function getIncludePath(path, options) {
|
||||
var includePath;
|
||||
var filePath;
|
||||
var views = options.views;
|
||||
|
||||
// Abs path
|
||||
if (path.charAt(0) == '/') {
|
||||
includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
|
||||
}
|
||||
// Relative paths
|
||||
else {
|
||||
if (!options.filename) {
|
||||
throw new Error('`include` use relative path requires the \'filename\' option.');
|
||||
// Look relative to a passed filename first
|
||||
if (options.filename) {
|
||||
filePath = exports.resolveInclude(path, options.filename);
|
||||
if (fs.existsSync(filePath)) {
|
||||
includePath = filePath;
|
||||
}
|
||||
}
|
||||
// Then look in any views directories
|
||||
if (!includePath) {
|
||||
if (Array.isArray(views) && views.some(function (v) {
|
||||
filePath = exports.resolveInclude(path, v, true);
|
||||
return fs.existsSync(filePath);
|
||||
})) {
|
||||
includePath = filePath;
|
||||
}
|
||||
}
|
||||
if (!includePath) {
|
||||
throw new Error('Could not find include include file.');
|
||||
}
|
||||
includePath = exports.resolveInclude(path, options.filename);
|
||||
}
|
||||
return includePath;
|
||||
}
|
||||
@@ -391,8 +411,13 @@ exports.renderFile = function () {
|
||||
// in the data, copy them to options
|
||||
if (arguments.length === 3) {
|
||||
// Express 4
|
||||
if (data.settings && data.settings['view options']) {
|
||||
utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS);
|
||||
if (data.settings) {
|
||||
if (data.settings['view options']) {
|
||||
utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS);
|
||||
}
|
||||
if (data.settings.views) {
|
||||
opts.views = data.settings.views;
|
||||
}
|
||||
}
|
||||
// Express 3 and lower
|
||||
else {
|
||||
@@ -443,6 +468,7 @@ function Template(text, opts) {
|
||||
options.rmWhitespace = opts.rmWhitespace;
|
||||
options.root = opts.root;
|
||||
options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
|
||||
options.views = opts.views;
|
||||
|
||||
if (options.strict) {
|
||||
options._with = false;
|
||||
@@ -506,10 +532,6 @@ Template.prototype = {
|
||||
src = this.source;
|
||||
}
|
||||
|
||||
if (opts.debug) {
|
||||
console.log(src);
|
||||
}
|
||||
|
||||
if (opts.client) {
|
||||
src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
|
||||
if (opts.compileDebug) {
|
||||
@@ -520,6 +542,9 @@ Template.prototype = {
|
||||
if (opts.strict) {
|
||||
src = '"use strict";\n' + src;
|
||||
}
|
||||
if (opts.debug) {
|
||||
console.log(src);
|
||||
}
|
||||
|
||||
try {
|
||||
fn = new Function(opts.localsName + ', escapeFn, include, rethrow', src);
|
||||
@@ -612,7 +637,7 @@ Template.prototype = {
|
||||
+ ' try {' + '\n'
|
||||
+ includeObj.source
|
||||
+ ' } catch (e) {' + '\n'
|
||||
+ ' rethrow(e, __lines, __filename, __line);' + '\n'
|
||||
+ ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
|
||||
+ ' }' + '\n'
|
||||
+ ' ; }).call(this)' + '\n';
|
||||
}else{
|
||||
@@ -658,43 +683,43 @@ Template.prototype = {
|
||||
return arr;
|
||||
},
|
||||
|
||||
_addOutput: function (line) {
|
||||
if (this.truncate) {
|
||||
// Only replace single leading linebreak in the line after
|
||||
// -%> tag -- this is the single, trailing linebreak
|
||||
// after the tag that the truncation mode replaces
|
||||
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
|
||||
// combo first in the regex-or
|
||||
line = line.replace(/^(?:\r\n|\r|\n)/, '');
|
||||
this.truncate = false;
|
||||
}
|
||||
else if (this.opts.rmWhitespace) {
|
||||
// rmWhitespace has already removed trailing spaces, just need
|
||||
// to remove linebreaks
|
||||
line = line.replace(/^\n/, '');
|
||||
}
|
||||
if (!line) {
|
||||
return line;
|
||||
}
|
||||
|
||||
// Preserve literal slashes
|
||||
line = line.replace(/\\/g, '\\\\');
|
||||
|
||||
// Convert linebreaks
|
||||
line = line.replace(/\n/g, '\\n');
|
||||
line = line.replace(/\r/g, '\\r');
|
||||
|
||||
// Escape double-quotes
|
||||
// - this will be the delimiter during execution
|
||||
line = line.replace(/"/g, '\\"');
|
||||
this.source += ' ; __append("' + line + '")' + '\n';
|
||||
},
|
||||
|
||||
scanLine: function (line) {
|
||||
var self = this;
|
||||
var d = this.opts.delimiter;
|
||||
var newLineCount = 0;
|
||||
|
||||
function _addOutput() {
|
||||
if (self.truncate) {
|
||||
// Only replace single leading linebreak in the line after
|
||||
// -%> tag -- this is the single, trailing linebreak
|
||||
// after the tag that the truncation mode replaces
|
||||
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
|
||||
// combo first in the regex-or
|
||||
line = line.replace(/^(?:\r\n|\r|\n)/, '');
|
||||
self.truncate = false;
|
||||
}
|
||||
else if (self.opts.rmWhitespace) {
|
||||
// rmWhitespace has already removed trailing spaces, just need
|
||||
// to remove linebreaks
|
||||
line = line.replace(/^\n/, '');
|
||||
}
|
||||
if (!line) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Preserve literal slashes
|
||||
line = line.replace(/\\/g, '\\\\');
|
||||
|
||||
// Convert linebreaks
|
||||
line = line.replace(/\n/g, '\\n');
|
||||
line = line.replace(/\r/g, '\\r');
|
||||
|
||||
// Escape double-quotes
|
||||
// - this will be the delimiter during execution
|
||||
line = line.replace(/"/g, '\\"');
|
||||
self.source += ' ; __append("' + line + '")' + '\n';
|
||||
}
|
||||
|
||||
newLineCount = (line.split('\n').length - 1);
|
||||
|
||||
switch (line) {
|
||||
@@ -723,7 +748,7 @@ Template.prototype = {
|
||||
case '-' + d + '>':
|
||||
case '_' + d + '>':
|
||||
if (this.mode == Template.modes.LITERAL) {
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
}
|
||||
|
||||
this.mode = null;
|
||||
@@ -759,13 +784,13 @@ Template.prototype = {
|
||||
break;
|
||||
// Literal <%% mode, append as raw output
|
||||
case Template.modes.LITERAL:
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// In string mode, just add the output
|
||||
else {
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1428,7 +1453,7 @@ module.exports={
|
||||
"engine",
|
||||
"ejs"
|
||||
],
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.6",
|
||||
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
|
||||
"contributors": [
|
||||
"Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"
|
||||
@@ -1457,7 +1482,7 @@ module.exports={
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"test": "jake test",
|
||||
"lint": "eslint \"**/*.js\" Jakefile",
|
||||
"coverage": "istanbul cover node_modules/mocha/bin/_mocha",
|
||||
"doc": "jake doc",
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+71
-46
@@ -121,16 +121,36 @@ exports.resolveInclude = function(name, filename, isDir) {
|
||||
* @param {Options} options compilation options
|
||||
* @return {String}
|
||||
*/
|
||||
function getIncludePath(path, options){
|
||||
function getIncludePath(path, options) {
|
||||
var includePath;
|
||||
var filePath;
|
||||
var views = options.views;
|
||||
|
||||
// Abs path
|
||||
if (path.charAt(0) == '/') {
|
||||
includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
|
||||
}
|
||||
// Relative paths
|
||||
else {
|
||||
if (!options.filename) {
|
||||
throw new Error('`include` use relative path requires the \'filename\' option.');
|
||||
// Look relative to a passed filename first
|
||||
if (options.filename) {
|
||||
filePath = exports.resolveInclude(path, options.filename);
|
||||
if (fs.existsSync(filePath)) {
|
||||
includePath = filePath;
|
||||
}
|
||||
}
|
||||
// Then look in any views directories
|
||||
if (!includePath) {
|
||||
if (Array.isArray(views) && views.some(function (v) {
|
||||
filePath = exports.resolveInclude(path, v, true);
|
||||
return fs.existsSync(filePath);
|
||||
})) {
|
||||
includePath = filePath;
|
||||
}
|
||||
}
|
||||
if (!includePath) {
|
||||
throw new Error('Could not find include include file.');
|
||||
}
|
||||
includePath = exports.resolveInclude(path, options.filename);
|
||||
}
|
||||
return includePath;
|
||||
}
|
||||
@@ -390,8 +410,13 @@ exports.renderFile = function () {
|
||||
// in the data, copy them to options
|
||||
if (arguments.length === 3) {
|
||||
// Express 4
|
||||
if (data.settings && data.settings['view options']) {
|
||||
utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS);
|
||||
if (data.settings) {
|
||||
if (data.settings['view options']) {
|
||||
utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS);
|
||||
}
|
||||
if (data.settings.views) {
|
||||
opts.views = data.settings.views;
|
||||
}
|
||||
}
|
||||
// Express 3 and lower
|
||||
else {
|
||||
@@ -442,6 +467,7 @@ function Template(text, opts) {
|
||||
options.rmWhitespace = opts.rmWhitespace;
|
||||
options.root = opts.root;
|
||||
options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
|
||||
options.views = opts.views;
|
||||
|
||||
if (options.strict) {
|
||||
options._with = false;
|
||||
@@ -505,10 +531,6 @@ Template.prototype = {
|
||||
src = this.source;
|
||||
}
|
||||
|
||||
if (opts.debug) {
|
||||
console.log(src);
|
||||
}
|
||||
|
||||
if (opts.client) {
|
||||
src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
|
||||
if (opts.compileDebug) {
|
||||
@@ -519,6 +541,9 @@ Template.prototype = {
|
||||
if (opts.strict) {
|
||||
src = '"use strict";\n' + src;
|
||||
}
|
||||
if (opts.debug) {
|
||||
console.log(src);
|
||||
}
|
||||
|
||||
try {
|
||||
fn = new Function(opts.localsName + ', escapeFn, include, rethrow', src);
|
||||
@@ -611,7 +636,7 @@ Template.prototype = {
|
||||
+ ' try {' + '\n'
|
||||
+ includeObj.source
|
||||
+ ' } catch (e) {' + '\n'
|
||||
+ ' rethrow(e, __lines, __filename, __line);' + '\n'
|
||||
+ ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
|
||||
+ ' }' + '\n'
|
||||
+ ' ; }).call(this)' + '\n';
|
||||
}else{
|
||||
@@ -657,43 +682,43 @@ Template.prototype = {
|
||||
return arr;
|
||||
},
|
||||
|
||||
_addOutput: function (line) {
|
||||
if (this.truncate) {
|
||||
// Only replace single leading linebreak in the line after
|
||||
// -%> tag -- this is the single, trailing linebreak
|
||||
// after the tag that the truncation mode replaces
|
||||
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
|
||||
// combo first in the regex-or
|
||||
line = line.replace(/^(?:\r\n|\r|\n)/, '');
|
||||
this.truncate = false;
|
||||
}
|
||||
else if (this.opts.rmWhitespace) {
|
||||
// rmWhitespace has already removed trailing spaces, just need
|
||||
// to remove linebreaks
|
||||
line = line.replace(/^\n/, '');
|
||||
}
|
||||
if (!line) {
|
||||
return line;
|
||||
}
|
||||
|
||||
// Preserve literal slashes
|
||||
line = line.replace(/\\/g, '\\\\');
|
||||
|
||||
// Convert linebreaks
|
||||
line = line.replace(/\n/g, '\\n');
|
||||
line = line.replace(/\r/g, '\\r');
|
||||
|
||||
// Escape double-quotes
|
||||
// - this will be the delimiter during execution
|
||||
line = line.replace(/"/g, '\\"');
|
||||
this.source += ' ; __append("' + line + '")' + '\n';
|
||||
},
|
||||
|
||||
scanLine: function (line) {
|
||||
var self = this;
|
||||
var d = this.opts.delimiter;
|
||||
var newLineCount = 0;
|
||||
|
||||
function _addOutput() {
|
||||
if (self.truncate) {
|
||||
// Only replace single leading linebreak in the line after
|
||||
// -%> tag -- this is the single, trailing linebreak
|
||||
// after the tag that the truncation mode replaces
|
||||
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
|
||||
// combo first in the regex-or
|
||||
line = line.replace(/^(?:\r\n|\r|\n)/, '');
|
||||
self.truncate = false;
|
||||
}
|
||||
else if (self.opts.rmWhitespace) {
|
||||
// rmWhitespace has already removed trailing spaces, just need
|
||||
// to remove linebreaks
|
||||
line = line.replace(/^\n/, '');
|
||||
}
|
||||
if (!line) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Preserve literal slashes
|
||||
line = line.replace(/\\/g, '\\\\');
|
||||
|
||||
// Convert linebreaks
|
||||
line = line.replace(/\n/g, '\\n');
|
||||
line = line.replace(/\r/g, '\\r');
|
||||
|
||||
// Escape double-quotes
|
||||
// - this will be the delimiter during execution
|
||||
line = line.replace(/"/g, '\\"');
|
||||
self.source += ' ; __append("' + line + '")' + '\n';
|
||||
}
|
||||
|
||||
newLineCount = (line.split('\n').length - 1);
|
||||
|
||||
switch (line) {
|
||||
@@ -722,7 +747,7 @@ Template.prototype = {
|
||||
case '-' + d + '>':
|
||||
case '_' + d + '>':
|
||||
if (this.mode == Template.modes.LITERAL) {
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
}
|
||||
|
||||
this.mode = null;
|
||||
@@ -758,13 +783,13 @@ Template.prototype = {
|
||||
break;
|
||||
// Literal <%% mode, append as raw output
|
||||
case Template.modes.LITERAL:
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// In string mode, just add the output
|
||||
else {
|
||||
_addOutput();
|
||||
this._addOutput(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -14,13 +14,13 @@
|
||||
]
|
||||
],
|
||||
"_from": "ejs@>=2.5.2 <3.0.0",
|
||||
"_id": "ejs@2.5.6",
|
||||
"_id": "ejs@2.5.7",
|
||||
"_inCache": true,
|
||||
"_location": "/ejs",
|
||||
"_nodeVersion": "6.9.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/ejs-2.5.6.tgz_1487277787176_0.4875628533773124"
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/ejs-2.5.7.tgz_1501385411193_0.3807816591579467"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "mde",
|
||||
@@ -40,8 +40,8 @@
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz",
|
||||
"_shasum": "479636bfa3fe3b1debd52087f0acb204b4f19c88",
|
||||
"_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz",
|
||||
"_shasum": "cc872c168880ae3c7189762fd5ffc00896c9518a",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ejs@^2.5.2",
|
||||
"_where": "/brodocs",
|
||||
@@ -75,8 +75,8 @@
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "479636bfa3fe3b1debd52087f0acb204b4f19c88",
|
||||
"tarball": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz"
|
||||
"shasum": "cc872c168880ae3c7189762fd5ffc00896c9518a",
|
||||
"tarball": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
@@ -107,7 +107,7 @@
|
||||
"devdoc": "jake doc[dev]",
|
||||
"doc": "jake doc",
|
||||
"lint": "eslint \"**/*.js\" Jakefile",
|
||||
"test": "mocha"
|
||||
"test": "jake test"
|
||||
},
|
||||
"version": "2.5.6"
|
||||
"version": "2.5.7"
|
||||
}
|
||||
|
||||
-1039
File diff suppressed because it is too large
Load Diff
-1
@@ -1 +0,0 @@
|
||||
\foo
|
||||
-1
@@ -1 +0,0 @@
|
||||
\foo
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
<li><a href="foo"><% // double-slash comment %>foo</li>
|
||||
<li><a href="bar"><% /* C-style comment */ %>bar</li>
|
||||
<li><a href="baz"><% // double-slash comment with newline
|
||||
%>baz</li>
|
||||
<li><a href="qux"><% var x = 'qux'; // double-slash comment @ end of line %><%= x %></li>
|
||||
<li><a href="fee"><%# ERB style comment %>fee</li>
|
||||
<li><a href="bah"><%= 'not a ' + '//' + ' comment' %></a></li>
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
<li><a href="foo">foo</li>
|
||||
<li><a href="bar">bar</li>
|
||||
<li><a href="baz">baz</li>
|
||||
<li><a href="qux">qux</li>
|
||||
<li><a href="fee">fee</li>
|
||||
<li><a href="bah">not a // comment</a></li>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<% var a = 'foo' %><% var b = 'bar' %><%= a %>
|
||||
-1
@@ -1 +0,0 @@
|
||||
foo
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p><%= "lo" + 'ki' %>'s "wheelchair"</p>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p>loki's "wheelchair"</p>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<% if (users) { %>
|
||||
<p>Has users</p>
|
||||
<% } %>
|
||||
</ul>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
ReferenceError: error.ejs:2
|
||||
1| <ul>
|
||||
>> 2| <% if (users) { %>
|
||||
3| <p>Has users</p>
|
||||
4| <% } %>
|
||||
5| </ul>
|
||||
|
||||
users is not defined
|
||||
-1
@@ -1 +0,0 @@
|
||||
<% function foo() return 'foo'; %>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p>Hello world!</p>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<@ pets.forEach(function(pet){ @>
|
||||
<@- include(path.join(dir, 'pet'), {pet: pet}); @>
|
||||
<@ }); @>
|
||||
</ul>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<@- include('/include'); @>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<ul>
|
||||
<%- include('hello-world'); %>
|
||||
</ul>
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
<ul>
|
||||
<p>Hello world!</p>
|
||||
|
||||
</ul>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<style><%- include('style.css', {value: 'bar'}); %></style>
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
<style>body {
|
||||
foo: 'bar';
|
||||
}
|
||||
</style>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<@ pets.forEach(function(pet){ @>
|
||||
<@- include('pet', {pet: pet}); @>
|
||||
<@ }); @>
|
||||
</ul>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<ul>
|
||||
|
||||
<li>geddy</li>
|
||||
|
||||
|
||||
<li>neil</li>
|
||||
|
||||
|
||||
<li>alex</li>
|
||||
|
||||
|
||||
</ul>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<%- include('../tmp/include') %>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p>Old</p>
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
<style><% var value = 'bar' %><% include style.css %></style>
|
||||
Generated
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
<style>body {
|
||||
foo: 'bar';
|
||||
}
|
||||
</style>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<@ pets.forEach(function(pet){ @>
|
||||
<@ include pet @>
|
||||
<@ }) @>
|
||||
</ul>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<ul>
|
||||
|
||||
<li>geddy</li>
|
||||
|
||||
|
||||
<li>neil</li>
|
||||
|
||||
|
||||
<li>alex</li>
|
||||
|
||||
|
||||
</ul>
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
<%- include ../tmp/include_preprocessor %>
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
<p>Old</p>
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
<% include include_preprocessor_line_slurp_child %>
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
<div>
|
||||
12
|
||||
3
|
||||
45
|
||||
</div>
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
<div>
|
||||
1 <%_ if (true) { _%> 2
|
||||
3
|
||||
4 <%_ } _%> 5
|
||||
</div>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p>This is a file with BOM.</p>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<li><% include menu/item %></li>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<a href="/<%= url %>"><%= title %></a>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<pre>There should be a space followed by a less-than sign and then two more
|
||||
spaces in the next line:
|
||||
< .</pre>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<pre>There should be a space followed by a less-than sign and then two more
|
||||
spaces in the next line:
|
||||
< .</pre>
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
<%- include('includes/menu-item', {
|
||||
url: '/foo'
|
||||
, title: 'Foo'
|
||||
}); -%>
|
||||
|
||||
<%- include('includes/menu-item', {
|
||||
url: '/bar'
|
||||
, title: 'Bar'
|
||||
}); -%>
|
||||
|
||||
<%- include('includes/menu-item', {
|
||||
url: '/baz'
|
||||
, title: 'Baz'
|
||||
}); -%>
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
<li><a href="//foo">Foo</a>
|
||||
</li>
|
||||
|
||||
<li><a href="//bar">Bar</a>
|
||||
</li>
|
||||
|
||||
<li><a href="//baz">Baz</a>
|
||||
</li>
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
<% var url = '/foo' -%>
|
||||
<% var title = 'Foo' -%>
|
||||
<% include includes/menu-item -%>
|
||||
|
||||
<% var url = '/bar' -%>
|
||||
<% var title = 'Bar' -%>
|
||||
<% include includes/menu-item -%>
|
||||
|
||||
<% var url = '/baz' -%>
|
||||
<% var title = 'Baz' -%>
|
||||
<% include includes/menu-item -%>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
<li><a href="//foo">Foo</a>
|
||||
</li>
|
||||
|
||||
<li><a href="//bar">Bar</a>
|
||||
</li>
|
||||
|
||||
<li><a href="//baz">Baz</a>
|
||||
</li>
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
<%- include(varPath, {
|
||||
url: '/foo'
|
||||
, title: 'Foo'
|
||||
}); -%>
|
||||
|
||||
<%- include(varPath, {
|
||||
url: '/bar'
|
||||
, title: 'Bar'
|
||||
}); -%>
|
||||
|
||||
<%- include(varPath, {
|
||||
url: '/baz'
|
||||
, title: 'Baz'
|
||||
}); -%>
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
<ul><%users.forEach(function(user){%><li><%=user.name%></li><%})%></ul>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<ul><li>geddy</li><li>neil</li><li>alex</li></ul>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<% users.forEach(function(user){ %>
|
||||
<li><%= user.name %></li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
<ul>
|
||||
|
||||
<li>geddy</li>
|
||||
|
||||
<li>neil</li>
|
||||
|
||||
<li>alex</li>
|
||||
|
||||
</ul>
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
<ul>
|
||||
<% var unused1 = 'blah' -%>
|
||||
<% var unused2 = 'bleh' %>
|
||||
<% var unused3 = 'bloh' -%>
|
||||
<% var unused4 = 'bluh' %>
|
||||
</ul>
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
<ul>
|
||||
|
||||
|
||||
</ul>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<% users.forEach(function(user){ -%>
|
||||
<li><%= user.name %></li>
|
||||
<% }) -%>
|
||||
</ul>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
AAA
|
||||
<% var data = "test"; -%>
|
||||
BBB
|
||||
<%= qdata %>
|
||||
CCC
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<ul>
|
||||
<li>geddy</li>
|
||||
<li>neil</li>
|
||||
<li>alex</li>
|
||||
</ul>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
This document does not use semicolons in scriptlets.
|
||||
<%
|
||||
var a = 'b'
|
||||
var b = 'c'
|
||||
var c
|
||||
c = b
|
||||
%>
|
||||
The value of c is: <%= c %>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
This document does not use semicolons in scriptlets.
|
||||
|
||||
The value of c is: c
|
||||
-1
@@ -1 +0,0 @@
|
||||
<p>hey</p>
|
||||
-1
@@ -1 +0,0 @@
|
||||
<li><@= pet.name @></li>
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
<tag1>
|
||||
<tag2>
|
||||
A very long piece of text very long piece of text very long piece of
|
||||
text very long piece <% var f = 'f' %>of text very long piece of
|
||||
tex
t very long piece of<% %>text very long
|
||||
adsffadsfadsfad<%= f %>
|
||||
|
||||
piece of text.
|
||||
<% var a = 'a' %>
|
||||
Text again.
|
||||
<% var b = 'b' %>
|
||||
<% var c = 'c'
|
||||
var d = 'd' %>
|
||||
Another text. <%= c %>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
<tag1>
|
||||
<tag2>
|
||||
A very long piece of text very long piece of text very long piece of
|
||||
text very long piece of text very long piece of
|
||||
text very long piece oftext very long
|
||||
adsffadsfadsfadfpiece of text.
|
||||
Text again.
|
||||
Another text. c
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user