Comments (9)
I think I can do this, forking your repo...
from bundler.
Goal
Making a deno lightweight alternative bundler to webpack, rollup, parcel etc. that does not require node and package.json
Structure
I am trying to make two things:
Bundler API
that bundles deno syntax (url imports,.ts
extensions) for the webCLI
that usesBundler API
with default settings and plugins to make life as easy as possible (defaults still have to be determined, #5)
React
Bundler API does not include React
. But since it uses ts
compiler API, I think it can be set up to be used for React
. We need a proper react example app instead of example_5.
Features
-
transpiles ts or js modules to
esm
modules usingts
compiler API (resolves url imports,.ts
extensions) -
transpiles and bundles modules to
system
likeDeno.bundle
and include system_loader, but splits code for dynamically imported modules.
Example:// a.ts import { b } from "./b.ts" // static import console.log(b) import("./c.ts") // dynamic import
// b.ts export const b = "b"
// c.ts console.log("c")
output:
- dist
- deps
- 79e2adc1-f4a8-4c1f-986d-6ca38d777f8f.js (contains transpiled c.ts and system_loader)
- a.js (contains transpiled a.ts, b.ts and system_loader, imports deps/79e2adc1-f4a8-4c1f-986d-6ca38d777f8f.js dynamically)
- deps
- dist
-
supports css imports
transpilesimport styles from "./styles.css"
to module with string content as default export.- in discussion: support css features from stage 3 and css nesting.
Real world examples
example_3 is a real world example app that uses lit-element.
Though I agree: The Examples need to be better and labeled properly.
from bundler.
Thank you for your work. I merged it.
I think the requirements section is not necessary because it describes more what we do not need, namely node and package.json.
I updated the examples and restructured the readme to CLI and API sections.
from bundler.
We could use a You can use bundler if…
subsection under Why Use Bundler
to list some use cases.
from bundler.
I'm gonna need to understand a few things:
-
In your documentation the purpose wasn't very clear to me... you are trying to make another version of
deno bundle
, that includes css bundling and React.js as I see in your 5th example, am I right? -
provide real-world examples. not just
console.log
s and imports.
from bundler.
Got it, I'm going to make some improvements now. Please approve my pull request
from bundler.
just pushed an update to the documentation.
changes:
- I changed the example
- provided some more info in the beggining
- added a requirements section.
gonna play around with it so I can provide a big, heavy example.
I would suggest changing the example folder names.
from bundler.
We could use a
You can use bundler if…
subsection underWhy Use Bundler
to list some use cases.
Sounds cool, I will keep working on the documentation tomorrow
from bundler.
@timreichen what do you think of my last pull?
from bundler.
Related Issues (20)
- how to disable export default in final js bundle file? HOT 2
- Use as a api HOT 2
- API: bundle function don't write output assets HOT 2
- API doc
- hello_world examples not working HOT 1
- Generic lambda compiled as React components HOT 1
- export default is working only with function HOT 1
- bundler and bundler api are not emiting javascript output HOT 3
- examples/server don't work HOT 2
- spa dev server example HOT 1
- project struture in read me HOT 1
- API Examples failing
- Feature Request: Support circular dependencies HOT 3
- Bundler fails to run when trying to import `acorn` via `terser` HOT 5
- Crash with CSS Gradients: `TypeError: i.walkFunctionNodes is not a function` HOT 3
- Does not understand .mjs extension / script type HOT 1
- Fails to download one of the dependency files HOT 3
- Bundler misinterprets Windows path as a url HOT 4
- Newline behavior HOT 4
- Guide for create pluging HOT 2
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 bundler.