Introducing Meteor io

Introducing Meteor io. Meteor io is a fully pluggable and extendable, scaffolding command-line tool that leverages es6, and allows to create custom generators and commands to facilitate your meteor workflows.

Don’t forget to star it!

I’ll be releasing some videos over the next week on how to create custom generators and commands.

4 Likes

It would be awesome to get this hooked up with some standard Meteor patterns we’re coming up with for the guide:

It would also be great to see if you have any feedback on the discussion/outline there!

3 Likes

This is very similar to jinx.

And a welcome upgrade to the functionality in StarryNight. Any chance we can do a code review of jinx, and merge any functionality that’s not already covered? I’ve been planning on upgrading the scaffolding functionality on StarryNight with jinx… and now I’m excited about upgrading to jinx/io! :slight_smile:

1 Like

@sashko We could definitely work some patterns into io. I worked on the iron scaffolding tool a while back and noticed that a lot of developers had their own way of structuring their apps and packages, and used different precompilers and preprocessors.

With that in mind, I made io extremely flexible so that it wouldn’t enforce any kind of pattern. But rather empower developers to create custom generators so that they could get their scaffolding and workflows just right.

But if there’s a consensus on some standard patterns, I’m all about adding those in as defaults.

2 Likes

Oh yeah, I’m not saying we should build it in to the tool, but make plugins for these patterns. Making it flexible is clearly the best approach.

1 Like

@awatson1978 I like where you’re going with meteor jinx, but it might be quite a bit of work to merge with jinx… I’m all for a code review though!

Well, I bring it up because there’s been three or four templating/scaffolding utilities so far (I forgot to mention abee, which was maybe the first one).

So, to get increased traction and adoption, it would be great to show that Io covers the same use cases that abee and jinx cover. That probably means pulling the default templates and scaffolds, and document that Io can handle them.

That’s what I’ll be doing with StarryNight… creating a command to run Io, moving the existing ActiveRecord templates and Refernce Scaffold over, and then deprecating the existing scaffolding tool.

It would be great to say that StarryNight is using Io, which has support for jinx and abee templates and scaffolds. Thereby integrating things and keeping things cohesive.

1 Like

Okay, so I’ve read through the instructions, and I sort of understand everything conceptually. But I’m a little fuzzy on what the first steps for converting some existing templates and boilerplates would be. Putting aside the integrating-with-starrynight stuff for a moment, could you take a quick look at the following boilerplate/scaffold:

Basically, this is a pattern we use over-and-over again for creating CRUD pages in our Card UI. Generally speaking, our current scaffolding process involves recursively copying this entire directory into a project, and then doing a global find-and-replace on the term “foo” with whatever the collection name is. The two caveats are a) words that have non-standard pluralization, and b) filenames vs file content. So, it usually requires four or five renames/refactors.

foo > story
Foo > Story
foos > stories
Foos > Stories
component/newFoo > component/newStory
component/fooPreview > component/storyPreview

And so forth. So, how would we get started with converting this active-record pattern to use Io?

I think I’m a little unclear on path/to/your/io/commands/create.js and path/to/your/io/templates/template.js. Where and how are these specified? Can they just be located anywhere? If so, that’s actually convenient, because we could eventually just add them to StarryNight, which is already a grab-bag assortment of those kinds of files.

I’m sensing that we’d also need to convert our existing .html files into .js files, and replace instances of the term foo with{{className}}. Because those .js files in the /config folder are actually .jsx, right? And that’s how Io can parse the Spacebars bracket syntax in the template, right?

1 Like

I always used the iron scaffolding tool to structure apps, but stopped because of the lack of IR support, everyone switching to Flowrouter… Glad to see this plugin, the scaffolding tools are really helpful in creating a well structured app. Thank you

1 Like

Hey @awatson1978, the first time you run the io command, it will ask you to specify the directory where you want it to set up some io folders for you. It creates an io, generators, and templates folder (you could also create a commands folder if you want to create custom commands).

That path that you passed into the command-line the first time you ran io would coincide with path/to/your/io/. You can also find that path by typing io --help.

And you can have your io templates and generators installed anywhere, just as long as the io package knows about that location.

As far as using io to generate active-record, I would probably convert all those files to handlebars templates and just pass in the data.

There are some undocumented functions that might help convert strings to different formats and cases. If you look in the Utils file:
camelizeFileName
removeFileNameCharacters
converFileToClassName