Skip to content

Commit

Permalink
fix(gulp): remove unused tasks and prevent en from replacemen
Browse files Browse the repository at this point in the history
Closes #3681
  • Loading branch information
Aleksandyr committed Jan 22, 2019
1 parent 8ede7dd commit 3d3d940
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
9 changes: 3 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ gulp.task('typedoc-build:doc:ja:localization', ['typedoc-build', 'create:docs-ou
);

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`)
shell.task(`typedoc ${TYPEDOC.PROJECT_PATH} --localize en`)
);

const SASSDOC = {
Expand Down Expand Up @@ -335,7 +335,7 @@ 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'], () => {
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'));

Expand All @@ -347,13 +347,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(__dirname, 'i18nRepo', '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));
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,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,
Expand Down

0 comments on commit 3d3d940

Please sign in to comment.