0
我使用帕格輸出HTML,我用於後續PDF生成與HTML-pdf。帕格:從node_modules訪問引導
我的控制器:
// read file
var source = fs.readFileSync(path.resolve(__dirname, 'templates/pdf.pug'), 'utf-8');
// compile pug template and output html
var template = pug.compile(source);
var html = template(data)
我的模板
doctype html
html
head
title Merapi Export
link(rel='stylesheet', href='/node_modules/bootstrap/dist/css/bootstrap.min.css')
body
h1 Merapi Export
有沒有辦法直接從節點模塊集成自舉?