Comments (6)
Thanks. That's something that'd be useful to have in the main README.md
.
from pectin.
Could you be more specific, please? What about the current docs is insufficient?
from pectin.
Everything, I know what your package does but simply adding a script with pectin
in the the root package.json does fuck all.
The documentation needs to explain things like:
- Do I need rollup?
- How should I set the build script in each individual package.json, will it be
rollup -c
orpectin -c
or something else? - Will my previous rollup.config.js still be valid?
Basically an example project, or a migration guide from regular rollup to this
from pectin.
You ...read the root README, right? npm i -D @pectin/cli
is pretty damned prominent.
Do I need rollup?
Not if you're using @pectin/cli
, as indicated by the documentation.
How should I set the build script in each individual package.json
You don't. Did you read the root README?
Will my previous rollup.config.js still be valid?
No. Pectin has opinions.
from pectin.
So this guy was rude, but I'm also confused about how to use this tool. It's not clear to me what some of the opinions are, exactly.
I've removed rollup.config.js
, and run pectin
in my monorepo root:
$ pectin
pectin notice cli v3.3.0
pectin info building packages
packages/common/src/gnostic-common.cjs.js → packages/common/dist...
[!] Error: Could not resolve entry module (packages/common/src/gnostic-common.cjs.js).
Error: Could not resolve entry module (packages/common/src/gnostic-common.cjs.js).
at error (/Users/boneskull/projects/boneskull/gnostic/node_modules/rollup/dist/rollup.js:9402:30)
at /Users/boneskull/projects/boneskull/gnostic/node_modules/rollup/dist/rollup.js:16186:20
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Promise.all (index 0)
In packages/common/package.json
:
{
"browser": "dist/gnostic-common.umd.js",
"main": "dist/gnostic-common.cjs.js",
"module": "src/index.js",
}
I'm not sure where rollup gets the idea that packages/common/src/gnostic-common.cjs.js
is a thing.
from pectin.
Pectin infers your "raw" entry by replacing the dirname of main
with src
, basically. It's pretty dumb (on purpose). The entry can be configured explicitly with a rollup.input
package config.
pectin/packages/pectin-core/test/pectin-core.test.js
Lines 118 to 129 in 6ef31d6
Your module
entry should also point to dist
, as Pectin expects the value of this field (as well as main
) to be pointed to the built output.
from pectin.
Related Issues (7)
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 pectin.