Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce steal-tools size by breaking into subprojects #1035

Open
matthewp opened this issue Jul 11, 2018 · 3 comments
Open

Reduce steal-tools size by breaking into subprojects #1035

matthewp opened this issue Jul 11, 2018 · 3 comments

Comments

@matthewp
Copy link
Member

matthewp commented Jul 11, 2018

Proposal

The proposal is to break steal-tools into subprojects that can be used on their own. steal-tools will remain as a way to use all of the various tools under a single API / cli and will maintain its backwards compatibility.

Possibly we could make steal-tools lazily install the subprojects; meaning live-reload for example will only be installed once it is called for the first time.

Need

screen shot 2018-07-11 at 10 32 22 am

steal-tools is the largest of the donejs projects. This is because it combines a lot of functionality that involves manipulating a dependency graph. Looking at https://github.com/stealjs/steal-tools/blob/master/index.js only gives you a glimpse of what steal-tools contains. For example it has:

  • Building web projects for use in production.
    • An optimized version of the a production app with AOT compiling.
  • live-reload for faster development updates.
  • Exporting library into various formats such as globals, AMD, and ES modules.
  • Continuous builds (the watch mode) for using production mode in development.
  • Ability to create development bundles.

Change

The suggested change is to break this functionality into different subprojects. These could perhaps be:

  • steal-export: For exporting libraries.
  • steal-build (including optimized builds): For building web projects.
  • steal-build-watch: The watch mode for the above.
  • steal-live-reload: Provides the live-reload CLI.
  • steal-bundle: Way to create bundles for use in development. Possibly including ES bundles?

Additionally there's a lot of common things that are used by all of the above, particularly the parts that can build the dependency graph and create bundles. These will either be put into their own packages or into a steal-common sort of package.

@m-mujica
Copy link
Contributor

Would steal-tools be still a thing or is the idea to use the individual packages instead?

Thinking about https://github.com/lerna/lerna

@matthewp
Copy link
Member Author

steal-tools would still exist just as it does today, for backwards compatibility. We would likely push people towards using the individual packages though. I would think donejs would use those.

@frank-dspeed
Copy link
Contributor

frank-dspeed commented Oct 4, 2018

@matthewp maybe we can make steal-tools a project like canjs using steal-tools to build from the /es/* folder a single es module then all can import what they need and rebuild with steal-tools a steal-tools version for them self.

in a more advanced proposal: Add Repl to steal-tools i want to replace the cli with a node repl :)
As this is a core part for Projects like CoreOS and other Unikernel Stuff where we drop complet Linux support.

https://nodejs.org/api/repl.html

I would love to move more forward to es modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants