aurelia / framework

The Aurelia 1 framework entry point, bringing together all the required sub-modules of Aurelia.
MIT License
11.75k stars 623 forks source link

doc(the-aurelia-cli.md): Add external dependency upgrade script #757

Closed gkinsman closed 7 years ago

gkinsman commented 7 years ago

This addition to the documentation describes an alternative method of updating dependencies by specifying an external script that inspects the aurelia.json project, finds updatable dependencies and updates them. It's a useful alternative to listing all of the dependencies in an npm-script as the previous step describes.

It's possible that the list might need to be filtered to deps containing 'aurelia', but that could be left up to the implementer.

Unfortunately the script is quiet at the moment...I haven't piped through the events from the child process, something we could do if there was interest :).

Is this method of updating too error-prone?

CLAassistant commented 7 years ago

CLA assistant check
All committers have signed the CLA.

gkinsman commented 7 years ago

It looks like running this breaks the text package reference as I had this happen to my package.json by doing yarn upgrade text:

- "text": "github:requirejs/text#latest",
+ "text": "^0.1.0",

which, infuriatingly, refers to an entirely different package on npm.

AshleyGrant commented 7 years ago

I think this would be better done as an enhancement to the CLI.

EisenbergEffect commented 7 years ago

I was thinking about that as well. Just a custom command that was generated into the project maybe.

gkinsman commented 7 years ago

That would be great - given that the CLI knows exactly what to update it'd less of a guessing game.

gkinsman commented 7 years ago

So I'd like to have a shot at this; in terms of direction I can see a few pros/cons for both approaches.

Built into cli

Generated npm script

I don't know how independent the CLI currently is from the framework, but it seems to me that coupling them would be bad. Creating an npm update script at init time would work, but what about for existing projects?

Thoughts? :)

EisenbergEffect commented 7 years ago

Closing this since it would be better as a CLI addition.