Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
patternlibrary
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
js
patternlibrary
Commits
536e69d7
Commit
536e69d7
authored
May 11, 2018
by
Björn Bartels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some 'scrutinizer' issues
parent
0dfdb8de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
build-docs.js
lib/patternlibrary/build-docs.js
+1
-0
load-data.js
lib/patternlibrary/load-data.js
+2
-2
load-helpers.js
lib/patternlibrary/load-helpers.js
+1
-1
render-page.js
lib/patternlibrary/render-page.js
+1
-1
No files found.
lib/patternlibrary/build-docs.js
View file @
536e69d7
...
...
@@ -82,6 +82,7 @@ function buildDocs() {
// build the doc page...
var
pageSource
=
this
.
renderdocs
(
data
);
/** global: Buffer */
file
.
contents
=
new
Buffer
(
pageSource
);
// Write new file to disk if necessary
...
...
lib/patternlibrary/load-data.js
View file @
536e69d7
...
...
@@ -18,10 +18,10 @@ module.exports = function(dir) {
if
(
ext
===
'.json'
||
ext
===
'.js'
)
{
delete
require
.
cache
[
require
.
resolve
(
dataFiles
[
i
])];
data
=
require
(
dataFiles
[
i
])
let
data
=
require
(
dataFiles
[
i
])
}
else
if
(
ext
===
'.yml'
)
{
data
=
yaml
.
safeLoad
(
fs
.
readFileSync
(
dataFiles
[
i
]));
let
data
=
yaml
.
safeLoad
(
fs
.
readFileSync
(
dataFiles
[
i
]));
}
this
.
data
[
name
]
=
data
;
...
...
lib/patternlibrary/load-helpers.js
View file @
536e69d7
...
...
@@ -23,7 +23,7 @@ function loadHandlebarsHelpers (dir) {
this
.
handlebars
.
registerHelper
(
name
,
helper
);
}
catch
(
e
)
{
console
.
warn
(
'Error when loading '
+
name
+
'.js as a Handlebars helper.'
,
helper
,
e
);
console
.
warn
(
'Error when loading '
+
name
+
'.js as a Handlebars helper.'
,
e
);
}
}
}
...
...
lib/patternlibrary/render-page.js
View file @
536e69d7
...
...
@@ -57,7 +57,7 @@ function renderPage ( page_src, page_target, data, markdown ) {
pageSource
=
String
(
pageSource
).
replace
(
'{__MDBODY__}'
,
markdown
);
}
/** global: Buffer */
var
filecontents
=
new
Buffer
(
pageSource
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment