Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Gulp workflow #33

Open
2 of 3 tasks
theofidry opened this issue May 19, 2015 · 1 comment
Open
2 of 3 tasks

Gulp workflow #33

theofidry opened this issue May 19, 2015 · 1 comment

Comments

@theofidry
Copy link
Member

Specifications for the Gulp tasks and the resulting Front-end workflow.

Environments

Must have two environments:

  • prod (default)
  • dev (called by specifying the option --dev)

If needed, tasks may be placed under a gulp-tasks directory to keep the Gulp configuration clean.

Tasks

  • sass: compile SASS file from src/FrontBundle/Resources/assets/scss/app.scss into web/assets.app.min.css.
  • scripts: compile JavaScript file from src/FrontBundle/Resources/assets/scripts/app.js, which is the main JavaScript entry point using Browserify, into web/assets.app.min.js.
  • img: copy images from src/FrontBundle/Resources/assets/img and any subdirectory (recursively) into web/assets/img keeping the same arborescence.
  • fonts: copy fonts from src/FrontBundle/Resources/assets/fonts and any subdirectory (recursively) into web/assets/fonts keeping the same arborescence.
  • build: executes all the above tasks.
  • watch: default task, watch all assets and execute the proper task for it.

A live reload task?

Dev environment specifications

  • The sass task must generate a sourcemap and the outputted CSS file must be in expanded mode.
  • The scripts task must generate a sourcemap and the outputted JavaScript file must be in expanded mode.

Prod environment specifications

  • The sass task must generate a sourcemap and the outputted CSS file must be in compressed (minified) mode.
  • The scripts task must generate a sourcemap and the outputted JavaScript file must be in compressed (minified) mode.
  • The img task must compress outputted images in the process, even if are SVG.

Logs

Logs must be provided to show in verbose mode:

  • Which input file(s) (with absolute path) is used and its output file.
  • If any compression process, the size of the input and output file must be displayed with the gain in percentages.
  • Which files are being watched.
@theofidry
Copy link
Member Author

As the first version does not require advanced front assets management since no deployment process is defined for it, this issue is reported to the next version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant