diff --git a/gulpfile.js b/gulpfile.js index 870a1bcd49b..8bd20ecae41 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -273,11 +273,6 @@ gulp.task('sassdoc-build', [ 'sassdoc-js' ]) -const TRANSLATIONS_REPO = { - NAME: 'igniteui-angular-api-i18n', - LINK: `https://github.com/IgniteUI/igniteui-angular-api-i18n` -}; - const DOCS_OUTPUT_PATH = path.join(__dirname, 'dist', 'igniteui-angular', 'docs'); const TYPEDOC = { @@ -298,28 +293,20 @@ gulp.task('typedoc-build:import', ['typedoc-build'], shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --generate-from-json ${TYPEDOC.EXPORT_JSON_PATH}`) ); -gulp.task('clean-translations:localization:repo', () => { - del.sync(`${DOCS_OUTPUT_PATH}/${TRANSLATIONS_REPO.NAME}`) -}); - gulp.task('create:docs-output-path', () => { !fs.existsSync(DOCS_OUTPUT_PATH) && fs.mkdirSync(DOCS_OUTPUT_PATH); }); -gulp.task('copy-translations:localization:repo', ['clean-translations:localization:repo', 'create:docs-output-path'], - shell.task(`git -C ${DOCS_OUTPUT_PATH} clone ${TRANSLATIONS_REPO.LINK}`) -); - gulp.task('typedoc:clean-docs-dir', () => { del.sync(`${DOCS_OUTPUT_PATH}typescript`) }); -gulp.task('typedoc-build:doc:ja:localization', ['typedoc-build', 'typedoc:clean-docs-dir', 'copy-translations:localization:repo'], - shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --generate-from-json ${DOCS_OUTPUT_PATH}\\${TRANSLATIONS_REPO.NAME}\\typedoc\\ja --templateStrings ${TYPEDOC.TEMPLATE_STRINGS_PATH} --localize jp`) +gulp.task('typedoc-build:doc:ja:localization', ['typedoc-build', 'create:docs-output-path', 'typedoc:clean-docs-dir'], + shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --generate-from-json ${path.join(__dirname, 'i18nRepo', 'typedoc', 'ja')} --templateStrings ${TYPEDOC.TEMPLATE_STRINGS_PATH} --localize jp`) ); -gulp.task('typedoc-build:doc:en:localization', ['typedoc-build', 'typedoc:clean-docs-dir', 'copy-translations:localization:repo'], - shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --generate-from-json ${DOCS_OUTPUT_PATH}\\${TRANSLATIONS_REPO.NAME}\\typedoc\\en --localize en`) +gulp.task('typedoc-build:doc:en:localization', ['typedoc-build', 'create:docs-output-path', 'typedoc:clean-docs-dir'], + shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --generate-from-json ${path.join(__dirname, 'i18nRepo', 'typedoc', 'en')} --localize en`) ); const SASSDOC = { @@ -349,7 +336,7 @@ gulp.task('sassdoc-build:import', () => { }); gulp.task('sassdoc-build:doc:ja:localizaiton', ['sassdoc-build', 'sassdoc:clean-docs-dir', 'copy-translations:localization:repo'], () => { - const pathTranslations = path.join(DOCS_OUTPUT_PATH, TRANSLATIONS_REPO.NAME, 'sassdoc', 'ja'); + const pathTranslations = path.join(__dirname, 'i18nRepo', 'sassdoc', 'ja'); const options = JSON.parse(fs.readFileSync(SASSDOC.OPTIONS, 'utf8')); options.lang = 'jp'; @@ -361,7 +348,7 @@ gulp.task('sassdoc-build:doc:ja:localizaiton', ['sassdoc-build', 'sassdoc:clean- }); gulp.task('sassdoc-build:doc:en:localizaiton', ['sassdoc-build', 'sassdoc:clean-docs-dir', 'copy-translations:localization:repo'], () => { - const pathTranslations = path.join(DOCS_OUTPUT_PATH, TRANSLATIONS_REPO.NAME, 'sassdoc', 'en'); + const pathTranslations = path.join(__dirname, 'i18nRepo', 'sassdoc', 'en'); const options = JSON.parse(fs.readFileSync(SASSDOC.OPTIONS, 'utf8')); options.lang = 'en';