Vtex Boilerplate

Build Status

A scaffold to quick development's start for Vtex e-commerce platform.


Structure:

WARNING: NEVER CHANGE OR DELETE FILES (except under assets/scss/custom) IN THIS STRUCTURE!!!

  • src/: The main source files. Never upload the files under this folder.
    • subtemplates/: All the parts to be included in the templates must be stored here.
    • templates/: All the main templates must be stored here.
    • package.json: A config file for npm. If needed, be careful to touch on this file!
    • Gruntfile.js: The automated script to compile, compress and optimize all files. If needed, be careful to touch on this file!
    • assets/: All the scss, css, javascript, coffeescript and image files must be stored here.
      • _x-sprite.scss: Generated by Grunt, don't modify this file, otherwise you will lose all your modifications.
      • css/: Non compiled css, usually for the legacy files.
        • coffeescript/: Compile with Coffeescript/Grunt.
      • scss/: The scss files which will be compiled by Compass/Grunt.
        • vtex/: Vtex generated styles. If you need to change the vtex generated class attributes fell free. NEVER delete the files under this folder.
        • custom/:Yout custom styles, which should be included in the other files.
        • config/: The config files for your custom and "x-.." files.
      • img/: Image files.
      • js/: Non compiled javascript, usually for the legacy files.

  • build/: This is a generated folder by Grunt and these are the file which should be used to deploy (uploaded to server).

Grunt Tasks

- Default (grunt):

Start watching src/ files to recompile SCSS, recompile Coffeescript, optimize images, minify assets file, regenerate Docs and start a localhost webserver on 8080 port.

image

- Generate/Update docs (grunt doc):

Generate/update "docs/" folder.

image

- Tests (grunt test):

Run QA html tests to check the required classes and elements exist.

image


Suggestions, contributions or bugs

Feel free to add an issue here or send me a pull request.

You can also fork at github.com.


Download