Skip to content

Proposal: Sync boilerplate file after init. #668

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

Closed
pwang2 opened this issue Dec 6, 2017 · 3 comments
Closed

Proposal: Sync boilerplate file after init. #668

pwang2 opened this issue Dec 6, 2017 · 3 comments

Comments

@pwang2
Copy link

pwang2 commented Dec 6, 2017

Note sure this is the correct place to request feature.

I have been creating and working with code scaffolding for a while. I feel it would be a key important thing to keep the good practice going with the version iteration of the templates.

As a CLI,

  1. we should provide a way to keep the boilerplate helper file untouched and use configuration file to inject the different use case optionally. In vue cli, we have the config folder, but not all the configuration needs could be satisfied.
  2. we should be able to sync the boilerplate file easily. For now, in my own project, I am using following shell script file to keep me up to date with the vuejs-template/webpack.
#!/usr/bin/env bash

TMP=$(mktemp -d)
NAME=vue-template
TEMPLATE_DIR=$TMP/$NAME

(cd $TMP && vue init webpack $NAME)
clear

cd $(dirname $(npm root))
build=$(diff -Nr build/ $TEMPLATE_DIR/build)
config=$(diff -Nr config/ $TEMPLATE_DIR/config)
unit=$(diff -Nr --exclude=specs test/unit  $TEMPLATE_DIR/test/unit)
e2e=$(diff -Nr --exclude=specs --exclude=html-reporter.*  test/e2e $TEMPLATE_DIR/test/e2e)

echo -e "$build\n$config\n$unit\n$e2e"  | vi -d -u NONE -c 'syntax on' -
  1. Also, as a community member, we should work on one place to iron out the requirement of the template and keep it evolving. But all good things should happen in one place in a collaborative manner.

I would like to hear other folks think about this.

@LinusBorg
Copy link
Member

Please see #589 - We won't need that with 3.0, and won't invest resources to add something like you propose for the time until 3.0 is released.

@pwang2
Copy link
Author

pwang2 commented Dec 6, 2017

#589 is exactly the problem I want to address. Do you have any branch/PR regarding the work being made?

@LinusBorg
Copy link
Member

LinusBorg commented Dec 6, 2017

No, we are still discussing and designing the first draft of the API Once we have something that makes sense and is understandable in our eyes, we will discuss it with the rest of the community, collect feedback, then write it.

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

No branches or pull requests

2 participants