WIP: Modularize contextualizer :wip:#69
Conversation
Update to jus/jus master 0.24.0
Local Test are OKI see travis failing. I do not know what is happening. In Travis details - this is one of the errors and it does not make sense 😕Found something related to a harmony flag nodejs/node#5715 . . . After one failure with @zeke sample of lib/files/image.jsThe |
Changes
The About the I think the "plugins" should do some extra work to be really autonomous and extensibles.
The above are NON-breaking changes for They imply more than just I think we can let the What do I mean? The user will be coding "magic" inside the plugin already. As well he/she could code "writing magic" inside or outside the plugin. So let them choose. This way, the casual coder could use Understand that this come at a price of having more than two methods ...well... About a using I think we are about to hit the ceiling, the following are breaking changes It will be desirable to:
This looked nice for This decision can be delayed but... Maybe it would be a good idea to define a new |
Changes
jus.js |
Coding Modularize within
|
As I recall, that Would it make sense to make each plugin's For example: parse('path/to/foo.sass', function(err, result) {
console.log(result)
)And {
extension: '.css',
output: 'transpiled CSS here...'
}Maybe not a good idea.. just thinking out loud. What do you think? Maybe better to leave this as something for |
For now, I think it is going to be necessary. So we can "untangle" the parsing behavior build in Later, I think we could manage to have it out. It could be managed by groups of "plugins" like I am thinking of a directory named ...well, that is possible solution... will see. By the way, how do you feel about the rename of |
|
Grouped "write-like" behavior in page.js |
@zeke I just tested with two (...take a look at the |
|
@zeke Found out that the word I suggest a plugin object with more words. Words like
There are other posible functions performed over files. I can think of The plugin could have many words, all optional, including Underlaying approach
Plugin possibilitiesNow you can change markdown processor, template engine, add decorators, etc... |
Plugin Modules work OK
@zeke just built a css-next plugin to replace myth and also a marky-markdown-lite plugin to replace marky-markdown. They work great. The future has no limits! The plugins have a mandatory So, if you just want to use @zeke @wmhilton @jdormit @djfdev I know it is far, but... What's the next step for the plugins toward master? ...or... Should we go all the way toward Electron? How to try the plugins?Some intro and instructions here
|
|
Whoa! You couldn't have made lots of tiny snack sized PRs? It'll take me an hour to read all this... 😭 Hehe |
|
@wmhilton You are correct. Everytime I do not follow your advice on frequent small chunks. I have to start all over. Before I do that.
It was more like: What do you guys think about this plugin development? Should it go to master in the far future or should it go in parallel toward something new like Electron? The questions are in general form, like vision. Not specific in the sense of merge approval. I am aware of the time limitations we all have. I do not want to be a burden. I only need some direction hints on what would be nice for jus org
For instance, if we end up toward For me will be an opportunity to "polishing" the code |
Added Handlebars Partials supportNew plugin
It uses the layouts file type as partials. So the names of the partials should be like
It is a plugin so it can be removed with drag and drop to |
|
@elingerojo Ah, OK. I will skim the code and your detailed comments and try to get the gist of what this is about. :) |
|
OK, I will try to summarize it and you can tell me if I understand it or not. The most helpful thing for me was reading #61 in which the word "contextualizer" is (first?) coined. That helped explain a lot... knowing the context of the contextualizer. The goal with the contextualizer is to super-charge chokidar with the ability to extract metadata from files and make a kind of live-updating tree of the file system. At first, I am concerned we might be reinventing the wheel - are we just recreating gulp or broccolijs? - but then I realized the important difference. Gulp, Webpack, Browserify... all are explicit e.g. they trace This could be a very interesting thing. For instance, I use a file system watcher in my ransomware detector. It might not be suited for that particular use case because its watching the entire file system and not trying to hold it in memory. But my point being that "filesystem watcher + super parser powers" is a generally great and useful idea. We might even want to make that its own project, and then Obviously a key component is the File class. Should we use/extend an existing virtual file package? I haven't used any, but I've researched them before and thought that vfile looked quite nice. Like, actually really nice and only one file with < 300 LOC, and seems to do one thing really well. It has some very interesting metadata it tacks onto files too: an optional error message with line/col for associating linting errors, and a .history property that tracks file renames (I believe) which could be super cool for tracking file transforms & concat/merge operations. Again, I haven't actually used it... but that's life! So much to do, so little time. I think we should come up with a neat name for it, better than 'contextualizer'. Maybe ReactFS or something? |
@wmhilton Yeah, description is spot on
vfile looks awesome (thanks to bringing it to the table, wasn't aware of it). I think "filesystem watcher + configurable virtual files + super parser powers" is dynamite.
Again, right on spot!
It will be two birds with one stone So the steps forward will be...
|
|
Closed in favor of #70 where the "modularizing" stuff is extracted in |
DO NOT MERGE WITH MASTER
This is Work in progress
contextualizer
jusworks as usual)Usage in jus
Options
filesdir for custom file type classesQuestions:
Ideas:
unknownfiles that not wereignored? Isunknowntype relevant to meta data finder/extracter?contextobject when not used.Ideas:
unknownfiles by default. Something that depends on the presence ofunknowninfiles/. It could be ' ignore extras ' instead of ' catch all ' policy.