Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multiple versions build #477

Merged
merged 5 commits into from
Jul 11, 2016
Merged

support multiple versions build #477

merged 5 commits into from
Jul 11, 2016

Conversation

superyyrrzz
Copy link
Contributor

#396

@chenkennt @vwxyzh @ansyral @qinezh @hellosnow

sample docfx.json:

{
  "build": {
    "content": [
      {
        "files": "*.yml",
        "src": "v2.0",
        "dest": "v2.0/api",
        "version": "v2.0"
      },
      {
        "files": "*.yml",
        "src": "v2.1",
        "dest": "v2.1/api",
        "version": "v2.1"
      },
      {
        "files": "conceptual/*.md",
        "src": "v2.0",
        "dest": "v2.0",
        "version": "v2.0"
      },
      {
        "files": "conceptual/*.md",
        "src": "v2.1",
        "dest": "v2.1",
        "version": "v2.1"
      },
      {
        "files": "index.md"
      }
    ],
    "dest": "_site"
  }
} 

@vwxyzh
Copy link
Contributor

vwxyzh commented Jul 7, 2016

👍

@hellosnow
Copy link
Contributor

:shipit:

@qinezh
Copy link
Contributor

qinezh commented Jul 8, 2016

Seems that we need to rebase this PR together as there're too many conflicts 😂

exclude | The files to be excluded, `glob` pattern is supported.
~~cwd~~ | **Obsoleted**, please use `src`.
src | Specifies the source directory. If omitted, the directory of the config file will be used. Use this option when you want to refer to files in relative folders while want to keep folder structure. e.g. set `src` to `..`.
dest | The folder name for the generated files.
version | Version name for the current file mapping. If not set, treat the current file-mapping item as in global version. Mappings with the same version name will be built together. Cross reference doesn't support cross different versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global version -> default version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

@qinezh
Copy link
Contributor

qinezh commented Jul 8, 2016

:shipit:

};
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three code pieces are similar, is it possible to refactor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored. Change FileMappingParameters to a dictionary, so the property can be converted to a key as a parameter.

@ansyral
Copy link
Contributor

ansyral commented Jul 11, 2016

    }

useless?


Refers to: src/Microsoft.DocAsCode.Build.Engine/TemplateProcessor.cs:258 in d9b55d3. [](commit_id = d9b55d3, deletion_comment = False)

using (new PerformanceScope("building documents", LogLevel.Info))
{
builder.Build(parameters);
foreach (var parameters in ConfigToParameter(config, templateManager, baseDirectory, outputDirectory))
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: seems build per version, so currently we still couldn't handle cross version reference case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we doesn't it for now.


In reply to: 70196210 [](ancestors = 70196210)

@superyyrrzz
Copy link
Contributor Author

    }

yeah.. should remove it.


In reply to: 231630240 [](ancestors = 231630240)


Refers to: src/Microsoft.DocAsCode.Build.Engine/TemplateProcessor.cs:258 in d9b55d3. [](commit_id = d9b55d3, deletion_comment = False)

@ansyral
Copy link
Contributor

ansyral commented Jul 11, 2016

👍

@chenkennt
Copy link
Contributor

:shipit:

@sammychinedu2ky
Copy link

Please is there a way to build just a particular version to prevent other API versions from rebuilding? @superyyrrzz

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

Successfully merging this pull request may close these issues.

8 participants