https://github.com/lekhmanrus/esbuild-pug
esbuild plugin to work with pug (jade) files
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.4%) to scientific vocabulary
Keywords
Repository
esbuild plugin to work with pug (jade) files
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
esbuild-pug
esbuild plugin to work with pug (jade) files.
Features
- Compiles
.pugand.jadefiles - Supports various configuration file formats
- Integrates with esbuild seamlessly
Installation
sh
npm install --save-dev esbuild-pug
Usage
```ts import { build } from 'esbuild'; import { pugPlugin } from 'esbuild-pug';
build({ entryPoints: [ 'app.js' ], bundle: true, outfile: 'out.js', plugins: [ pugPlugin() ], }) .catch(() => process.exit(1)); ```
Configuration
You can configure the plugin by passing options:
ts
pugPlugin({
basedir: './src/',
// other pug options
})
Options
You can configure your project to pass the additional options.
The plugin accepts all standard Pug options, plus:
root: Set the root directory for resolving includes and extends.loader: Choose betweentext(default) orjsoutput.
You can see the supported options here.
Configuration File Formats
esbuild-pug supports configuration files in several formats:
- JavaScript - use
.pugrc.jsorpug.config.jsand export an object containing your configuration. - YAML - use
.pugrc, .pugrc.yamlor.pugrc.ymlto define the configuration structure. - JSON - use
.pugrc.jsonto define the configuration structure. - package.json - create an
pugConfigproperty in yourpackage.jsonfile and define your configuration there.
If there are multiple configuration files in the same directory, esbuild-pug will only use one. The priority order is as follows:
package.json.pugrc.pugrc.json.pugrc.yaml.pugrc.yml.pugrc.js.pugrc.cjspug.config.jspug.config.cjs
Using Configuration Files
Here's an example configuration file that sets Pug basedir option (again, see whole list of supported options here):
* .pugrc.json (JSON)
json
{
"basedir": "./src/"
}
.pugrc(YAML)yaml basedir: ./src/pug.config.js(JavaScript)js module.exports = { basedir: './src/' };
P.S.: Either of that should work. No need to create all of them. See Configuration File Formats.
Build
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Owner
- Name: Ruslan Lekhman
- Login: lekhmanrus
- Kind: user
- Location: Edmonton, AB, Canada
- Repositories: 47
- Profile: https://github.com/lekhmanrus
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 5 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
npmjs.org: esbuild-pug
esbuild plugin to work with pug (jade) files
- Homepage: https://github.com/lekhmanrus/esbuild-pug/
- License: MIT
-
Latest release: 1.0.0
published over 1 year ago