From 4eaa4b02a292048b9eaf2acc76fdfb2d0f82b923 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 13 Dec 2018 20:05:54 +0100 Subject: [PATCH] fix new frame naming issue --- .../scripts/figma/tasks/iconsConverter.js | 6 +--- .../dnb-ui-lib/src/icons/01_primary_icons.js | 35 ------------------- .../src/icons/02_primary_icons_medium.js | 35 ------------------- .../src/icons/03_secondary_icons.js | 6 ---- .../src/icons/04_secondary_icons_medium.js | 6 ---- 5 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 packages/dnb-ui-lib/src/icons/01_primary_icons.js delete mode 100644 packages/dnb-ui-lib/src/icons/02_primary_icons_medium.js delete mode 100644 packages/dnb-ui-lib/src/icons/03_secondary_icons.js delete mode 100644 packages/dnb-ui-lib/src/icons/04_secondary_icons_medium.js diff --git a/packages/dnb-ui-lib/scripts/figma/tasks/iconsConverter.js b/packages/dnb-ui-lib/scripts/figma/tasks/iconsConverter.js index 894718909ae..dbdce9a0f85 100644 --- a/packages/dnb-ui-lib/scripts/figma/tasks/iconsConverter.js +++ b/packages/dnb-ui-lib/scripts/figma/tasks/iconsConverter.js @@ -278,11 +278,6 @@ const optimizeSVG = ({ file }) => { gulp .src(file, { cwd: process.env.ROOT_DIR }) .pipe(transform('utf8', transformSvg)) - // .pipe( - // rename({ - // suffix: '.opt' - // }) - // ) .pipe(gulp.dest(path.dirname(file), { cwd: process.env.ROOT_DIR })) .on('end', resolve) .on('error', reject) @@ -301,6 +296,7 @@ const formatIconName = n => .toLowerCase() .replace(/[^a-z0-9_]/g, '_') .replace(/\s|_{2,}/g, '_') + .replace(/^[0-9]+_/, '') // because the frame name conains a number first const lockFileDest = path.resolve( __dirname, diff --git a/packages/dnb-ui-lib/src/icons/01_primary_icons.js b/packages/dnb-ui-lib/src/icons/01_primary_icons.js deleted file mode 100644 index c5381577e79..00000000000 --- a/packages/dnb-ui-lib/src/icons/01_primary_icons.js +++ /dev/null @@ -1,35 +0,0 @@ -/** This file is auto generated by convertSvgToJsx.js */ - -import add from './add.js' -import bell from './bell.js' -import calendar from './calendar.js' -import check from './check.js' -import chevron_down from './chevron_down.js' -import chevron_left from './chevron_left.js' -import chevron_right from './chevron_right.js' -import chevron_up from './chevron_up.js' -import close from './close.js' -import exclamation from './exclamation.js' -import more from './more.js' -import question from './question.js' -import save from './save.js' -import search from './search.js' -import subtract from './subtract.js' - -export { - add, - bell, - calendar, - check, - chevron_down, - chevron_left, - chevron_right, - chevron_up, - close, - exclamation, - more, - question, - save, - search, - subtract -} diff --git a/packages/dnb-ui-lib/src/icons/02_primary_icons_medium.js b/packages/dnb-ui-lib/src/icons/02_primary_icons_medium.js deleted file mode 100644 index 964115c8e32..00000000000 --- a/packages/dnb-ui-lib/src/icons/02_primary_icons_medium.js +++ /dev/null @@ -1,35 +0,0 @@ -/** This file is auto generated by convertSvgToJsx.js */ - -import add_medium from './add_medium.js' -import bell_medium from './bell_medium.js' -import calendar_medium from './calendar_medium.js' -import check_medium from './check_medium.js' -import chevron_down_medium from './chevron_down_medium.js' -import chevron_left_medium from './chevron_left_medium.js' -import chevron_right_medium from './chevron_right_medium.js' -import chevron_up_medium from './chevron_up_medium.js' -import close_medium from './close_medium.js' -import exclamation_medium from './exclamation_medium.js' -import more_medium from './more_medium.js' -import question_medium from './question_medium.js' -import save_medium from './save_medium.js' -import search_medium from './search_medium.js' -import subtract_medium from './subtract_medium.js' - -export { - add_medium, - bell_medium, - calendar_medium, - check_medium, - chevron_down_medium, - chevron_left_medium, - chevron_right_medium, - chevron_up_medium, - close_medium, - exclamation_medium, - more_medium, - question_medium, - save_medium, - search_medium, - subtract_medium -} diff --git a/packages/dnb-ui-lib/src/icons/03_secondary_icons.js b/packages/dnb-ui-lib/src/icons/03_secondary_icons.js deleted file mode 100644 index 2677be5f322..00000000000 --- a/packages/dnb-ui-lib/src/icons/03_secondary_icons.js +++ /dev/null @@ -1,6 +0,0 @@ -/** This file is auto generated by convertSvgToJsx.js */ - -import fullscreen from './fullscreen.js' -import hamburger from './hamburger.js' - -export { fullscreen, hamburger } diff --git a/packages/dnb-ui-lib/src/icons/04_secondary_icons_medium.js b/packages/dnb-ui-lib/src/icons/04_secondary_icons_medium.js deleted file mode 100644 index fa5bd5d6fd2..00000000000 --- a/packages/dnb-ui-lib/src/icons/04_secondary_icons_medium.js +++ /dev/null @@ -1,6 +0,0 @@ -/** This file is auto generated by convertSvgToJsx.js */ - -import fullscreen_medium from './fullscreen_medium.js' -import hamburger_medium from './hamburger_medium.js' - -export { fullscreen_medium, hamburger_medium }