Giter Site home page Giter Site logo

frontend-starter's Introduction

Frontend starter

😇 機能

フロントエンド開発の雛形プロジェクトです。

  • オートリロード(browser-sync
  • Sassの自動コンパイル
  • EJSの自動コンパイル

🚀 はじめかた

システム要件

以下のプログラムがインストールされている必要があります。

Git

Macではすでにインストールされているかもしれません。
入っていない場合はこちらからインストールしてください。

Node

ここからLTS版をインストールしてください。

yarn

JavaScript用のパッケージマネージャです。
下記のコマンドを実行してインストールしてください。

npm install -g yarn

雛形プロジェクトをダウンロード

git clone [email protected]:MasahiroHarada/frontend-starter.git <プロジェクト名>
cd <プロジェクト名>
rm -rf .git
yarn install

💡 開発フロー

概要

プロジェクトのルートディレクトリで、まずは下記のコマンドを実行してください。

npm run dev

このコマンドでGulpのタスクが実行されます。

何が起きるかというと、

  1. scssファイルのコンパイル
  2. ejsファイルのコンパイル
  3. 開発用サーバー起動

監視モードになるので、ファイルに変更を加えると
自動的にコンパイル → ブラウザリロードが行われます。

コンパイルだけしたい場合は、下記のコマンドを実行してください。

npm run build

Sass

開発ディレクトリ

<プロジェクトディレクトリ>/src/scss

コンパイル先

<プロジェクトディレクトリ>/public/styles

EJS

開発ディレクトリ

<プロジェクトディレクトリ>/src/templates

コンパイル先

<プロジェクトディレクトリ>/public

EJSを使わない場合

templatesディレクトリの中身を全て削除し、publicディレクトリ内にHTMLを書いてください。

🔧 設定

config.js

コンパイルにまつわる設計項目です。

tampletes/vars.json

EJSで使用する変数はこのファイルに記載してください。

🌏 参考リンク

🍎 検証環境

macOS Sierra ver.10.12.6

frontend-starter's People

Contributors

masahiroharada avatar ari-masahiroharada avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.