open source front-end framework
Bootstrap 파일 구조
$ cd bootstrap-4.6.0-dist
$ npm init --y
Wrote to D:\\koharin\\bootstrap-4.6.0-dist\\package.json:
{
"name": "bootstrap-4.6.0-dist",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": \[\],
"author": "",
"license": "ISC"
}
$ npm install --save bootstrap
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [bootstrap@4.6.0](mailto:bootstrap@4.6.0) requires a peer of [jquery@1.9.1](mailto:jquery@1.9.1) - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [bootstrap@4.6.0](mailto:bootstrap@4.6.0) requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.
npm WARN [bootstrap-4.6.0-dist@1.0.0](mailto:bootstrap-4.6.0-dist@1.0.0) No description
npm WARN [bootstrap-4.6.0-dist@1.0.0](mailto:bootstrap-4.6.0-dist@1.0.0) No repository field.
- [bootstrap@4.6.0](mailto:bootstrap@4.6.0)
added 1 package from 2 contributors and audited 1 package in 1.211s
1 package is looking for funding
run `npm fund` for details
found 0 vulnerabilities
bootstrap-4.6.0-dist
폴더 내 node_modules
폴더가 생성된 것을 확인할 수 있다.node_modules/bootstrap/dist
폴더에 설치파일이 존재
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>BOOTSTRAP PRACTICE #1</title>
<link rel="stylesheet" href="../bootstrap-4.6.0-dist/css/bootstrap.min.css">
</head>
<body>
<h1>My First Bootstrap Page</h1>
<button type="button" class="btn btn-success">Success</button>
<!-- jQuery는 bootstrap의 js가 사용하므로 bootstrap js 파일 로드 전 로드한다. -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- <body> tag 끝나기 전 js 파일 로드 시 웹페이지 로딩 속도 향상된다. -->
<script src="../bootstrap-4.6.0-dist/js/bootstrap.min.js"></script>
</body>
</html>
[JavaScript] JavaScript #2: 데이터 타입, 변수, 동적 타이핑(Dynamic Typing), 변수 호이스팅(Variable Hoisting) (0) | 2021.01.29 |
---|---|
[JavaScript] JavaScript #1: 자바스크립트 개요 (0) | 2021.01.29 |
[HTML] Semantic Web(시맨틱 웹) (0) | 2021.01.28 |
[TestDome] HTML/CSS and JavaScript Test Questions (0) | 2021.01.10 |
[TestDome] Remove Property (JavaScript) (0) | 2021.01.10 |