aniftyco / groundwork Goto Github PK
View Code? Open in Web Editor NEWScaffold out any project quickly
Home Page: https://www.npmjs.com/package/groundwork
License: MIT License
Scaffold out any project quickly
Home Page: https://www.npmjs.com/package/groundwork
License: MIT License
Right now Groundwork just fetches a repo and unpacks it into your preferred directory. That works for the most part, but we may want to hook into groundwork and customize a few things. Maybe if a repository is unpacked and has a groundwork.config.[t|j]s
file, it will contain some ways to customize the final output, with such things as hooks to various lifecycle pieces, or config to change how groundwork works.
Right now a single repo can only hold one template, and the whole repo IS the template. Lets allow a repo to have multiple templates.
For example if you run groundwork foo/bar my-app
then it will fetch and scaffold out foo/bar/tree/${DEFAULT_BRANCH}
.
If you run groundwork foo/bar/baz my-app
then it will fetch and scaffold out foo/bar/tree/${DEFAULT_TEMPLATE}/baz
If you run groundwork foo/bar/baz#qux my-app
then it will fetch and scaffold out foo/bar/tree/qux/baz
.
This will then allow us to ship "official" templates, as we can default single node templates in the groundwork repo, and you can then do groundwork next-starter my-app
and that will fetch and scaffold out aniftyco/groundwork/tree/master/templates/next-starter
.
If you try to scaffold out a project that is private it will currently fail. This is kinda not so great because now we have to make all our templates we want to use open, and that may contain sensitive data or structures you want to keep private.
We should allow you to "login" to github and this should now allow you to fetch private repos.
If you don't specify a commit or branch/tag when running, fetch the latest release if exists and use that. This will allow you to release new versions of your template, and when you run the Groundwork the latest release will be fetched and cached. Then you can also install older versions like groundwork example/foo#v2 my-app
Right now it just assumes master
branch, but that's a terrible assumption to make, considering a lot of people are migrating away from that branch naming.
We can use GitHub's API to fetch the default branch, for example https://api.github.com/repos/aniftyco/next-starter
Sure installing with npm/yarn is fine, but Groundwork can be used to scaffold out more than just JavaScript projects, so lets not assume that everyone will have node installed. By packaging and distributing a pkg
binary, we can use it anywhere without node
Right now we just fetch a tarball and unpack it. Which is fine for very simple templates, but for more advanced templates we may want to do other things like prompt for input to determine HOW to scaffold out the template, or even run other commands after scaffolding out the template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.