Closed ZhouHansen closed 6 years ago
I like the graph node for package.json! I'm not sure about this feature though … turbolinks doesn't really do anything for choo apps does it? choo handles routing and already only replaces the <body>
parts that need to be replaced when you navigate.
Yeah, I worked on a hybird app which is built by choo and turbolinks. Turbolinks doesn't do anything to choo, it only makes hybird app's page jumping looks more natively, it requires ssr choo and that meta tag.
This use case is quite specific, I think it may be better solved with a custom documentify transform, like this:
// package.json
{
"devDependencies": {
"hstream": "^1.2.0"
},
"documentify": {
"transform": [
"./add-turbolinks-meta"
]
}
}
// add-turbolinks-meta.js
var hstream = require('hstream')
module.exports = function () {
return hstream({
head: { _appendHtml: '<meta name="turbolinks-visit-control" content="reload">' }
})
}
Yeah, maybe it's a better idea.
This is a 🙋 feature.
Check whether is a turbolinks app, then add relative meta tag.
Create a
graph-package-json.js
to check it, because the document node dependents on it, if this is a turbolinks app, will add<meta name="turbolinks-visit-control" content="reload">
to<head>
. May combine it withis-electron-projects.js
into one file in the future.Checklist
Context
No
Semver Changes
minor