๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

"CSS" ํƒœ๊ทธ๋กœ ์—ฐ๊ฒฐ๋œ 1๊ฐœ ๊ฒŒ์‹œ๋ฌผ๊ฐœ์˜ ๊ฒŒ์‹œ๋ฌผ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  ํƒœ๊ทธ ๋ณด๊ธฐ

ยท ์•ฝ 2๋ถ„

CSS#

  • @import : ๋‹ค๋ฅธ ์Šคํƒ€์ผ ์‹œํŠธ์—์„œ ์Šคํƒ€์ผ ๊ทœ์น™์„ ๊ฐ€์ ธ์˜ด

  • ์‚ฌ์šฉ์ž ์ง€์ • CSS ์†์„ฑ(CSS ๋ณ€์ˆ˜, ์ข…์† ๋ณ€์ˆ˜)

    • ์„ ์–ธ
    element {    --main-bg-color: brown;}
    • ์‚ฌ์šฉ
    element {    background-color: var(--main-bg-color);}

ํ•˜์œ„ ํ˜ธํ™˜์„ฑ ๋ฐ ํ”„๋ก ํŠธ์—”๋“œ ๋นŒ๋“œ#

Can I use... Support tables for HTML5, CSS3, etc

ECMAScript 6 compatibility table

  • transpilling์„ ํ†ตํ•ด์„œ ํ•˜์œ„ ๋ธŒ๋ผ์šฐ์ €์—์„œ๋„ ๋™์ž‘ํ•˜๊ฒŒ ๋ฌธ๋ฒ•์„ ๋ฐ”๊พผ๋‹ค.

  • polyfill์„ ํ†ตํ•ด์„œ ์ง€์›ํ•˜์ง€ ์•Š๋Š” native API๋ฅผ ๋‹ค๋ฅธ ์ฝ”๋“œ๋กœ ๋™์ž‘ํ•˜๊ฒŒ ํ•œ๋‹ค.


  • npm init -y : npm init -โ€”yes ๋กœ npm init ์‹œ์— ๋‚˜์˜ค๋Š” ์„ค์ •์— ๋ชจ๋‘ yes๋กœ์ƒ๋žตํ•˜์—ฌ ์ง„ํ–‰ํ•จ

  • --save-devย is used to save the package for development purpose. Example: unit tests, minification..

  • --saveย is used to save the package required for the application to run.

babel#

ํ•˜์œ„ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์ง€์›๊ฐ€๋Šฅํ•˜๋„๋ก transpiling

Webpack#

๋ชจ๋“ˆ ๋ฒˆ๋“ค๋Ÿฌ


JavaScript modules


var path = require('path');
module.exports = {    mode: 'none',    entry: './index.js',    output: {        filename: 'bundle.js',        path: path.resolve(__dirname, 'dist'),    },    module: {        rules: [            {                test: /\.css$/,                use: ['style-loader', 'css-loader'],            },        ],    },};
  • mode : development, production, none ๋ชจ๋“œ ์ค‘ ์„ค์ •

  • entry : ์‹œ์ž‘์ 

  • output : ๊ฒฐ๊ณผ๋ฌผ

  • module : ๋กœ๋”


DOM#