Skip to content

ysknk/gulp-starter-kit

Repository files navigation

Gulp Starter Kit

website build tools.
use submodule add or download.

*Does not work alone. Require gulp-starter-src. Read Install.

Description

  • Pug -> html
  • Stylus(+nib) -> css
  • webpack(+Babel) -> js
  • img(imagemin) -> img
  • static

Requirement

  • Node.js(@test v16.17.0)

Install

[_app] submodule add & [.base_src] clone

example submodule

git submodule add https://github.com/ysknk/gulp-starter-kit.git _app
git clone -b master https://github.com/ysknk/gulp-starter-src.git .base_src
cd _app/
npm i

# oneline: minimum package
git submodule add https://github.com/ysknk/gulp-starter-kit.git _app && git clone -b master https://github.com/ysknk/gulp-starter-src.git .base_src && cd _app/ && npm i

# oneline: full package
git submodule add https://github.com/ysknk/gulp-starter-kit.git _app && git clone -b feature/ysknk https://github.com/ysknk/gulp-starter-src.git .base_src && cd _app/ && npm i

while using it

Push to the repository you manage.
If you want to clone a new one,
use command > git clone --recursive ${your repository url} to download submodule as well.

Directory before npm installation

[root/]
  |-[_app/] *submodule add or download
  |-[.base_src/] *clone or download

Directory after npm installation

[root/]
  |-[_app/]
  |-X[.base_src/] * delete after install
  |
  |-[_src/]
  |   |-[config/]
  |   |   |-[task.js] *overwrite task config (master_data: /gulpfile.babel.js/task/config.js)
  |   |   |-[page.js] *variables
  |   |   |-[tasks/] *original task
  |   |-[htdocs/] *work directory
  |
  |-[htdocs/] *default dest directory

Usage

npm-scripts

cd $(root)/_app/

# watch target files & server open
npm run watch
# watch target files
npm run dev
# compile all target files
npm run generate
# lint all target files
npm run lint
# clean all target files
npm run clean
# delete dest directory
npm run delete
    .
    .
    .

Other gulp task

cd $(root)/_app/

# build target [task] ex) npx gulp html
npx gulp [html|css|js|img|static]
# watch target [task] files & server open ex) npx gulp html:watch
npx gulp [html|css|js|img|static]:watch
# compile all target [task] files
npx gulp [html|css|js|img|static]:build
# lint all target [task] files
npx gulp [html|css|js|img|static]:lint
# clean all target [task] files
npx gulp [html|css|js|img|static]:clean
    .
    .
    .

Check all tasks.

npx gulp --tasks

License

Licensed under MIT
Copyright (c) 2018 ysknk

Author

ysknk