add module
and jsnext:main
to all tasks
#26
Comments
Actually, about
|
And in some cases, using rollup would be good. I can start PRs. Won't be so big deal and hard job. Also i'm stuck because of these transpileings, presets, shits, rollups, webpacks, browserifies and etc. It's soooooo huge, that I can't make good flow. Because in same time I don't want huge devDeps, huge and hard configs, repo root poluted and etc. I want flexibility and believe that After ~15-20 hours last night, I finally end up with one preset that I intentionally wanted to be in one bundle as much as possible to low the download/install time in development. But anyway, in the end i got 4M bundle with bugs (in build step there were not errors, it is successful, haha. But because the tons of deps and mixed exports, multiple packages includes same packages, but different versions; some deps are already ES2015, others are CJS and etc.. it's absolutely mess ;d). (damn, I should start a blog, i have tons to write, haha...) But yea, I'm a bit strange. But yea, I believe in Start + Rollup + Buble. Not Webpack2, not webpack2 + babel and other shits, not browserify, not browserify with babelify, or browserify with rollupify + buble, or browserify + bubleify... No, tried everything and it sucks. The absolute combo and future is Rollup + Buble (or if one need more sugars can set Anyway.. it's completely offtopic. Just sharing my headaches for last month - I hate them, and I worked and sleeped very well very long time without them. But I liked few things, so want to use them and it's completely okey now as node < 4 is almost dead (ofc, it is still alive in production). So I believe I can have just So in short: I can't continue my work in any viewpoint, until i finish the workflow and scaffolding. So I can invest as much time as it is needed. I can be here every day from tomorrow to move this project forward as much as possible. 😍 |
I have no real experience with Rollup, but this sounds ok for me. I have just to finish all the current refactorings (it's only 2 or 3 tasks left) and then will look into this.
I can just believe you at this point :)
I know :( if only I have time... I'm a big fan of 100% coverage, and as you can see we already have "something", a primitive stubs just to have at least some tests. all the tasks must be covered with real tests for sure.
DO THAT! really :)
I have a lot of experience with Webpack and one project done with Browserify. All the rest tools like Rollup, JSPM, SystemJS, Buble and etc sounds more like alternative universe for me, but I'm sure these tools are cool and have some real advantages. and I can feel some of your pain for sure.
and I really need a lot of help! |
btw why Start and its tasks may need to be used by bundlers like Rollup? I'm a little afraid of this:
so we need to put into |
I believe we should integrate rollup into all tasks. And config for rollup could be nothing more than that 'use strict'
import buble from 'rollup-plugin-buble'
export default {
entry: 'src/index.js',
targets: [
{ dest: 'lib/index.es6.js', format: 'es' },
{ dest: 'lib/index.js', format: 'cjs' }
],
plugins: [buble({ target: { node: '4' } })]
} and in package.json "jsnext:main": "lib/index.es6.js",
"module": "lib/index.es6.js",
"main": "lib/index.js", So package would expose both commonjs and es2015 module (which is like what is currently in the repos). This is most simple config and currently both Rollup and Webpack requires shitty config files in the root when everything and such simple configs could be in package.json. So btw, i'm now building https://github.com/rolldown (https://github.com/tunnckoCore/rolldown) which will do exactly this - simplifying the configuration and allowing you for presets.
Bundling the tasks with it, will allow us to make bundled presets - meaning that it will have lower deps and better install times. As I said, I wanna have as small as possible install times. And just to be more clear. Rollup by default resolves just the local files and makes one single file bundle, it not includes the external dependencies in that bundle. look how the 'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var r = _interopDefault(require('rollup'));
var extend = _interopDefault(require('extend-shallow'));
var loadPkg = _interopDefault(require('load-pkg'));
// ...
// all code of all local files Then when we are building presets, we can try to optimize more (what I tried before few days) with
That's the coolest thing. Rollup does nothing more than that to bundle multiple files. But allows you to includes plugins to transform the rest code. Because of this it is perfect with Buble, which in turn if is used standalone (not as rollup plugin) will throw an error that it not understands es2015 modules. But if is used with above config is is very cool - rollup bundles all files, buble transforms the rest code. I know that forcing you to move to rollup + buble is not cool. But it's a lot simpler, better and smaller - the cool thing of buble is that you just define |
closed as not relevant anymore, see master branch. |
Yea, it seems awesome now! Babel + TypeScript. <3 |
For more robust loading and bundling.
edit: I mean, adding
module
andjsnext:main
fields in the package.json file.and a bit off-topic: tests are very big need. I don't think simple tests like this are enough. :) See start-rollup tests for real example of 100% coverage :)
The text was updated successfully, but these errors were encountered: