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

Question - Update an existing application #52

Open
no-more opened this issue Mar 31, 2016 · 2 comments
Open

Question - Update an existing application #52

no-more opened this issue Mar 31, 2016 · 2 comments
Labels

Comments

@no-more
Copy link

no-more commented Mar 31, 2016

Hello,

I know this is not the best place for this question but I couldn't find a slush forum or something else to ask.

I'm starting to use slush for a new project which will have several apps (that's why I need scaffolding tools). But what I would like is to be able to use this tool to maintain the apps when the template evolves.

For example if one of the dependency number change in the package.json file I would like to be able to apply it every where without to manually edit them, but I don't want local changes to be lost either.

Is there any way to do it easily with slush/glulp or should I use another tool (which one ?)?

Thanks a lot

Regards
Christophe.

@joakimbeng
Copy link
Member

That's a good question! I have been thinking a lot about this myself, but I'm afraid I haven't found a good solution for it yet.

One way to solve it would be to create a gulp plugin which, instead of just copying a package.json template, modifies a package.json so it includes the needed dependencies without affecting other stuff.
Maybe an API like this (let's call the hypothetical plugin gulp-deps):

const gulp = require('gulp');
const deps = require('gulp-deps');
const install = require('gulp-install');

gulp.task('default', () => {
  return gulp.src('./package.json')
    .pipe(deps({
      dependencies: {
        gulp: '^3.0.0'
      },
      devDependencies: {
        xo: '^0.13.0'
      },
      remove: [
        'no-longer-used-dependency'
      ]
    }))
    .pipe(gulp.dest('./'))
    .pipe(install());
});

How does that look?
As I said it doesn't exist yet though, and I haven't had the time to build such a plugin myself.

@no-more
Copy link
Author

no-more commented Mar 31, 2016

Thanks,

Your idea is quite interesting. I don't know how to make gulp plugin, but if I can I'll try to have a look onto this.

Thanks.

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

No branches or pull requests

2 participants