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

issue38, update dependencies for nunjucks and others #39

Merged
merged 1 commit into from
Feb 23, 2018
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
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