
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
edition-node-webpack
Advanced tools
A pure wrapper around patternlab-node core, the default pattern engine, and supporting frontend assets.
The webpack wrapper around Pattern Lab Node Core providing tasks to interact with the core library and move supporting frontend assets.
The webpack edition comes with the following components:
patternlab-node: GitHub, npmpatternengine-node-mustache: GitHub, npmpattern-lab/styleguidekit-assets-default: GitHubpattern-lab/styleguidekit-mustache-default: GitHubThe Pattern Lab Node - webpack edition uses Node for core processing, npm to manage project dependencies, and webpack.io to run tasks and interface with the core library. Node version 4 or higher suffices. You can follow the directions for installing Node on the Node website if you haven't done so already. Installation of Node will include npm.
Note: You must have all of the prerequisites first
.zip or fork this repository, then clone it locally.
git clone git@github.com:YOURGROUP/patternlab-edition-node-webpack.git
cd path/to/patternlab-edition-node-webpack
npm install starterkit-mustache-demo
npm run patternlab:loadstarterkit --kit=starterkit-mustache-demo
npm run patternlab:serve
npm install
The pre-built project comes with the Base Starterkit for Mustache installed by default.
Please note: Pattern Lab Node uses npm to manage project dependencies. To upgrade the webpack edition or to install plug-ins you'll need to be familiar with npm.
npm is a dependency management and package system which can pull in all of the webpack editions's dependencies for you. To accomplish this:
download or git clone this repository to an install location.
run the following
cd install/location
npm install
Running npm install from a directory containing a package.json file will download all dependencies defined within. The package-lock.json file is automatically managaged everytime you add/remove/upgrade a dependency.
Most people want to run Pattern Lab Node standalone and not as a dependency. If you wish to install as a dependency you can do the following:
Use npm's install command with an argument to install the Webpack Edition into a location of your choosing. In Terminal type:
cd install/location/
npm install edition-node-webpack
This will install the Webpack Edition into a directory called node_modules in install/location/.
The Pattern Lab Node - Webpack Edition ships with a base experience which serves as clean place to start from scratch with Pattern Lab. But if you want to get rolling with a starterkit of your own, or use the demo starterkit like the one on demo.patternlab.io, you can do so automatically at time of npm install by adding your starterkit to the package.json file.
You can also work with starterkits using the command line.
To update Pattern Lab please refer to each component's GitHub repository, and the master instructions for core. The components are listed at the top of the README.
To list all available commands type:
npm run patternlab:help
To generate the front-end for Pattern Lab type:
npm run patternlab:build
To watch for changes, re-generate the front-end, and server it via a BrowserSync server, type:
npm run patternlab:serve
Webpack dev server should open http://localhost:3000 in your browser, both host and port are configurable in the patternlab-config.json file.
To install a specific StarterKit from GitHub type:
npm install [starterkit-name]
npm run patternlab:loadstarterkit --kit=[starterkit-name]
Unlike the other editions, there were a few options added just for this edition that allow for easier upgrading, and better flexibility.
In this edition, it's important to make the configuration for webpack something very easy to update, and very easy to modify. The current setting for webpack custom configuration and merge are described here.
You can change how it merges by changing this object in patternlab-config.json:
"webpackMerge": {
"entry": "replace"
},
By default merge does a append if that option works for you only set which webpack configuration you want to change. The merge setting is: smartStrategy which is documented over on this page.
You can set several options to configure your dev server. You can also in the CLI pass any option on demand.
"webpackDevServer": {
"url": "http://localhost",
"port": 3000,
"watchContentBase": true,
"watchOptions": {
"aggregateTimeout": 500,
"ignored": [],
"info-verbosity": "verbose"
}
},
You can safely modify the following settings in the the main webpack.babel.config that can change how the bundles get optimized.
Note: in webpack 4, these settings are automatically triggered when mode=production when running the dev server this is not used.
All uglify settings are in the patternlab-config.json:
"uglify": {
"sourceMap": false,
"parallel": true,
"uglifyOptions": {
"mangle": false
}
},
In some cases you may want to add a namespace to your JS or CSS/SCSS files. You can now add a global NAMESPACE which can be read by any JS module. The sample of .scss includes how to use it in a .SCSS file.
This can be changed in thepatternlab-config.json under app:
"app": {
"namespace": ""
}
| Josh Schneider | GitHub | |
| Paul Wright | Website |
FAQs
A pure wrapper around patternlab-node core, the default pattern engine, and supporting frontend assets.
We found that edition-node-webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.