8
0

getrealimportpath.js 457 B

1234567891011121314
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* eslint-env node */
  6. module.exports = function getRealImportPath( modulePath ) {
  7. if ( modulePath.includes( 'ckeditor-' ) ) {
  8. return modulePath.replace( /^([^/]+)\//, '@ckeditor/$1/src/' );
  9. }
  10. return modulePath.replace( /^([^/]+)\//, '@ckeditor/ckeditor5-$1/src/' );
  11. };