Closed gavinbarron closed 7 years ago
This is caused by how the options are passed into the subgenerators. Instead of passing the options object from the parent a new set of options is created in the ./generators/app/index.js
file on line 36. That way all options passed to the main generator are lost. Instead of creating a new options object it would be better if the existing object was cloned and extended with the properties required by the specific subgenerators.
Also in ./generators/solution/index.js
on line 37 options are not passed into the this.npmInstall()
function.
@gavinbarron can you gives us more information on where this scenario is applicable?
@nickpape-msft do we have this command?
@chakkaradeep imagine an organization would have a standardized set of dependencies they have tested and approved for their projects. They would have a Docker image with these dependencies installed. When creating a new project they would create it without dependencies and run a Docker container based on the standard image to run the project.
@waldekmastykarz Thanks! We are working to make these scenarios better but totally see the use for this command.
Here's another reason why we want this @chakkaradeep - NPM shouldn't be forced as the only game in town. Using Yarn, you can speed up dependency acquisition by 70% and even support full offline dev (after the first web part you create).
See this for more info & demos: http://www.andrewconnell.com/blog/speed-up-every-new-spfx-web-part-creation-by-up-to-70-with-yarn
Yarn is what I was actually playing with when I discovered that these flags do nothing.
On Dec 8, 2016 7:24 AM, "Andrew Connell" notifications@github.com wrote:
Here's another reason why we want this @chakkaradeep https://github.com/chakkaradeep - NPM shouldn't be forced as the only game in town. Using Yarn, you can speed up dependency acquisition by 70% and even support full offline dev (after the first web part you create).
See this for more info & demos: http://www.andrewconnell.com/ blog/speed-up-every-new-spfx-web-part-creation-by-up-to-70-with-yarn
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SharePoint/sp-dev-docs/issues/235#issuecomment-265766882, or mute the thread https://github.com/notifications/unsubscribe-auth/AGyvHH0FvNmwpKpShAikb7DYAgULCpDRks5rGCEvgaJpZM4KVDZg .
@andrewconnell We are keeping an eye on Yarn. There are few issues we have identified internally that needs to be addressed either in the toolchain or in the yarn system itself.
However, this is not about forcing npm
. Node/NPM is widely used and many have bet against it for their systems. That said, improvements and innovations come by. Yarn is certainly interesting and has its use. SPFx tool chain will evolve as we progress to evaluate and incorporate such improvements for sure. That is indeed our goal.
Now, tech aside:
I'm not trying to push Yarn, I'm simply saying that users should have an option to bypass the step of downloading all packages. Using Yarn instead of NPM was simply a scenario as to why we want this flag... just responding to your request above.
What key question / scenario you're trying to enable: to let developers work the way they want to work and not forcing specific path that isn't configurable unless you hit CTRL+C
to abort what's going on.
Not to mention it also seems you intend on supporting it as the flag is in the code, it's just not being respected when the step of running npm install
by the generator.
This gets my vote. Anything that gives me options and does not tie me to one technology component in the stack can only be a good thing regardless of why you might choose to do it. We currently do use NPM as our package manager, but who can say that we won't want to use something else tomorrow!
All,
This should be fixed in the RC0 release. You can now use the option as follows:
yo @microsoft/sharepoint --skip-install
Please let us know if you still find issues.
Thanks!
Closing...
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Category
Expected or Desired Behavior
If I run
yo @microsoft/sharepoint --skip-install
no dependencies from bower or npm are installedObserved Behavior
If I run
yo @microsoft/sharepoint --help
I'm told that there is a --skip-install option. That's part of the base set of options that come with yeoman it turns out. I would suggest that this command line option is used rather than the--no-install
that has been discussed on here previously (and isn't working)Steps to Reproduce
run
yo @microsoft/sharepoint --skip-install
You will see that the npm dependencies are installed