How to install the dependencies of a Durandal project using Mimosa?

Asked

Viewed 541 times

10

Let me explain the question. I would know the answer if the question were:

"Como instalar as dependências de um projeto Laravel usando Composer?"

In the world of PHP, using Composer, we can create a project from a ready-made skeleton using the command composer create-project. In the case of framework Laravel, we can create a project with the command:

composer create-project laravel/laravel

Similarly, in the world of front-end, using Mimosa, we can create a project from a ready-made skeleton using the command mimosa skel:new. In the case of framework Durandal, we can create a project with the command:

mimosa skel:new durandal

In both cases, the "skeleton" is obtained from a repository (in Github or another place) duly registered (in Packagist or another place), and then dependencies are automatically processed and installed.

But when copying the project elsewhere, we don’t copy the whole paraphernalia of the dependencies together (the folder vendors or equivalent). We copy only the project files. (There is a .gitignore that leaves this paraphernalia out of commits.)

Well: with the project copied to another location, in the case of Composer, the command to make it usable is:

composer install

This is the command that create-project runs automatically after getting the skeleton.

My question is: what command to install the dependencies of a project in the case of Mimosa? What is the command that is executed automatically after obtaining the skeleton? What I need to run on my copy to match the original, after skel:new?

  • 1

    Use the MooTools to issue a Mugido and attract the Mimosa, wait for it to reach you. After that, ask it to install the dependencies of Durandal.

1 answer

10


Originally this answer was written in English and the author with the best intentions of helping apologized for not being able to answer it in Portuguese.


I saw the traffic from this issue flowing to the site of Mimosa and would like to try to help you.

mimosa skel:new just makes a git clone. https://github.com/dbashford/skelmimosa/blob/master/src/command/new.coffee#L51

If you run mimosa skel:new durandal durandal you will have a Durandal project inside a Urandal folder.

Inside that folder, to start, you need to run npm install. This will install all dependencies contained in package.json. So when you run mimosa watch or mimosa build the first time, Mimosa will install any Mimosa module needed.

I hope it helped!

  • 6

    The author of Mimosa himself came here to answer. How cool! (Mimosa’s Own Author came here to Answer. Cool!) :-)

  • You said "when you run mimosa watch or mimosa watch the first time", is that really what you Meant? BTW, I didn’t know Mimosa, it looks like a really Great tool. I’m considering switching from Grunt.

  • 1

    First, I apologize for Answering in the Wrong language Again, but its my only option!!! I Meant "mimosa watch" and "mimosa build". If you do Attempt to switch from Grunt, I’d love to hear about any Trouble you have. I don’t want to break any more language Rules than I already have, so if you have specific questions you can Reach me via a Mimosa Github Issue, Twitter (@mimosajs) or the Google Group. Thanks!!!

  • So... the scenario is more complex than in Composer/PHP, because we have the npm to install the dependencies declared in package.json of the skeleton, and then Mimosa in turn installs both its own dependencies (paraphernalia it needs to run), and the other declared in the skeleton design, either in the specific configuration mimosa-config.coffee, be in others, as for example bower.json (Mimosa will run Bower, which will install such dependencies). It is a sophisticated "ecosystem"!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.