bevry / base

Base files for new projects
Other
30 stars 14 forks source link

Somehow make updating base files more streamlined #6

Closed balupton closed 9 years ago

balupton commented 10 years ago

This includes package.json badges

Any ideas @RobLoach

RobLoach commented 10 years ago

Might be overkill, but could do something in Yeoman, like: yo base http://yeoman.io/generators.html#writing-your-first-generator

Or add some of Base into Projectz? What are your thoughts?

Maybe.... projectz base?

balupton commented 10 years ago

Does yeoman let you update existing projects with the latest? And can yeoman generators be installed globally?

RobLoach commented 10 years ago

Does yeoman let you update existing projects with the latest?

It asks you whether or not to replace your existing files when updating. Y/N type action.

And can yeoman generators be installed globally?

Yes, they're meant to be globally...

npm install yo generator-docpad -g
yo docpad

Would be nice if Projectz assisted with this, but I'm not quite sure how that could work, since Projectz expects the triggers in the file for where to place its data.

Zearin commented 10 years ago

What’s wrong with git submodules? You could simply have bevry/base as a submodule, and symlink the desired files in the containing repo.

RobLoach commented 10 years ago

Submodules are in subfolders. Base is just a set of root files. If we were to use git submodules, we'd need to set up the submodule directory, and then create a whole bunch of symlinks pointing to the correct files.

balupton commented 10 years ago

Symlinking would seem like an idea, though it is a pain, especially when cross-platform is involved. Plus, I'm not sure if symlinking will work for the different files, especially for different environments, one would hope so, but our goal here is to remove complexity, not add it!

If we can just have an auto-script that pulls in these files:

wget -N https://raw.githubusercontent.com/bevry/base/master/.gitignore
wget -N https://raw.githubusercontent.com/bevry/base/master/.npmignore
wget -N https://raw.githubusercontent.com/bevry/base/master/.travis.yml
wget -N https://raw.githubusercontent.com/bevry/base/master/.editorconfig
wget -N https://raw.githubusercontent.com/bevry/base/master/Cakefile
wget -N https://raw.githubusercontent.com/bevry/base/master/CONTRIBUTING.md
wget -N https://raw.githubusercontent.com/bevry/base/master/coffeelint.json
wget -N https://raw.githubusercontent.com/bevry/base/master/.jshintrc

Updates the badges:

"badges": {
    "travis": true,
    "npm": true,
    "david": true,
    "daviddev": true,
    "gittip": "bevry",
    "flattr": "344188/balupton-on-Flattr",
    "paypal": "QB8GQPZAH84N6",
    "bitcoin": "https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a",
    "wishlist": "http://amzn.com/w/2F8TXKSNAFG4V"
  },

But only for missing items, it should not replace existing items.

Then run projectz compile on it, would be awesome.

Now that Chainy is out, the workflow would be something like: https://gist.github.com/balupton/aef72af134a101a8a5d8

Zearin commented 10 years ago

our goal here is to remove complexity, not add it!

Good point. I forget about symlink issues on non-POSIX platforms. :/

balupton commented 9 years ago

I think for the base files, it's pretty good. However for projectz, we should make a service around that.