2013年5月23日 星期四

Create a new NuGet package

Download NuGet Package Explorer and install it

image

After installation, double click to open it and click Create a new package

image

In the CONTENT menu, select Add –> Content Folder

image

Right click on content –> Add New Folder, Scripts

image

Right click on Scripts folder –> Add Existing File…

image

Select the existing file that we created in advance, MyNuGetScript.js, for example

image

Right click on MyNuGetScript.js –> View Content

image

 

Now we would like to add Dependency of this package, jQuery, for example.

In EDIT menu –> Edit Metadata

image

Scoll down to bottom, click on Edit dependencies button

image

Add a new group

image

Select dependency from NuGet feed

image

Search jQuery, and double click to select it

image

Click + to add, then click OK

image

Click Save

image

Now we can see the jQuery list in Dependencies

image

Save the package

image

By default, the file name will be [Id][Version].nupkg

image

沒有留言:

張貼留言