(This article also published in my public number "dotnet daily Essence article", Welcome to the right QR code to pay attention to. )
Preface: After Microsoft became more open, there was not only the trend towards openness. NET runtime, IDE tools, and the SaaS version of the ALM Server Core component, Team Foundation Server, Visual Studio Online.
Visual Studio Online (VSO) is the SaaS version of the Server Core component of the Microsoft ALM product line, as long as a Microsoft account can open its own VSO account for free, creating an unlimited number of private projects, limiting only 5 free developer accounts. In the past year, VSO has made great strides, especially with the recent launch of a new build system that makes it easier to support open source projects. The article that we share today is about how VSO can be used to continuously integrate JavaScript projects hosted on GitHub. Free of charge Oh.
JEREMY likness in this article, after describing some of VSO's profile, it gives a very high rating for VSO: "It's quick, easy, and free." The specific steps to achieve this goal are then described.
1, make a slight change to the project. A special post-install script needs to be set in the Packages.json file:
"Scripts": { "postinstall""node_modules/.bin/bower install" }
2, enable "Personal access tokens" for the project in GitHub to facilitate access to the code base for VSO.
3, create a project in VSO (or use an existing project). In particular, the author mentions that he manages his daily work by creating a project in VSO that uses the Kanban function to manage it. In my opinion, this is really a good idea, you do not have to use products such as Trello.
4, enter the VSO project, go to the "Build" tab, create a new empty build definition. Interestingly, at the time of the new building, Microsoft provided 4 templates that were commonly used, such as:
5, after entering the build definition editing interface, select the "Repository" tab, select "GitHub" for the code base type, and paste the GitHub access token to select the GitHub project you want to build.
6, add the required build steps, the build step also has type optional, here can choose "NPM install" to ensure that grunt and Bower are installed, select "command line" to execute grunt build command; Select "Publish Build Artifacts "to copy the output to the server.
7, the ability to add "NPM" to the build server. Of course you can also install the build server on your own additional servers instead of using the build agents that VSO provides.
Finally, continuous integration can be performed manually or automatically. Because the operation is not the text can be fully understood, it is recommended that you "read the original" to see the details of the illustrations.
Original address: http://ivision.com/blog/ Using-visual-studio-online-to-build-a-github-hosted-javascript-project-with-npm-bower-and-grunt-for-free
Use VSO as a free CI server for JavaScript projects on GitHub