项目作者: deren2525

项目描述 :
Pug × SCSS × TypeScript Template🐶 By gulp v4
高级语言: TypeScript
项目地址: git://github.com/deren2525/gulp4-pug-scss-ts-template.git
创建时间: 2020-01-02T16:41:59Z
项目社区:https://github.com/deren2525/gulp4-pug-scss-ts-template

开源协议:

下载


gulp4-pug-scss-ts-template



gulp-pug-scss-typescript

Pug × SCSS × TypeScript Template🐶 By gulp v4
(gulp v4 による Pug × SCSS × TypeScript テンプレート)

📦 Features

  • Pug to HTML converter
  • SCSS to CSS converter
  • TypeScript to JavaScript converter
  • Autoprefixer CSS
  • Normalize.css

Pug to HTML converter option

If you add _ to the beginning of the file name, it will not be converted to HTML.

ex) _hogehoge.pug

Metadata is set in the following file.

src > pug > include > _base.pug

Directory structure

  1. ...
  2. ├─ gulpfile.ts
  3. ├─ src/
  4. ├─ pug/
  5. ├─ include/
  6. └─ _base.pug
  7. └─ index.pug
  8. ├─ scss/
  9. └─ style.scss
  10. ├─ typescript/
  11. └─ main.ts
  12. └─ image/
  13. └─ dist // What is automatically converted is stored here📦.
  14. ├─ css/
  15. └─ style.css
  16. ├─ js/
  17. └─ main.js
  18. ├─ image/
  19. └─ index.html

Recommend VSCode Extensions

💬 Usage

0. How to set up gulp and Pug

If you’ve previously installed gulp globally, run npm rm --global gulp before following these instructions.
For more information, read this Sip.

  1. Check for node, npm, and npx.
    If they are not installed, follow the instructions here.
  1. # Check for node
  2. $ node -v
  3. v12.14.0
  1. # Check for npm
  2. $ npm -v
  3. 6.13.4
  1. # Check for npx
  2. $ npx -v
  3. 6.13.4
  1. Install the gulp command line utility

    1. $ npm install --global gulp-cli
  2. Install the pug command line utility

    1. $ npm install --global pug-cli

1. Install

  1. $ git clone git@github.com:deren2525/gulp4-pug-scss-ts-template.git
  2. $ cd gulp4-pug-scss-ts-template
  3. $ npm install

Verify your gulp and pug versions

  1. # Check for gulp
  2. $ gulp -v
  3. CLI version: 2.2.0
  4. Local version: 4.0.2
  1. # Check for pug
  2. $ pug --version
  3. pug version: 2.0.0-rc.4
  4. pug-cli version: 1.0.0-alpha6

2. Start

  1. # start
  2. $ gulp

Go to http://localhost:3000 !