{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/362","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/362/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/362/events","html_url":"https://github.com/ckeditor/ckeditor5/issues/362","id":191571643,"number":362,"title":"What if there was no compilation?","user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"labels":[{"id":285244012,"url":"https://api.github.com/repos/ckeditor/ckeditor5/labels/status:confirmed","name":"status:confirmed","color":"e6e6e6","default":false},{"id":167749396,"url":"https://api.github.com/repos/ckeditor/ckeditor5/labels/status:discussion","name":"status:discussion","color":"e6e6e6","default":false}],"state":"open","locked":false,"assignee":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"assignees":[{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2016-11-24T17:48:17Z","updated_at":"2016-12-27T13:46:32Z","closed_at":null,"body":"This thought was provoked by @pjasiun, cause according to his experience with Webpack, it's able to easily source packages from normal npm dependencies in a simple way. `import x from 'a/b/c'` loads `b/c` from `node_modules/a`.\r\n\r\nI haven't researched it now, but AFAIR this behaviour is based on some configuration which that package must expose in order to tell Webpack what's the entry point and how to actually load `b/c` from inside of it. Mind that Node packages do not support stuff like `require( 'a/b/c' )`, so this is all hack.\r\n\r\nBut it's nice. It works as you'd expect things to work... only that it works in Webpack only.\r\n\r\nNow, there are number of popular \"formats\" that a library may want to support. Bare es6 modules, rollup, Browserify, cjs, amd, etc. I've been thinking how many of them we could support without the compilation that we do today.\r\n\r\nFirst of all, I imagine that bundlers like Webpack, Browserify, rollup have configurable \"load module from ...\" hooks. Webpack has loaders for instance. So there should be no big problem with them, at least up to a point where you load a dependency which requires another dependency but loads it in a way which your bundler doesn't support. E.g. ckeditor5-utils loads lodash, but what if loadash wouldn't work without special configuration for Webpack... and for Browserify... and for rollup.\r\n\r\nThen we have cjs. CommonJS is a problem in general, because it doesn't support deep module structures... So without treating CKEditor codebase as a single package you wouldn't be able to load modules from other packages. Not good. There will be support for ES6 modules in Node.js one day, but I don't know how it's going to work and whether it will work with exactly the dependency format which Webpack requires. Actually... what if Webpack requires different imports than rollup? Yeah...\r\n\r\nThen we have AMD about which I don't even want to think because it required hack even despite the compilation that we do.\r\n\r\nWhat else? The problem is that I don't know... but I think that what we know gives enough feeling of the matter we're dealing with. For a brief moment I thought that maybe we don't need compilation if we make some concessions, but the only situation in which I can imagine this work is if we support just one architecture – e.g. Webpack or CJS. CJS would also support Webpack I guess, but not deep modules...\r\n\r\nHeeeelp."},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/comments/269328217","html_url":"https://github.com/ckeditor/ckeditor5/issues/362#issuecomment-269328217","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/362","id":269328217,"user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T13:46:32Z","updated_at":"2016-12-27T13:46:32Z","body":"I'm working on themes now and I tried to structure imports between SASS files like I would do with JS. Unfortunately, this leads to code duplication (`@import_once` will be added in Sass 3) and, most importantly, to unpredictable order how these files are combined together. And as we know, this is super !important in CSS, so the whole idea of importing SASS to UI components is not going to work.\r\n\r\nHence, it seems that we can only resolve this by the main editor class importing its complete SASS index file. But then how's importing CSS in JS better than building it completely separately? Well, it isn't.\r\n\r\nSo, to speed things up, I'm going to include SASS into JS because this will allow us to move to Webpack faster. But then we'll need to work on how to compile CSS separately and, even more importantly, how to allow building a chosen theme."}}
{"actor":{"display_login":"Reinmar"}}