티스토리 뷰

dog foot

wiredep : bower dependency 설정

케빈온티스토리 2016. 3. 28. 15:17
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


0.개요.

  - 앱 Frontwork 개발시에 wiredep 를 이용해서 bower dependency를 자동으로 입력하는 방법

  - bower로 component를 설치후 일일이 html 에 적어야 하는 노가다를 대신 해줌. (css style과 script 태그)



1. wiredep 설치

$ npm install --save wiredep
2. html 파일에 템플릿 만들고.. (나중에 wiredep에 의해 update될 placeholder)

 

<html>
<head>
  <!-- bower:css -->
  <!-- endbower -->
</head>
<body>
  <!-- bower:js -->
  <!-- endbower -->
</body>
</html>

3. node 명령을 이용하여 wiredp 호출

$ node
> require('wiredep')({ src: 'index.html' });

* 단독 사용 보다는 grunt나 gulp와 통합해서 사용



댓글