donaricano-btn

Installing npm packages 

There are two ways to install npm packages

- If you want to depend on the package from your own module using something like node.js require, then you want to install locally, which is npm install's default behavior

If you want to use it as a command line tool, something like the grunt CLI, then you want to install it globally



1. Locally

- This will create the node_modules directory in your current directory and will download the package to that directory


1_1. Example


1_2. Using the installed package

Once the package is in node_modules, you can use it in your code.

it you are creating a Node.js module, you can require it

- Run the code using node index.js It should output [2, 3]


2. Globally


'Tools > npm' 카테고리의 다른 글

[npm] Using a package.json  (0) 2016.06.21
[npm] 1. What is NPM?  (0) 2016.02.23
블로그 이미지

리딩리드

,
donaricano-btn

 Interwork with GitHub

- If I get a Pull Request, Jenkins will check a source It is either right source or not


1. Install

- https://jenkins.io/content/thank-you-downloading-windows-installer/#stable

- http://localhost:8080/

2. Create a bot account

- To make a new github ID to get source and send a test result


3. Configure bot account 

3_1. individual

- To add a bot account to repository

3_2. Organization

3_3. Confirm

- Sign in as a soul2ndlife(bot account)


4. Jenkins SSH Key

- Jenkins will access a repository by using Secret key of bot account


4_1. using jenkins for the first time 

- To make a folder .ssh

- To add a id_rsa(secret key)

- This key is bot account ssh key


4_2. Already use a jenkins


5. Github pull request builder plugin

- This plugin will work for merge and test automatically


6. Git plugin config

System config -> git plugin


7. GitGub pull request builder config

a move to  GitHub pull request builder and click a 고급


7_1. GitHub server api URL


7_2. Access Token

- We have to have a bot account's access Token to access GitHub API by using Jenkins









블로그 이미지

리딩리드

,
donaricano-btn

How to use a bower


1. bower?

- Bower can manage components that contain HTML, CSS, JavaScript, fonts etc


2. Install



3. Install Packages


- AngularJs -> bower install angularJs


4. Save Packages


- Create a bower.json file for my package


- Using  below the code will add to my project's bower.jso <dependencies> array


Using  below the code will add to my project's bower.jso <devDependencies> array


5. To use







블로그 이미지

리딩리드

,

[npm] 1. What is NPM?

Tools/npm 2016. 2. 23. 14:53
donaricano-btn
  • NPM
1. Define

- npm(node package manager) is a default package manager for the Javascript runtime environment   Node.js

- As of Node.js version 0.6.3 NPM is bundled and installed automatically with the environment

- NPM runs through the command line and manages dependencies for an application 

2. About

- Once you're depending on this code from other developers, npm makes it really easy to check to see if they've made any updates to it, and to download those updates when they're made

- It's a way to reuse code from other developers, and also a way to share your code with them, and it makes it easy to manage the different versions of code

3. package.json

- These bits of reusable code are called packages, or sometimes modules.
- A package is just a directory with one or more files in it, that also has a filed called "package.json" with some meta data about this package 
- A typical application such as a website, will depend on dozens or hundreds of packages

4. packages

- You can find packages to help you build your application by browsing the npm web site









'Tools > npm' 카테고리의 다른 글

[npm] Using a package.json  (0) 2016.06.21
[npm] Installing npm packages  (0) 2016.06.21
블로그 이미지

리딩리드

,