Comments (10)
from brunch.
Very cool, thanks for sharing.
I am actually close to porting brunch itself to an ES module. That will allow it to use CJS and ESM packages throughout without any issues.
Once it's done and validated, I will share it as well. It will also be shipped to the @firstfleet/brunch npm package (fork of brunch that currently has my esm plugin support).
I hope this will at least future proof brunch a bit so I can keep using it.
from brunch.
Cool! I'm sure they'd appreciate a PR over here too.
from brunch.
@reubano hard to do find more time being at war, but I also want to keep Brunch up and running. Just need more help.
from brunch.
@reubano hard to do find more time being at war, but I also want to keep Brunch up and running. Just need more help.
Thoughts and prayers to you and yours!! 🙏🏽
from brunch.
Hey @Jesspu
Thanks for the kind words! Unfortunately i'm focusing on other projects at the moment, and there is no space for Brunch. You can consider it deprecated. Unless someone wants to contribute.
I'd keep this issue open in any case.
from brunch.
Okay, no problem appreciate your response and all the work on brunch over the years.
We are actually still using brunch for our new frontend apps built in svelte, and it works great. I have had to maintain most of our plugins, but with the way brunch is set up, it is pretty trivial.
Sad that the sun is setting on brunch, but I will probably keep using it until I am no longer able to do so.
If anyone else finds this issue, and has questions about converting brunch plugins to ESM, or using ESM in brunch, let me know and I will try to help.
from brunch.
Here's how I handled it for @observablehq/plot
. Ugly, but works...
package.json
{
...
"dependencies": {
"@babel/runtime": "^7.7.4",
"@observablehq/plot": "^0.4.2",
"@popperjs/core": "^2.10.1",
"bootstrap": "^5.1.0",
"brunch": "^4.0.0",
"coffeescript": "^2.5.1",
"lodash": "^4.17.21",
"mithril": "^2.0.4",
},
"devDependencies": {
"@babel/core": "^7.17.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"auto-reload-brunch": "^2.7.1",
"babel-brunch": "^7.0.1",
"clean-css-brunch": "^3.0.0",
"coffee-script-brunch": "^4.0.0",
}
}
brunch-config.js
// Generated by CoffeeScript 2.4.1
module.exports = {
// http://brunch.io/docs/config
plugins: {
babel: {
presets: ['@babel/preset-env'],
plugins: [
[
"@babel/plugin-transform-runtime",
{
"absoluteRuntime": false,
"version": "^7.7.4"
}
]
],
ignore: [
/^node_modules\/bootstrap/,
/^node_modules\/mithril/,
/^node_modules\/lodash/,
/^node_modules\/@babel\/runtime/,
]
}
},
npm: {
compilers: ['babel-brunch'],
globals: {
popper: "@popperjs/core",
_: "lodash",
Plot: "@observablehq/plot",
babelInteropRequireDefault: "@babel/runtime/helpers/interopRequireDefault",
babelGet: "@babel/runtime/helpers/get",
babelInherits: "@babel/runtime/helpers/inherits",
babelSlicedToArray: "@babel/runtime/helpers/slicedToArray",
babelObjectSpread2: "@babel/runtime/helpers/objectSpread2",
babelClassCallCheck: "@babel/runtime/helpers/classCallCheck",
babelCreateClass: "@babel/runtime/helpers/createClass",
babelPossibleConstructorReturn: "@babel/runtime/helpers/possibleConstructorReturn",
babelGetPrototypeOf: "@babel/runtime/helpers/getPrototypeOf",
babelObjectWithoutProperties: "@babel/runtime/helpers/objectWithoutProperties",
babelToConsumableArray: "@babel/runtime/helpers/toConsumableArray",
babelAssertThisInitialized: "@babel/runtime/helpers/assertThisInitialized",
babelDefineProperty: "@babel/runtime/helpers/defineProperty",
babelInteropRequireDefault: "@babel/runtime/helpers/interopRequireDefault",
babelTypeof: "@babel/runtime/helpers/typeof",
babelWrapNativeSuper: "@babel/runtime/helpers/wrapNativeSuper",
babelRegenerator: "@babel/runtime/regenerator",
bootstrap: "bootstrap",
}
},
server: {
hostname: "0.0.0.0",
port: 3333
},
files: {
javascripts: {
joinTo: {
"javascripts/app.js": /^app/,
"javascripts/vendor.js": /^(?!app)/
}
},
stylesheets: {
joinTo: {
"stylesheets/app.css": /^app\/.*custom\.css/,
"stylesheets/vendor.css": /^(?!app)/
}
}
},
modules: {
autoRequire: {
"javascripts/app.js": ["initialize"]
}
},
sourceMaps: "absoluteUrl"
};
view.coffee
m = require 'mithril'
module.exports =
oncreate: (vnode) ->
attrs = vnode.attrs
data = attrs.collection.list
graph = Plot.plot
y: {grid: true}
marks: [Plot.line(data, {x: "date", y: "value"})]
vnode.dom.appendChild graph
view: (vnode) -> m 'span.chart'
from brunch.
BTW @paulmillr, really hope you get more time for brunch. Don't know what I'd do if I was forced to go back to rollup or Webpack.
from brunch.
Just stumbled upon brunch, I also really want it to stay alive. Anything the community can do?
@paulmillr, do stay safe!
from brunch.
Related Issues (20)
- infinite recursion occurring in vendor.js when using mobx HOT 3
- AutoRequire Configuration Unclear HOT 3
- Keep non minified CSS files ? HOT 1
- Unable to connect to git while creating a new brunch project HOT 2
- New workers implementation
- Brunch 3.0.0 - Error: Cannot find module 'readable-stream/duplex' HOT 6
- Custom server not working on Brunch 3
- submodules not working in vendors HOT 4
- Files content erased after changing with brunch watcher HOT 2
- Add a DIGEST feature because digest-brunch is not up to date HOT 6
- Troubles with Android Apps downloading
- brunch-config.js is missing HOT 2
- Cleanup old issues HOT 5
- Website down HOT 1
- Found a possible security concern HOT 8
- rx 580 8gb black screen
- brunch new does not work anymore HOT 1
- Directory structure handled incorrectly in new project. HOT 4
- 4.0.2: project never finishes compiling HOT 6
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 brunch.