npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flamingo-carotene-webpack

v9.0.0-alpha.13

Published

Provide an abstraction for webpack with the ability for other modules to extend the webpack config, with integration into the flamingo-carotene-dev-server module

Downloads

85

Readme

Module flamingo-carotene-webpack

This module abstracts webpack to have a quite good featured webpack config ready to use with your project.

An initial webpack config will be provided by this module.

When triggered by a command, the module creates the webpack compiler and run the config that can be extended through any other module and your own project config.

How to use

npm i -D flamingo-carotene-webpack

Run the webpack compiler by e.g. executing npx flamingo-carotene build.

The webpack module will listen to the following commands: build, buildWebpack, buildWebpackJs, buildWebpackCss, watchWebpackJs, watchWebpackCss.

This module will build the webpack config at the config commands priority 0 with the webpack config object available in config.webpack. That means that the webpack config can be edited in two ways.

  1. By a config command handler with a priority between 0 and 100, that overrides entries of the webpack modules config. Every config made to config.webpack before priority 0 will be taken into account when creating the webpack config.

  2. By a config command handler with a priority lower than 0, that overrides entries of the webpack config. Every config made to config.webpackConfig after priority 0 will be taken into account when running the webpack compiler by a command.

Every webpack configuration that is supported by the used webpack version can be applied that way.

The entry point is the file index.js inside the config.paths.webpack.src folder.

How to configure

This module exposes the following config

config.paths.webpack = {
  src: config.paths.src,
  dist: config.paths.dist
}

src Path that this module uses as source path

dist Path that this module uses as dist path

config.webpack = {
  dist: {
    jsFolderName: 'js',
    cssFolderName: 'css',
    fontFolderName: 'font',
    imageFolderName: 'image'
  },
  rulesInclude: null || [],
  buildCallback: null || function
}

dist.jsFolderName Additional path from the webpack dist to the js output files

dist.cssFolderName Additional path from the webpack dist to the css output files

dist.fontFolderName Additional path from the webpack dist to the font output files

dist.imageFolderNameAdditional path from the webpack dist to the image output files

rulesInclude Array of paths to use in the include property of module rules inside the webpack config

buildCallback The callback function to execute when the webpack compiler was finished

Node or Dart Sass

Only Dart is now supported

Export Webpack Configuration

To get the webpack configuration simply call npx flamingo-carotene exportWebpackConfig

List of Flamingo Carotene webpack modules