├── .gitignore ├── LICENSE ├── README.md ├── lib └── index.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Williams Medina 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pug HTML loader for webpack 2 | 3 | A webpack loader to transform pug files into HTML. 4 | 5 | ## Installation 6 | 7 | `npm install pug-html-loader` 8 | 9 | ## Usage 10 | 11 | In your sources: 12 | 13 | ``` javascript 14 | var html = require('./file.pug') 15 | // => returns file.pug content as html compiled string 16 | ``` 17 | 18 | In your webpack.config.js file: 19 | 20 | ```javascript 21 | module.exports = { 22 | // your config settings ... 23 | rules: [{ 24 | // your modules... 25 | loaders: [{ 26 | include: /\.pug/, 27 | loader: ['raw-loader', 'pug-html-loader'], 28 | options: { 29 | // options to pass to the compiler same as: https://pugjs.org/api/reference.html 30 | data: {} // set of data to pass to the pug render. 31 | } 32 | }] 33 | }] 34 | }; 35 | ``` 36 | 37 | ## Using it with html-loader 38 | 39 | `pug-html-loader` encode to content to a string variable to avoid it and pass the string content to the loader chain please use the following configuration: 40 | 41 | ```javascript 42 | module.exports = { 43 | // your config settings ... 44 | module: [{ 45 | // your modules... 46 | rules: [{ 47 | test: /\.pug/, 48 | loaders: ['html-loader', 'pug-html-loader'], 49 | options: { 50 | // options to pass to the compiler same as: https://pugjs.org/api/reference.html 51 | data: {} // set of data to pass to the pug render. 52 | } 53 | }] 54 | }] 55 | }; 56 | ``` 57 | 58 | 59 | Don't forget to polyfill `require` if you want to use it in node. 60 | See `webpack` documentation. 61 | 62 | ## License 63 | 64 | MIT (http://www.opensource.org/licenses/mit-license.php) 65 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License http://www.opensource.org/licenses/mit-license.php 3 | Author Williams Medina @willyelm 4 | */ 5 | 'use strict' 6 | const util = require('loader-utils') 7 | const pug = require('pug') 8 | 9 | let cachedDeps; 10 | 11 | module.exports = function (source) { 12 | let query = {} 13 | if (this.cacheable) { 14 | this.cacheable(true) 15 | } 16 | if (typeof this.query === 'string') { 17 | query = util.parseQuery(this.query) 18 | } else { 19 | query = this.query 20 | } 21 | let req = util.getRemainingRequest(this) 22 | let options = Object.assign({ 23 | filename: this.resourcePath, 24 | doctype: query.doctype || 'html', 25 | compileDebug: this.debug || false 26 | }, query) 27 | if (options.plugins){ 28 | if (!(options.plugins instanceof Array)) { 29 | options.plugins = [options.plugins]; 30 | } 31 | } 32 | let template; 33 | try { 34 | template = pug.compile(source, options); 35 | } catch (ex) { 36 | cachedDeps.forEach(this.addDependency); 37 | this.callback(ex); 38 | return; 39 | } 40 | cachedDeps = template.dependencies ? template.dependencies.slice() : undefined; 41 | template.dependencies.forEach(this.addDependency) 42 | let data = query.data || {} 43 | return template(data) 44 | } 45 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pug-html-loader", 3 | "version": "1.1.7", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "pug-html-loader", 9 | "version": "1.1.7", 10 | "license": "MIT", 11 | "dependencies": { 12 | "loader-utils": "^2.0.0", 13 | "pug": "^3.0.2" 14 | } 15 | }, 16 | "node_modules/@babel/helper-string-parser": { 17 | "version": "7.25.9", 18 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", 19 | "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", 20 | "license": "MIT", 21 | "engines": { 22 | "node": ">=6.9.0" 23 | } 24 | }, 25 | "node_modules/@babel/helper-validator-identifier": { 26 | "version": "7.25.9", 27 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", 28 | "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", 29 | "license": "MIT", 30 | "engines": { 31 | "node": ">=6.9.0" 32 | } 33 | }, 34 | "node_modules/@babel/parser": { 35 | "version": "7.26.5", 36 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.5.tgz", 37 | "integrity": "sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==", 38 | "license": "MIT", 39 | "dependencies": { 40 | "@babel/types": "^7.26.5" 41 | }, 42 | "bin": { 43 | "parser": "bin/babel-parser.js" 44 | }, 45 | "engines": { 46 | "node": ">=6.0.0" 47 | } 48 | }, 49 | "node_modules/@babel/types": { 50 | "version": "7.26.5", 51 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz", 52 | "integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==", 53 | "license": "MIT", 54 | "dependencies": { 55 | "@babel/helper-string-parser": "^7.25.9", 56 | "@babel/helper-validator-identifier": "^7.25.9" 57 | }, 58 | "engines": { 59 | "node": ">=6.9.0" 60 | } 61 | }, 62 | "node_modules/acorn": { 63 | "version": "7.4.1", 64 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 65 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 66 | "license": "MIT", 67 | "bin": { 68 | "acorn": "bin/acorn" 69 | }, 70 | "engines": { 71 | "node": ">=0.4.0" 72 | } 73 | }, 74 | "node_modules/asap": { 75 | "version": "2.0.6", 76 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 77 | "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", 78 | "license": "MIT" 79 | }, 80 | "node_modules/assert-never": { 81 | "version": "1.4.0", 82 | "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.4.0.tgz", 83 | "integrity": "sha512-5oJg84os6NMQNl27T9LnZkvvqzvAnHu03ShCnoj6bsJwS7L8AO4lf+C/XjK/nvzEqQB744moC6V128RucQd1jA==", 84 | "license": "MIT" 85 | }, 86 | "node_modules/babel-walk": { 87 | "version": "3.0.0-canary-5", 88 | "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", 89 | "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", 90 | "license": "MIT", 91 | "dependencies": { 92 | "@babel/types": "^7.9.6" 93 | }, 94 | "engines": { 95 | "node": ">= 10.0.0" 96 | } 97 | }, 98 | "node_modules/big.js": { 99 | "version": "5.2.2", 100 | "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", 101 | "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", 102 | "license": "MIT", 103 | "engines": { 104 | "node": "*" 105 | } 106 | }, 107 | "node_modules/call-bind-apply-helpers": { 108 | "version": "1.0.1", 109 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", 110 | "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", 111 | "license": "MIT", 112 | "dependencies": { 113 | "es-errors": "^1.3.0", 114 | "function-bind": "^1.1.2" 115 | }, 116 | "engines": { 117 | "node": ">= 0.4" 118 | } 119 | }, 120 | "node_modules/call-bound": { 121 | "version": "1.0.3", 122 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", 123 | "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", 124 | "license": "MIT", 125 | "dependencies": { 126 | "call-bind-apply-helpers": "^1.0.1", 127 | "get-intrinsic": "^1.2.6" 128 | }, 129 | "engines": { 130 | "node": ">= 0.4" 131 | }, 132 | "funding": { 133 | "url": "https://github.com/sponsors/ljharb" 134 | } 135 | }, 136 | "node_modules/character-parser": { 137 | "version": "2.2.0", 138 | "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", 139 | "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", 140 | "license": "MIT", 141 | "dependencies": { 142 | "is-regex": "^1.0.3" 143 | } 144 | }, 145 | "node_modules/constantinople": { 146 | "version": "4.0.1", 147 | "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", 148 | "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", 149 | "license": "MIT", 150 | "dependencies": { 151 | "@babel/parser": "^7.6.0", 152 | "@babel/types": "^7.6.1" 153 | } 154 | }, 155 | "node_modules/doctypes": { 156 | "version": "1.1.0", 157 | "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", 158 | "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", 159 | "license": "MIT" 160 | }, 161 | "node_modules/dunder-proto": { 162 | "version": "1.0.1", 163 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 164 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 165 | "license": "MIT", 166 | "dependencies": { 167 | "call-bind-apply-helpers": "^1.0.1", 168 | "es-errors": "^1.3.0", 169 | "gopd": "^1.2.0" 170 | }, 171 | "engines": { 172 | "node": ">= 0.4" 173 | } 174 | }, 175 | "node_modules/emojis-list": { 176 | "version": "3.0.0", 177 | "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", 178 | "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", 179 | "license": "MIT", 180 | "engines": { 181 | "node": ">= 4" 182 | } 183 | }, 184 | "node_modules/es-define-property": { 185 | "version": "1.0.1", 186 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 187 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 188 | "license": "MIT", 189 | "engines": { 190 | "node": ">= 0.4" 191 | } 192 | }, 193 | "node_modules/es-errors": { 194 | "version": "1.3.0", 195 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 196 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 197 | "license": "MIT", 198 | "engines": { 199 | "node": ">= 0.4" 200 | } 201 | }, 202 | "node_modules/es-object-atoms": { 203 | "version": "1.1.1", 204 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 205 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 206 | "license": "MIT", 207 | "dependencies": { 208 | "es-errors": "^1.3.0" 209 | }, 210 | "engines": { 211 | "node": ">= 0.4" 212 | } 213 | }, 214 | "node_modules/function-bind": { 215 | "version": "1.1.2", 216 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 217 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 218 | "license": "MIT", 219 | "funding": { 220 | "url": "https://github.com/sponsors/ljharb" 221 | } 222 | }, 223 | "node_modules/get-intrinsic": { 224 | "version": "1.2.7", 225 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", 226 | "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", 227 | "license": "MIT", 228 | "dependencies": { 229 | "call-bind-apply-helpers": "^1.0.1", 230 | "es-define-property": "^1.0.1", 231 | "es-errors": "^1.3.0", 232 | "es-object-atoms": "^1.0.0", 233 | "function-bind": "^1.1.2", 234 | "get-proto": "^1.0.0", 235 | "gopd": "^1.2.0", 236 | "has-symbols": "^1.1.0", 237 | "hasown": "^2.0.2", 238 | "math-intrinsics": "^1.1.0" 239 | }, 240 | "engines": { 241 | "node": ">= 0.4" 242 | }, 243 | "funding": { 244 | "url": "https://github.com/sponsors/ljharb" 245 | } 246 | }, 247 | "node_modules/get-proto": { 248 | "version": "1.0.1", 249 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 250 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 251 | "license": "MIT", 252 | "dependencies": { 253 | "dunder-proto": "^1.0.1", 254 | "es-object-atoms": "^1.0.0" 255 | }, 256 | "engines": { 257 | "node": ">= 0.4" 258 | } 259 | }, 260 | "node_modules/gopd": { 261 | "version": "1.2.0", 262 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 263 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 264 | "license": "MIT", 265 | "engines": { 266 | "node": ">= 0.4" 267 | }, 268 | "funding": { 269 | "url": "https://github.com/sponsors/ljharb" 270 | } 271 | }, 272 | "node_modules/has-symbols": { 273 | "version": "1.1.0", 274 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 275 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 276 | "license": "MIT", 277 | "engines": { 278 | "node": ">= 0.4" 279 | }, 280 | "funding": { 281 | "url": "https://github.com/sponsors/ljharb" 282 | } 283 | }, 284 | "node_modules/has-tostringtag": { 285 | "version": "1.0.2", 286 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", 287 | "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", 288 | "license": "MIT", 289 | "dependencies": { 290 | "has-symbols": "^1.0.3" 291 | }, 292 | "engines": { 293 | "node": ">= 0.4" 294 | }, 295 | "funding": { 296 | "url": "https://github.com/sponsors/ljharb" 297 | } 298 | }, 299 | "node_modules/hasown": { 300 | "version": "2.0.2", 301 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 302 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 303 | "license": "MIT", 304 | "dependencies": { 305 | "function-bind": "^1.1.2" 306 | }, 307 | "engines": { 308 | "node": ">= 0.4" 309 | } 310 | }, 311 | "node_modules/is-core-module": { 312 | "version": "2.16.1", 313 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", 314 | "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", 315 | "license": "MIT", 316 | "dependencies": { 317 | "hasown": "^2.0.2" 318 | }, 319 | "engines": { 320 | "node": ">= 0.4" 321 | }, 322 | "funding": { 323 | "url": "https://github.com/sponsors/ljharb" 324 | } 325 | }, 326 | "node_modules/is-expression": { 327 | "version": "4.0.0", 328 | "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", 329 | "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", 330 | "license": "MIT", 331 | "dependencies": { 332 | "acorn": "^7.1.1", 333 | "object-assign": "^4.1.1" 334 | } 335 | }, 336 | "node_modules/is-promise": { 337 | "version": "2.2.2", 338 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", 339 | "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", 340 | "license": "MIT" 341 | }, 342 | "node_modules/is-regex": { 343 | "version": "1.2.1", 344 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", 345 | "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", 346 | "license": "MIT", 347 | "dependencies": { 348 | "call-bound": "^1.0.2", 349 | "gopd": "^1.2.0", 350 | "has-tostringtag": "^1.0.2", 351 | "hasown": "^2.0.2" 352 | }, 353 | "engines": { 354 | "node": ">= 0.4" 355 | }, 356 | "funding": { 357 | "url": "https://github.com/sponsors/ljharb" 358 | } 359 | }, 360 | "node_modules/js-stringify": { 361 | "version": "1.0.2", 362 | "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", 363 | "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", 364 | "license": "MIT" 365 | }, 366 | "node_modules/json5": { 367 | "version": "2.2.3", 368 | "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", 369 | "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", 370 | "license": "MIT", 371 | "bin": { 372 | "json5": "lib/cli.js" 373 | }, 374 | "engines": { 375 | "node": ">=6" 376 | } 377 | }, 378 | "node_modules/jstransformer": { 379 | "version": "1.0.0", 380 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", 381 | "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", 382 | "license": "MIT", 383 | "dependencies": { 384 | "is-promise": "^2.0.0", 385 | "promise": "^7.0.1" 386 | } 387 | }, 388 | "node_modules/loader-utils": { 389 | "version": "2.0.4", 390 | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", 391 | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", 392 | "license": "MIT", 393 | "dependencies": { 394 | "big.js": "^5.2.2", 395 | "emojis-list": "^3.0.0", 396 | "json5": "^2.1.2" 397 | }, 398 | "engines": { 399 | "node": ">=8.9.0" 400 | } 401 | }, 402 | "node_modules/math-intrinsics": { 403 | "version": "1.1.0", 404 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 405 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 406 | "license": "MIT", 407 | "engines": { 408 | "node": ">= 0.4" 409 | } 410 | }, 411 | "node_modules/object-assign": { 412 | "version": "4.1.1", 413 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 414 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 415 | "license": "MIT", 416 | "engines": { 417 | "node": ">=0.10.0" 418 | } 419 | }, 420 | "node_modules/path-parse": { 421 | "version": "1.0.7", 422 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 423 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 424 | "license": "MIT" 425 | }, 426 | "node_modules/promise": { 427 | "version": "7.3.1", 428 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", 429 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", 430 | "license": "MIT", 431 | "dependencies": { 432 | "asap": "~2.0.3" 433 | } 434 | }, 435 | "node_modules/pug": { 436 | "version": "3.0.3", 437 | "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz", 438 | "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==", 439 | "license": "MIT", 440 | "dependencies": { 441 | "pug-code-gen": "^3.0.3", 442 | "pug-filters": "^4.0.0", 443 | "pug-lexer": "^5.0.1", 444 | "pug-linker": "^4.0.0", 445 | "pug-load": "^3.0.0", 446 | "pug-parser": "^6.0.0", 447 | "pug-runtime": "^3.0.1", 448 | "pug-strip-comments": "^2.0.0" 449 | } 450 | }, 451 | "node_modules/pug-attrs": { 452 | "version": "3.0.0", 453 | "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", 454 | "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", 455 | "license": "MIT", 456 | "dependencies": { 457 | "constantinople": "^4.0.1", 458 | "js-stringify": "^1.0.2", 459 | "pug-runtime": "^3.0.0" 460 | } 461 | }, 462 | "node_modules/pug-code-gen": { 463 | "version": "3.0.3", 464 | "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz", 465 | "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==", 466 | "license": "MIT", 467 | "dependencies": { 468 | "constantinople": "^4.0.1", 469 | "doctypes": "^1.1.0", 470 | "js-stringify": "^1.0.2", 471 | "pug-attrs": "^3.0.0", 472 | "pug-error": "^2.1.0", 473 | "pug-runtime": "^3.0.1", 474 | "void-elements": "^3.1.0", 475 | "with": "^7.0.0" 476 | } 477 | }, 478 | "node_modules/pug-error": { 479 | "version": "2.1.0", 480 | "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz", 481 | "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==", 482 | "license": "MIT" 483 | }, 484 | "node_modules/pug-filters": { 485 | "version": "4.0.0", 486 | "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", 487 | "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", 488 | "license": "MIT", 489 | "dependencies": { 490 | "constantinople": "^4.0.1", 491 | "jstransformer": "1.0.0", 492 | "pug-error": "^2.0.0", 493 | "pug-walk": "^2.0.0", 494 | "resolve": "^1.15.1" 495 | } 496 | }, 497 | "node_modules/pug-lexer": { 498 | "version": "5.0.1", 499 | "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", 500 | "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", 501 | "license": "MIT", 502 | "dependencies": { 503 | "character-parser": "^2.2.0", 504 | "is-expression": "^4.0.0", 505 | "pug-error": "^2.0.0" 506 | } 507 | }, 508 | "node_modules/pug-linker": { 509 | "version": "4.0.0", 510 | "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", 511 | "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", 512 | "license": "MIT", 513 | "dependencies": { 514 | "pug-error": "^2.0.0", 515 | "pug-walk": "^2.0.0" 516 | } 517 | }, 518 | "node_modules/pug-load": { 519 | "version": "3.0.0", 520 | "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", 521 | "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", 522 | "license": "MIT", 523 | "dependencies": { 524 | "object-assign": "^4.1.1", 525 | "pug-walk": "^2.0.0" 526 | } 527 | }, 528 | "node_modules/pug-parser": { 529 | "version": "6.0.0", 530 | "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", 531 | "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", 532 | "license": "MIT", 533 | "dependencies": { 534 | "pug-error": "^2.0.0", 535 | "token-stream": "1.0.0" 536 | } 537 | }, 538 | "node_modules/pug-runtime": { 539 | "version": "3.0.1", 540 | "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", 541 | "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", 542 | "license": "MIT" 543 | }, 544 | "node_modules/pug-strip-comments": { 545 | "version": "2.0.0", 546 | "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", 547 | "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", 548 | "license": "MIT", 549 | "dependencies": { 550 | "pug-error": "^2.0.0" 551 | } 552 | }, 553 | "node_modules/pug-walk": { 554 | "version": "2.0.0", 555 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", 556 | "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==", 557 | "license": "MIT" 558 | }, 559 | "node_modules/resolve": { 560 | "version": "1.22.10", 561 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", 562 | "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", 563 | "license": "MIT", 564 | "dependencies": { 565 | "is-core-module": "^2.16.0", 566 | "path-parse": "^1.0.7", 567 | "supports-preserve-symlinks-flag": "^1.0.0" 568 | }, 569 | "bin": { 570 | "resolve": "bin/resolve" 571 | }, 572 | "engines": { 573 | "node": ">= 0.4" 574 | }, 575 | "funding": { 576 | "url": "https://github.com/sponsors/ljharb" 577 | } 578 | }, 579 | "node_modules/supports-preserve-symlinks-flag": { 580 | "version": "1.0.0", 581 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 582 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 583 | "license": "MIT", 584 | "engines": { 585 | "node": ">= 0.4" 586 | }, 587 | "funding": { 588 | "url": "https://github.com/sponsors/ljharb" 589 | } 590 | }, 591 | "node_modules/token-stream": { 592 | "version": "1.0.0", 593 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", 594 | "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==", 595 | "license": "MIT" 596 | }, 597 | "node_modules/void-elements": { 598 | "version": "3.1.0", 599 | "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", 600 | "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", 601 | "license": "MIT", 602 | "engines": { 603 | "node": ">=0.10.0" 604 | } 605 | }, 606 | "node_modules/with": { 607 | "version": "7.0.2", 608 | "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", 609 | "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", 610 | "license": "MIT", 611 | "dependencies": { 612 | "@babel/parser": "^7.9.6", 613 | "@babel/types": "^7.9.6", 614 | "assert-never": "^1.2.1", 615 | "babel-walk": "3.0.0-canary-5" 616 | }, 617 | "engines": { 618 | "node": ">= 10.0.0" 619 | } 620 | } 621 | } 622 | } 623 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pug-html-loader", 3 | "version": "1.1.7", 4 | "description": "Pug to html loader for webpack", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/willyelm/pug-html-loader.git" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/willyelm/pug-html-loader/issues" 15 | }, 16 | "homepage": "https://github.com/willyelm/pug-html-loader", 17 | "keywords": [ 18 | "html", 19 | "pug", 20 | "loader", 21 | "webpack", 22 | "compile", 23 | "plain" 24 | ], 25 | "author": "Williams Medina ", 26 | "license": "MIT", 27 | "dependencies": { 28 | "loader-utils": "^2.0.0", 29 | "pug": "^3.0.2" 30 | } 31 | } --------------------------------------------------------------------------------