Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pug-slides-loader

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-slides-loader

Simple Webpack loader for Reveal.js slides (.pug files) to fast inject them in one place

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Custom webpack loader to use with these boilerplates

It's used for auto import reveal.js slides (.pug files) during webpack compilation process. It help keep your project structure clean and simple.

There are some examples of use:

Project structure:
/src
--/ts
----index.ts
--/slides
----/subslides
------sub-slide-for-s1.pug (need to be included into slide-1.pug to get it work)
----slide-0.pug
----slide-1.pug
note: slide fileNames must follow this pattern 'slide-{number}.pug'
webpack.config.js
//ts-loader...
{
  test: require.resolve('./src/ts/index.ts'), // root file were slides will be injected
  use: [
    {
      loader: 'pug-slides-loader',
      options: {
        from: './src/slides', // folder with slides
      },
    },
  ],
},
index.ts

note: all slides are sorted by default from lower number to highest but you can specify custom order.

import Reveal from 'reveal.js';
import 'sass/main.scss';

document.body.innerHTML = `<div class="reveal">
<div class="slides">
    <!--inject:slides--> // HERE SLIDES WILL BE INJECTED
    <!--inject:order=15,18,11,0,2,3,4,5,6,7,8,21,12,--> // CUSTOM RENDER ORDER
    <section>
      <img data-src="images/logo.webp">
    </section>
    <section>Slide 2</section>
</div>
</div>`;```

Keywords

FAQs

Package last updated on 20 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc