diff --git a/gulpfile.js b/gulpfile.js index 3dda83978d8..d488d3f80af 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -265,11 +265,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 = { @@ -290,28 +285,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} --localize en`) ); const SASSDOC = { @@ -340,8 +327,8 @@ gulp.task('sassdoc-build:import', () => { .pipe(sassdoc(options)) }); -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'); +gulp.task('sassdoc-build:doc:ja:localizaiton', ['sassdoc-build', 'sassdoc:clean-docs-dir'], () => { + const pathTranslations = path.join(__dirname, 'i18nRepo', 'sassdoc', 'ja'); const options = JSON.parse(fs.readFileSync(SASSDOC.OPTIONS, 'utf8')); options.lang = 'jp'; @@ -352,13 +339,10 @@ gulp.task('sassdoc-build:doc:ja:localizaiton', ['sassdoc-build', 'sassdoc:clean- .pipe(sassdoc(options)); }); -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'); +gulp.task('sassdoc-build:doc:en:localizaiton', ['sassdoc-build', 'sassdoc:clean-docs-dir'], () => { const options = JSON.parse(fs.readFileSync(SASSDOC.OPTIONS, 'utf8')); options.lang = 'en'; - options.render = argv.render; - options.json_dir = pathTranslations; return gulp.src(`${SASSDOC.PROJECT_PATH}/**/*.scss`) .pipe(sassdoc(options)); diff --git a/package.json b/package.json index 2ac8432ee0c..fbea79a657c 100644 --- a/package.json +++ b/package.json @@ -22,14 +22,14 @@ "typedoc-build:import": "gulp typedoc-build:import", "sassdoc-build:export": "gulp sassdoc-build:export --convert true && gulp sassdoc:clean-docs-dir", "sassdoc-build:import": "gulp sassdoc-build:import --render true", - "build:typedoc:ja:production": "set NODE_ENV=production && gulp typedoc-build:doc:ja:localization && gulp clean-translations:localization:repo", - "build:typedoc:ja:staging": "set NODE_ENV=staging && gulp typedoc-build:doc:ja:localization && gulp clean-translations:localization:repo", - "build:typedoc:en:production": "set NODE_ENV=production && gulp typedoc-build:doc:en:localization && gulp clean-translations:localization:repo", - "build:typedoc:en:staging": "set NODE_ENV=staging && gulp typedoc-build:doc:en:localization && gulp clean-translations:localization:repo", - "build:sassdoc:en:production": "set NODE_ENV=production && set SASSDOC_LANG=en && gulp sassdoc-build:doc:en:localizaiton --render true && gulp clean-translations:localization:repo", - "build:sassdoc:en:staging": "set NODE_ENV=staging && set SASSDOC_LANG=en && gulp sassdoc-build:doc:en:localizaiton --render true && gulp clean-translations:localization:repo", - "build:sassdoc:ja:production": "set NODE_ENV=production && set SASSDOC_LANG=jp && gulp sassdoc-build:doc:ja:localizaiton --render true && gulp clean-translations:localization:repo", - "build:sassdoc:ja:staging": "set NODE_ENV=staging && set SASSDOC_LANG=jp && gulp sassdoc-build:doc:ja:localizaiton --render true && gulp clean-translations:localization:repo", + "build:typedoc:ja:production": "set NODE_ENV=production && gulp typedoc-build:doc:ja:localization", + "build:typedoc:ja:staging": "set NODE_ENV=staging && gulp typedoc-build:doc:ja:localization", + "build:typedoc:en:production": "set NODE_ENV=production && gulp typedoc-build:doc:en:localization", + "build:typedoc:en:staging": "set NODE_ENV=staging && gulp typedoc-build:doc:en:localization", + "build:sassdoc:en:production": "set NODE_ENV=production && set SASSDOC_LANG=en && gulp sassdoc-build:doc:en:localizaiton", + "build:sassdoc:en:staging": "set NODE_ENV=staging && set SASSDOC_LANG=en && gulp sassdoc-build:doc:en:localizaiton", + "build:sassdoc:ja:production": "set NODE_ENV=production && set SASSDOC_LANG=jp && gulp sassdoc-build:doc:ja:localizaiton --render true", + "build:sassdoc:ja:staging": "set NODE_ENV=staging && set SASSDOC_LANG=jp && gulp sassdoc-build:doc:ja:localizaiton --render true", "postinstall": "gulp copy-git-hooks" }, "private": true,