# Basic-Generators ### Structure * creates necessary dist folders ``` - structure: enabled: true ``` ### Copy * copies folder or files * `selector` is optional, default selector: `**/*` ``` - copy: enabled: true repetitive: - source: 'src.styles://' target: 'dist.styles://' selector: '**/*.css' - source: 'src://assets/scripts' target: 'dist://scripts' selector: '**/*.js' ``` ### Combine * combines multiple files ``` - combine: enabled: true repetitive: - target: 'dist.scripts://app.combined.js' sources: - 'dist.scripts://*.js' ``` ### Delete * deletes files or folders ``` - delete: enabled: false source: 'dist://**/*' ``` # Compile-Generators ### Compile::Haml * compiles haml files to html files * supports partials and minimizing * supports [ActionView](https://github.com/rails/rails/tree/master/actionview) syntax and view helper * supports layouts, the layout can bespezified in the first line of a haml file with `-# ehg layout: layout.blank`, default layout is `my_project/views/layout.haml` ``` - compile_haml: enabled: true minimize: true source: 'src.views://' target: 'dist.views://' selector: '**/*.html.haml' default_layout: 'views/layout.haml' renderer: attr_wrapper: '"' format: :html5 shared_helper_path: 'shared/lib' ``` ### Compile::Sass * compiles sass files to css files * supports shared mixins and minimizing ``` - compile_sass: enabled: true minimize: true source: 'src.styles://' target: 'dist.styles://' selector: '**/*.css.sass' ``` ### Compile::Coffee * compiles coffee files to js files * supports minimizing ``` - compile_coffee: enabled: true minimize: true source: 'src.scripts://' target: 'dist.scripts://' selector: '**/*.js.coffee' ``` # Minimize-Generators ### Minimize::Html * minimizes html files and copies to `target` * `prefix_extension='.min'` stores athe minimized content from `foo.html` to `foo.min.html` ``` - minimize_html: enabled: true source: 'src.public://' target: 'dist.public://' selector: '**/*.html' prefix_extension: '' ``` ### Minimize::Css * minimizes css files and copies to `target` ``` - minimize_css: enabled: true source: 'src.styles://' target: 'dist.styles://' selector: '**/*.css' prefix_extension: '.min' ``` #### Minimize::Js * minimizes js files and copies to `target` ``` - minimize_js: enabled: true source: 'src.scripts://' target: 'dist.scripts://' selector: '**/*.js' prefix_extension: '.min' ``` ### Minimize::Images * minimizes image files and copies to `target` * uses [Piet](https://github.com/albertbellonch/piet) for image processing ``` - minimize_images: enabled: true source: 'src.images://' target: 'dist.images://' selector: '**/*.{jpg,png}' options: quality: 90 level: 3 verbose: true ``` ## Service-Generators #### Service::Bower * resolves `src://bower.json` and copies bower_components to target folder ``` - service_bower: enabled: true source: 'src://' target: 'dist://lib' ``` ### Service::Grunt * resolves `src://Gruntfile.coffee` and runs a `task` ``` - service_grunt: enabled: false source: 'src://Gruntfile.coffee' task: 'default' ``` ### Service::Analytics * appends tracking codes to the end of head tag to selected html files ``` - service_analytics: enabled: true source: 'dist.views://' target: 'dist.views://' selector: '*.html' repetitive: - enabled: true name: 'google' code: "" params: GOOGLE_UA_ID: 'UA-65996211-1' ``` ### Service::Sitemap * generates a sitemap xml file based on selected files * `blacklist` can be used to exclude files ``` - service_sitemap: domain: 'beta.creative-workflow.berlin' enabled: true source: 'dist.views://*.html' target: 'dist.views://sitemap.xml' selector: '**/*.html' blacklist: ``` # Resources > "[Getting started](https://github.com/creative-workflow/easy-html-generator/blob/master/docs/GETSTARTED.md)" > "[Configuration](https://github.com/creative-workflow/easy-html-generator/blob/master/docs/CONFIGURATION.md)" > "[Haml-Templating](https://github.com/creative-workflow/easy-html-generator/blob/master/docs/HAMLTEMPLATING.md)" >"[Contributing](https://github.com/creative-workflow/easy-html-generator/blob/master/docs/CONTRIBUTING.md)"