- npm 프로젝트 시작
npm init -y
npm i -D parcel-bundler
{
"name": "parcel-template-basic",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev" : "parcel index.html",
"build" : "parcel build index.html"
// "test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "1.12.5"
}
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reset-css@5.0.1/reset.min.css">
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parcel Bundler</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reset-css@5.0.1/reset.min.css">
<link rel="stylesheet" href="./scss/main.scss" />
<script src="./js/main.js" defer></script>
</head>
<body>
<h1>Hello Parcel!!</h1>
</body>
</html>
$color--black : #000;
$color--white : #fff;
body {
background-color: $color--black;
h1 {
color: $color--white;
}
}
console.log("Hello Parcel!");
npm run dev