[ヴァニラJS]猫検索サイト🐈‍⬛ - 設定編|protect-me

6491 ワード

🕊 プログラマー-[フロントエンド]猫画像検索サイト

1.設定項目


basic init/install

// 폴더 생성
$ mkdir search_cat_photo

// 디렉토리 이동
$ cd ./search_cat_photo

// npm init => package.json 파일 생성
$ npm init -y 

// parcel-bundler 개발 의존성 설치 => package-lock.json, node_modules 폴더 생성
$ npm i -D parcel-bundler

package.jsonの変更


修正
  • script
  • {
      "name": "search_cat_photo",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "dev": "parcel index.html",
        "build": "parcel build index.html"
      },
      "keywords": [],
      "author": "",
      "license": "ISC",
      "devDependencies": {
        "parcel-bundler": "^1.12.5"
      }
    }

    index.htmlの生成

    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Search Cat Photo</title>
    </head>
    <body>
      
    </body>
    </html>

    ▲gitignoreの作成

    node_modules
    .cache
    dist
    .DS_Store

    2. npx digit


    デフォルト設定のファイルとコンテンツが多数あるため、レプリケーション操作はスキップされます.
    次のコマンドを使用して、初期設定のアイテムをコピーできます.$ npx digit protecet-me/search_cat_practice yourProjectName次のコマンドを使用してプロジェクトを実行できます.$ npm run devPhoto by Hannah Troupe on Unsplash