Skip to content

Commit

Permalink
issue38, update dependencies for nunjucks and others; update sources …
Browse files Browse the repository at this point in the history
…to new (stricter) rules of standard (#39)
  • Loading branch information
smartiniOnGitHub authored and mcollina committed Feb 23, 2018
1 parent fbbda84 commit 03c8a22
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion example-ejs-with-some-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fastify.register(require('./index'), {
options: {
filename: resolve(templatesFolder)
},
charset: 'utf-8' // sample usage, but specifying the same value already used as default
charset: 'utf-8' // sample usage, but specifying the same value already used as default
})

fastify.get('/', (req, reply) => {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
},
"homepage": "https://github.com/fastify/point-of-view#readme",
"dependencies": {
"fastify-plugin": "^0.2.1",
"fastify-plugin": "^0.2.2",
"hashlru": "^2.2.1"
},
"devDependencies": {
"cross-env": "^5.1.3",
"ejs": "^2.5.7",
"ejs-mate": "^2.3.0",
"express": "^4.16.2",
"fastify": "^0.41.0",
"fastify": "^0.43.0",
"handlebars": "^4.0.11",
"marko": "^4.7.5",
"nunjucks": "^3.0.1",
"nunjucks": "^3.1.0",
"pre-commit": "^1.2.2",
"pug": "^2.0.0-rc.4",
"request": "^2.83.0",
"standard": "^10.0.3",
"tap": "^11.0.1"
"standard": "^11.0.0",
"tap": "^11.1.1"
},
"standard": {
"ignore": [
Expand Down
10 changes: 5 additions & 5 deletions test-with-snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ test('reply.view with ejs engine, template folder specified, include files (ejs
const resolve = require('path').resolve
const templatesFolder = 'templates'
const options = {
filename: resolve(templatesFolder), // needed for include files to be resolved in include directive ...
views: [__dirname] // must be put to make tests (with include files) working ...
filename: resolve(templatesFolder), // needed for include files to be resolved in include directive ...
views: [__dirname] // must be put to make tests (with include files) working ...
}
const data = { text: 'text' }

Expand All @@ -27,7 +27,7 @@ test('reply.view with ejs engine, template folder specified, include files (ejs
})

fastify.get('/', (req, reply) => {
reply.type('text/html; charset=utf-8').view('index-linking-other-pages', data) // sample for specifying with type
reply.type('text/html; charset=utf-8').view('index-linking-other-pages', data) // sample for specifying with type
// reply.view('index-linking-other-pages', data)
})

Expand Down Expand Up @@ -196,7 +196,7 @@ test('reply.view with ejs engine, templates with folder specified, include files
let content = null
ejs.renderFile(templatesFolder + '/index-with-includes-one-missing.ejs', data, options, function (err, str) {
content = str
t.type(err, Error) // expected Error here ...
t.type(err, Error) // expected Error here ...
t.strictEqual(content, undefined)
})
t.matchSnapshot(content, 'output')
Expand Down Expand Up @@ -246,7 +246,7 @@ test('reply.view with ejs engine, templates with folder specified, include files
let content = null
ejs.renderFile(templatesFolder + '/index-with-includes-and-attribute-missing.ejs', data, options, function (err, str) {
content = str
t.type(err, Error) // expected Error here ...
t.type(err, Error) // expected Error here ...
t.strictEqual(content, undefined)
})
t.matchSnapshot(content, 'output')
Expand Down
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ test('reply.view with ejs engine, template folder specified, include files (ejs
const resolve = require('path').resolve
const templatesFolder = 'templates'
const options = {
filename: resolve(templatesFolder), // needed for include files to be resolved in include directive ...
views: [__dirname] // must be put to make tests (with include files) working ...
filename: resolve(templatesFolder), // needed for include files to be resolved in include directive ...
views: [__dirname] // must be put to make tests (with include files) working ...
}
const data = { text: 'text' }

Expand All @@ -552,7 +552,7 @@ test('reply.view with ejs engine, template folder specified, include files (ejs
})

fastify.get('/', (req, reply) => {
reply.type('text/html; charset=utf-8').view('index-linking-other-pages', data) // sample for specifying with type
reply.type('text/html; charset=utf-8').view('index-linking-other-pages', data) // sample for specifying with type
// reply.view('index-with-includes', data)
})

Expand Down Expand Up @@ -718,7 +718,7 @@ test('reply.view with ejs engine, templates with folder specified, include files
let content = null
ejs.renderFile(templatesFolder + '/index-with-includes-one-missing.ejs', data, options, function (err, str) {
content = str
t.type(err, Error) // expected Error here ...
t.type(err, Error) // expected Error here ...
t.strictEqual(content, undefined)
})

Expand Down Expand Up @@ -767,7 +767,7 @@ test('reply.view with ejs engine, templates with folder specified, include files
let content = null
ejs.renderFile(templatesFolder + '/index-with-includes-and-attribute-missing.ejs', data, options, function (err, str) {
content = str
t.type(err, Error) // expected Error here ...
t.type(err, Error) // expected Error here ...
t.strictEqual(content, undefined)
})

Expand Down

0 comments on commit 03c8a22

Please sign in to comment.