We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there this is a long shot but, hope someone can help,
I am using gulp-inline-source-html (https://github.com/exuanbo/gulp-inline-source-html) & gulp-nunjucks-render (https://github.com/carlitoplatanito/gulp-nunjucks-render) plus browserSync to show the updated UI
I understand the plugin I am using is not the plugin in question but has inline-source under the hood
The plugin does something, but the problem is i don't think it properly writes the file, only when I do a hard refresh the UI is updated.
gulpfile.js
pipe(nunjucksRender({ path: njkPaths, ext: "", data: ENV_VARS, envOptions: { trimBlocks: true, lstripBlocks: true } })) .pipe(inlineSource({ compress: false, saveRemote: true, handlers: [require("./nunjucksHandler.js")] ?? }))
I was trying the precompile approach #70 (comment) but got nowhere.
nunjucksHandler.js
const Nunjucks = require('nunjucks'); module.exports = function nunjucks(source, context) { return new Promise((resolve, reject) => { if ( source.fileContent && !source.content && source.type == "text/css" ) { let content; try { content = Nunjucks.precompile(source.fileContent); } catch (err) { return reject(err); } // Need to expose templates for later use somehow... source.content = content } resolve(); }); };
.nunjucks
... <link inline href="{{ENV_PARTIALS_BASE_PATH}}/common/terms-and-conditions/index.css" rel="stylesheet"/> <section>html</section> {% somenunjucks syntax etc %} ...
...
<link inline href="{{ENV_PARTIALS_BASE_PATH}}/common/terms-and-conditions/index.css" rel="stylesheet"/>
<section>html</section>
{% somenunjucks syntax etc %}
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there this is a long shot but, hope someone can help,
I am using gulp-inline-source-html (https://github.com/exuanbo/gulp-inline-source-html) & gulp-nunjucks-render (https://github.com/carlitoplatanito/gulp-nunjucks-render) plus browserSync to show the updated UI
I understand the plugin I am using is not the plugin in question but has inline-source under the hood
The plugin does something, but the problem is i don't think it properly writes the file, only when I do a hard refresh the UI is updated.
gulpfile.js
I was trying the precompile approach #70 (comment) but got nowhere.
nunjucksHandler.js
.nunjucks
...
<link inline href="{{ENV_PARTIALS_BASE_PATH}}/common/terms-and-conditions/index.css" rel="stylesheet"/>
<section>html</section>
{% somenunjucks syntax etc %}
...
Thanks
The text was updated successfully, but these errors were encountered: