Comments (7)
Another term that might be discussable is WebpackBlockUpdater
(see PR #247).
Maybe it's rather a WebpackConfigUpdater
: It's actually so generic that it's not webpack-blocks-specific. And this name might transport more information. Objections?
from webpack-blocks.
We need to discuss terminology here, since most terms haven't ever been clearly defined.
Current state of affairs is:
Initially I was thinking that a
block
is a self-contained, configurable portion of a Webpack Configuration - so actuallyentryPoint
is the block, notentryPoint()
, which could be aBlockInstance
or similar.Then a
block
is everything that has the signature(...args: any[]): BlockInstance
, whereBlockInstance = (current) WebpackBlock
If someone has a better naming suggestion for BlockInstance
, feel free to share it here π
from webpack-blocks.
Suggestion for terminology, based on @zcei's PR:
entryPoint
, for instance, is theBlock
entryPoint()
could be called aBlockInstance
WebpackConfig
should be self-describingWebpackConfigUpdater
describes a function(prevConfig: WebpackConfig) => WebpackConfig
Note that I called it Block
, not WebpackBlock
, but yet called it WebpackConfig
(not Config
).
Idea behind it: There is no other "block" concept here than the lib's webpack blocks, so there might not be a need to make the name long. "config" on the other hand is such a general term that it might be better to call it "webpack config" when we talk about it.
Feel free to disagree now π
from webpack-blocks.
On a second thought we could also "invert" the meaning, with:
entryPoint
being aBlockCreator
entryPoint()
being theBlock
But I'm not too sure about it. Currently going with your approach - if necessary it's a matter of a simple "Rename symbol" refactoring.
from webpack-blocks.
Fair enough. Feel free to open a PR if itβs an urgent issue π
from webpack-blocks.
WebpackConfigUpdater
is way better indeed. As it's just (previousConfig: WebpackConfig): WebpackConfig
it really just is an updater for any Webpack config
from webpack-blocks.
I just pushed some changes to the PR (#247), where I went with my proposal from last post.
In fact we never specify entryPoint
types, they all just inherently comply to the Block
/ BlockCreator
interface, as they all return an instance.
So the term Block
belongs to the instance (entryPoint()
) for me, as it will way more often be used than the creator interface.
Everyone who'll be talking in issues about "a bug in the block" will talk about a specific configuration, so basically there's a bug in the instance of the created block.
As @andywer said:
Feel free to disagree now π
from webpack-blocks.
Related Issues (20)
- Have setOutput accept an object HOT 1
- createConfig from available webpack base config HOT 6
- Allow negations in match HOT 8
- Support for webpack 4 HOT 34
- @webpack-blocks/babel-loader: how to disable exclude node_modules HOT 12
- Code style HOT 6
- 2.0 roadmap HOT 26
- Move unpopular blocks to the webpack-blocks org HOT 11
- uglify package 1.0.0 doesn't match what is in the npm registry HOT 3
- Using assets package with webpack 4 and babel7 HOT 1
- Webpack blocks for webpack ^4.0.0 and babel ^7.0.0 HOT 2
- How to create custom block with new version? HOT 1
- Update typescript block to work with webpack 4 HOT 4
- Ability to extend options passed to include configFile HOT 3
- Tag a new version for update peer dependencies commit HOT 1
- devserver: hot and HotModuleReplacementPlugin
- Outdated PostCSS README HOT 1
- Cannot see how to remove or filter out HotModuleReplacementPlugin
- webpack-blocks/* issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-blocks.