Guest User

Untitled

a guest
Mar 14th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. index.ejs:
  2. <!doctype html>
  3. <html lang="en">
  4. <head>
  5. ....
  6. </head>
  7. <body>
  8. <%- include partials/header -%>
  9.  
  10. </body>
  11. </html>
  12. ------------------------------------
  13. in partials/header.ejs:
  14. <section id="header">
  15. <header>
  16. <a href="#home" rel="Shlomi Levi" title="Shlomi Levi">Shlomi Levi
  17. <small>
  18. <a class="link" href="mailto:wizardnet972@gmail.com" target="_blank" title="wizardnet972@gmail.com">wizardnet972@gmail.com</a>
  19. </small>
  20. </a>
  21. </header>
  22. </section>
  23. ------------------------------------
  24. in styles.scss:
  25. @import 'partials/header';
  26. body {}
  27. ------------------------------------
  28. in partials/header.scss:
  29. #header {
  30. a {display:block;}
  31. ------------------------------------
  32. in webpack:
  33. in module/rules section:
  34. {
  35. test: /\.ejs$/,
  36. loader: 'ejs-loader',
  37. },
  38. in plugins section:
  39. new HtmlWebPackPlugin({
  40. template: '!!ejs-compiled-loader!index.ejs',
  41. }),
Add Comment
Please, Sign In to add comment