Giter VIP home page Giter VIP logo

doctoolsbundle's Introduction

DocToolsBundle

Helper tools for documentation

Installation

As usual, there are a few steps required to install this bundle:

1.a Add this bundle to your project using composer:

$ composer require prestashop/doc-tools-bundle

1.b Add this bundle to your project as a composer dependency (from your forked repository):

    // composer.json
    {
        // ...
        require-dev: {
            // ...
            "prestashop/doc-tools-bundle": "dev-my-branch"
        },
        // ...
        "repositories": [
            // ...
            {
                "type": "vcs",
                "url": "https://github.com/myfork/DocToolsBundle",
                "canonical": false
            },
            // ...
        ],
    }
$ composer require prestashop/doc-tools-bundle
  1. Add this bundle to your application kernel:
    // app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new PrestaShop\DocToolsBundle\DocToolsBundle(),
        );

        return $bundles;
    }
  1. Configure the bundle via app/config
# app/config/config.yml
doc_tools:
  docs_src_path: /root/path/to/docs/project/src
  cqrs_folder: content/1.7/development/architecture/domain/references
  1. How to use

This bundle includes a few commands that you can use to generate documentations. The PrestaShop dev documentation is versioned in this repository https://github.com/PrestaShop/docs, so you will have to clone it as well in order to export the generated documentation.

Command list

prestashop
  prestashop:doc-tools:list-commands-and-queries      Lists available CQRS commands and queries
  prestashop:doc-tools:print-commands-and-queries     Prints available CQRS commands and queries to a file prepared for documentation

prestashop:doc-tools:print-commands-and-queries

When you generate CQRS commands documentation details you should export them into the content/1.7/development/architecture/domain/references folder of the Docs project.

php ./bin/console prestashop:doc-tools:print-commands-and-queries --dir=/path/to/doc_project/src

Or if you correctly set the docs_src_path config you can simply run:

php ./bin/console prestashop:doc-tools:print-commands-and-queries
  1. How to test

This bundle includes automatic tests which are run automatically by GitHub actions. You can run them locally by using:

Unit tests:

composer run unit-tests

Integration tests:

composer run integration-tests

Test all:

composer run test-all

doctoolsbundle's People

Contributors

jolelievre avatar matks avatar mflasquin avatar nicosomb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.