From d6dd2f647ba2009882f6e71c817985b8fcb2f266 Mon Sep 17 00:00:00 2001 From: ayusharma Date: Tue, 17 Jul 2018 21:22:44 +0200 Subject: [PATCH] refactor: removes un-necessary 'src' from webui path --- src/webui/{src => }/app.js | 0 src/webui/{src => }/components/Footer/earth.svg | 0 .../components/Footer/flags/brazil-1f1e7-1f1f7.svg | 0 .../components/Footer/flags/china-1f1e8-1f1f3.svg | 0 .../components/Footer/flags/india-1f1ee-1f1f3.svg | 0 .../Footer/flags/nicaragua-1f1f3-1f1ee.svg | 0 .../Footer/flags/pakistan-1f1f5-1f1f0.svg | 0 .../components/Footer/flags/spain-1f1ea-1f1f8.svg | 0 src/webui/{src => }/components/Footer/footer.scss | 0 src/webui/{src => }/components/Footer/index.js | 0 src/webui/{src => }/components/Footer/logo.svg | 0 src/webui/{src => }/components/Header/header.scss | 0 src/webui/{src => }/components/Header/index.js | 8 ++++---- src/webui/{src => }/components/Header/logo.png | Bin src/webui/{src => }/components/Help/help.scss | 0 src/webui/{src => }/components/Help/index.js | 2 +- src/webui/{src => }/components/NoItems/index.js | 0 src/webui/{src => }/components/NoItems/noItems.scss | 0 src/webui/{src => }/components/NotFound/404.scss | 0 src/webui/{src => }/components/NotFound/index.js | 0 src/webui/{src => }/components/Package/index.js | 0 src/webui/{src => }/components/Package/package.scss | 0 .../{src => }/components/PackageDetail/index.js | 0 .../components/PackageDetail/packageDetail.scss | 0 src/webui/{src => }/components/PackageList/index.js | 0 .../components/PackageList/packageList.scss | 0 .../components/PackageSidebar/Module/index.jsx | 0 .../components/PackageSidebar/Module/style.scss | 0 .../ModuleContentPlaceholder/index.jsx | 0 .../ModuleContentPlaceholder/style.scss | 0 .../{src => }/components/PackageSidebar/index.jsx | 2 +- .../PackageSidebar/modules/Dependencies/index.jsx | 2 +- .../PackageSidebar/modules/Dependencies/style.scss | 0 .../PackageSidebar/modules/Infos/index.jsx | 0 .../PackageSidebar/modules/Infos/style.scss | 0 .../PackageSidebar/modules/LastSync/index.jsx | 0 .../PackageSidebar/modules/LastSync/style.scss | 0 .../modules/Maintainers/MaintainerInfo/index.jsx | 0 .../modules/Maintainers/MaintainerInfo/style.scss | 0 .../PackageSidebar/modules/Maintainers/index.jsx | 0 .../PackageSidebar/modules/Maintainers/style.scss | 0 src/webui/{src => }/components/Readme/index.js | 0 src/webui/{src => }/components/Readme/readme.scss | 0 src/webui/{src => }/components/Search/index.js | 0 src/webui/{src => }/components/Search/search.scss | 0 src/webui/{src => }/index.js | 2 +- src/webui/{src => }/modules/detail/detail.scss | 0 src/webui/{src => }/modules/detail/index.jsx | 2 +- src/webui/{src => }/modules/home/home.scss | 0 src/webui/{src => }/modules/home/index.js | 2 +- src/webui/{src => }/router.js | 0 src/webui/{src => }/styles/global.scss | 0 src/webui/{src => }/styles/variable.scss | 0 src/webui/{src => }/utils/DateUtils.js | 0 src/webui/{src => }/utils/asyncComponent.js | 0 test/unit/api/utils.spec.js | 2 +- .../components/PackageSidebar/dependencies.spec.js | 2 +- .../webui/components/PackageSidebar/infos.spec.js | 2 +- .../components/PackageSidebar/lastsync.spec.js | 2 +- .../PackageSidebar/maintainerInfo.spec.js | 2 +- .../components/PackageSidebar/maintainers.spec.js | 2 +- .../webui/components/PackageSidebar/module.spec.js | 2 +- .../PackageSidebar/moduleContentPlaceholder.spec.js | 2 +- .../PackageSidebar/packageSidebar.spec.js | 2 +- test/unit/webui/components/header.spec.js | 2 +- test/unit/webui/components/help.spec.js | 2 +- test/unit/webui/components/noitems.spec.js | 2 +- test/unit/webui/components/notfound.spec.js | 2 +- test/unit/webui/components/package.spec.js | 2 +- test/unit/webui/components/packagedetail.spec.js | 4 ++-- test/unit/webui/components/packagelist.spec.js | 6 +++--- test/unit/webui/components/readme.spec.js | 2 +- test/unit/webui/components/search.spec.js | 2 +- tools/webpack.dev.config.babel.js | 2 +- tools/webpack.prod.config.babel.js | 2 +- 75 files changed, 33 insertions(+), 33 deletions(-) rename src/webui/{src => }/app.js (100%) rename src/webui/{src => }/components/Footer/earth.svg (100%) rename src/webui/{src => }/components/Footer/flags/brazil-1f1e7-1f1f7.svg (100%) rename src/webui/{src => }/components/Footer/flags/china-1f1e8-1f1f3.svg (100%) rename src/webui/{src => }/components/Footer/flags/india-1f1ee-1f1f3.svg (100%) rename src/webui/{src => }/components/Footer/flags/nicaragua-1f1f3-1f1ee.svg (100%) rename src/webui/{src => }/components/Footer/flags/pakistan-1f1f5-1f1f0.svg (100%) rename src/webui/{src => }/components/Footer/flags/spain-1f1ea-1f1f8.svg (100%) rename src/webui/{src => }/components/Footer/footer.scss (100%) rename src/webui/{src => }/components/Footer/index.js (100%) rename src/webui/{src => }/components/Footer/logo.svg (100%) rename src/webui/{src => }/components/Header/header.scss (100%) rename src/webui/{src => }/components/Header/index.js (96%) rename src/webui/{src => }/components/Header/logo.png (100%) rename src/webui/{src => }/components/Help/help.scss (100%) rename src/webui/{src => }/components/Help/index.js (96%) rename src/webui/{src => }/components/NoItems/index.js (100%) rename src/webui/{src => }/components/NoItems/noItems.scss (100%) rename src/webui/{src => }/components/NotFound/404.scss (100%) rename src/webui/{src => }/components/NotFound/index.js (100%) rename src/webui/{src => }/components/Package/index.js (100%) rename src/webui/{src => }/components/Package/package.scss (100%) rename src/webui/{src => }/components/PackageDetail/index.js (100%) rename src/webui/{src => }/components/PackageDetail/packageDetail.scss (100%) rename src/webui/{src => }/components/PackageList/index.js (100%) rename src/webui/{src => }/components/PackageList/packageList.scss (100%) rename src/webui/{src => }/components/PackageSidebar/Module/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/Module/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/ModuleContentPlaceholder/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/ModuleContentPlaceholder/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/index.jsx (97%) rename src/webui/{src => }/components/PackageSidebar/modules/Dependencies/index.jsx (95%) rename src/webui/{src => }/components/PackageSidebar/modules/Dependencies/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Infos/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Infos/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/modules/LastSync/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/modules/LastSync/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Maintainers/MaintainerInfo/style.scss (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Maintainers/index.jsx (100%) rename src/webui/{src => }/components/PackageSidebar/modules/Maintainers/style.scss (100%) rename src/webui/{src => }/components/Readme/index.js (100%) rename src/webui/{src => }/components/Readme/readme.scss (100%) rename src/webui/{src => }/components/Search/index.js (100%) rename src/webui/{src => }/components/Search/search.scss (100%) rename src/webui/{src => }/index.js (91%) rename src/webui/{src => }/modules/detail/detail.scss (100%) rename src/webui/{src => }/modules/detail/index.jsx (97%) rename src/webui/{src => }/modules/home/home.scss (100%) rename src/webui/{src => }/modules/home/index.js (98%) rename src/webui/{src => }/router.js (100%) rename src/webui/{src => }/styles/global.scss (100%) rename src/webui/{src => }/styles/variable.scss (100%) rename src/webui/{src => }/utils/DateUtils.js (100%) rename src/webui/{src => }/utils/asyncComponent.js (100%) diff --git a/src/webui/src/app.js b/src/webui/app.js similarity index 100% rename from src/webui/src/app.js rename to src/webui/app.js diff --git a/src/webui/src/components/Footer/earth.svg b/src/webui/components/Footer/earth.svg similarity index 100% rename from src/webui/src/components/Footer/earth.svg rename to src/webui/components/Footer/earth.svg diff --git a/src/webui/src/components/Footer/flags/brazil-1f1e7-1f1f7.svg b/src/webui/components/Footer/flags/brazil-1f1e7-1f1f7.svg similarity index 100% rename from src/webui/src/components/Footer/flags/brazil-1f1e7-1f1f7.svg rename to src/webui/components/Footer/flags/brazil-1f1e7-1f1f7.svg diff --git a/src/webui/src/components/Footer/flags/china-1f1e8-1f1f3.svg b/src/webui/components/Footer/flags/china-1f1e8-1f1f3.svg similarity index 100% rename from src/webui/src/components/Footer/flags/china-1f1e8-1f1f3.svg rename to src/webui/components/Footer/flags/china-1f1e8-1f1f3.svg diff --git a/src/webui/src/components/Footer/flags/india-1f1ee-1f1f3.svg b/src/webui/components/Footer/flags/india-1f1ee-1f1f3.svg similarity index 100% rename from src/webui/src/components/Footer/flags/india-1f1ee-1f1f3.svg rename to src/webui/components/Footer/flags/india-1f1ee-1f1f3.svg diff --git a/src/webui/src/components/Footer/flags/nicaragua-1f1f3-1f1ee.svg b/src/webui/components/Footer/flags/nicaragua-1f1f3-1f1ee.svg similarity index 100% rename from src/webui/src/components/Footer/flags/nicaragua-1f1f3-1f1ee.svg rename to src/webui/components/Footer/flags/nicaragua-1f1f3-1f1ee.svg diff --git a/src/webui/src/components/Footer/flags/pakistan-1f1f5-1f1f0.svg b/src/webui/components/Footer/flags/pakistan-1f1f5-1f1f0.svg similarity index 100% rename from src/webui/src/components/Footer/flags/pakistan-1f1f5-1f1f0.svg rename to src/webui/components/Footer/flags/pakistan-1f1f5-1f1f0.svg diff --git a/src/webui/src/components/Footer/flags/spain-1f1ea-1f1f8.svg b/src/webui/components/Footer/flags/spain-1f1ea-1f1f8.svg similarity index 100% rename from src/webui/src/components/Footer/flags/spain-1f1ea-1f1f8.svg rename to src/webui/components/Footer/flags/spain-1f1ea-1f1f8.svg diff --git a/src/webui/src/components/Footer/footer.scss b/src/webui/components/Footer/footer.scss similarity index 100% rename from src/webui/src/components/Footer/footer.scss rename to src/webui/components/Footer/footer.scss diff --git a/src/webui/src/components/Footer/index.js b/src/webui/components/Footer/index.js similarity index 100% rename from src/webui/src/components/Footer/index.js rename to src/webui/components/Footer/index.js diff --git a/src/webui/src/components/Footer/logo.svg b/src/webui/components/Footer/logo.svg similarity index 100% rename from src/webui/src/components/Footer/logo.svg rename to src/webui/components/Footer/logo.svg diff --git a/src/webui/src/components/Header/header.scss b/src/webui/components/Header/header.scss similarity index 100% rename from src/webui/src/components/Header/header.scss rename to src/webui/components/Header/header.scss diff --git a/src/webui/src/components/Header/index.js b/src/webui/components/Header/index.js similarity index 96% rename from src/webui/src/components/Header/index.js rename to src/webui/components/Header/index.js index 3243aed20..3bdecc330 100644 --- a/src/webui/src/components/Header/index.js +++ b/src/webui/components/Header/index.js @@ -5,10 +5,10 @@ import isNumber from 'lodash/isNumber'; import capitalize from 'lodash/capitalize'; import {Link} from 'react-router-dom'; -import API from '../../../utils/api'; -import storage from '../../../utils/storage'; -import {getRegistryURL} from '../../../utils/url'; -import {HEADERS} from '../../../../lib/constants'; +import API from '../../utils/api'; +import storage from '../../utils/storage'; +import {getRegistryURL} from '../../utils/url'; +import {HEADERS} from '../../../lib/constants'; import classes from './header.scss'; import './logo.png'; diff --git a/src/webui/src/components/Header/logo.png b/src/webui/components/Header/logo.png similarity index 100% rename from src/webui/src/components/Header/logo.png rename to src/webui/components/Header/logo.png diff --git a/src/webui/src/components/Help/help.scss b/src/webui/components/Help/help.scss similarity index 100% rename from src/webui/src/components/Help/help.scss rename to src/webui/components/Help/help.scss diff --git a/src/webui/src/components/Help/index.js b/src/webui/components/Help/index.js similarity index 96% rename from src/webui/src/components/Help/index.js rename to src/webui/components/Help/index.js index 27dad4489..63f61d6d8 100644 --- a/src/webui/src/components/Help/index.js +++ b/src/webui/components/Help/index.js @@ -4,7 +4,7 @@ import sunburst from 'react-syntax-highlighter/src/styles/sunburst'; import js from 'react-syntax-highlighter/dist/languages/javascript'; import classes from './help.scss'; -import {getRegistryURL} from '../../../utils/url'; +import {getRegistryURL} from '../../utils/url'; registerLanguage('javascript', js); diff --git a/src/webui/src/components/NoItems/index.js b/src/webui/components/NoItems/index.js similarity index 100% rename from src/webui/src/components/NoItems/index.js rename to src/webui/components/NoItems/index.js diff --git a/src/webui/src/components/NoItems/noItems.scss b/src/webui/components/NoItems/noItems.scss similarity index 100% rename from src/webui/src/components/NoItems/noItems.scss rename to src/webui/components/NoItems/noItems.scss diff --git a/src/webui/src/components/NotFound/404.scss b/src/webui/components/NotFound/404.scss similarity index 100% rename from src/webui/src/components/NotFound/404.scss rename to src/webui/components/NotFound/404.scss diff --git a/src/webui/src/components/NotFound/index.js b/src/webui/components/NotFound/index.js similarity index 100% rename from src/webui/src/components/NotFound/index.js rename to src/webui/components/NotFound/index.js diff --git a/src/webui/src/components/Package/index.js b/src/webui/components/Package/index.js similarity index 100% rename from src/webui/src/components/Package/index.js rename to src/webui/components/Package/index.js diff --git a/src/webui/src/components/Package/package.scss b/src/webui/components/Package/package.scss similarity index 100% rename from src/webui/src/components/Package/package.scss rename to src/webui/components/Package/package.scss diff --git a/src/webui/src/components/PackageDetail/index.js b/src/webui/components/PackageDetail/index.js similarity index 100% rename from src/webui/src/components/PackageDetail/index.js rename to src/webui/components/PackageDetail/index.js diff --git a/src/webui/src/components/PackageDetail/packageDetail.scss b/src/webui/components/PackageDetail/packageDetail.scss similarity index 100% rename from src/webui/src/components/PackageDetail/packageDetail.scss rename to src/webui/components/PackageDetail/packageDetail.scss diff --git a/src/webui/src/components/PackageList/index.js b/src/webui/components/PackageList/index.js similarity index 100% rename from src/webui/src/components/PackageList/index.js rename to src/webui/components/PackageList/index.js diff --git a/src/webui/src/components/PackageList/packageList.scss b/src/webui/components/PackageList/packageList.scss similarity index 100% rename from src/webui/src/components/PackageList/packageList.scss rename to src/webui/components/PackageList/packageList.scss diff --git a/src/webui/src/components/PackageSidebar/Module/index.jsx b/src/webui/components/PackageSidebar/Module/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/Module/index.jsx rename to src/webui/components/PackageSidebar/Module/index.jsx diff --git a/src/webui/src/components/PackageSidebar/Module/style.scss b/src/webui/components/PackageSidebar/Module/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/Module/style.scss rename to src/webui/components/PackageSidebar/Module/style.scss diff --git a/src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/index.jsx b/src/webui/components/PackageSidebar/ModuleContentPlaceholder/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/index.jsx rename to src/webui/components/PackageSidebar/ModuleContentPlaceholder/index.jsx diff --git a/src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/style.scss b/src/webui/components/PackageSidebar/ModuleContentPlaceholder/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/style.scss rename to src/webui/components/PackageSidebar/ModuleContentPlaceholder/style.scss diff --git a/src/webui/src/components/PackageSidebar/index.jsx b/src/webui/components/PackageSidebar/index.jsx similarity index 97% rename from src/webui/src/components/PackageSidebar/index.jsx rename to src/webui/components/PackageSidebar/index.jsx index deed61706..bd4ed1e28 100644 --- a/src/webui/src/components/PackageSidebar/index.jsx +++ b/src/webui/components/PackageSidebar/index.jsx @@ -5,7 +5,7 @@ import Maintainers from './modules/Maintainers'; import Dependencies from './modules/Dependencies'; import Infos from './modules/Infos'; -import API from '../../../utils/api'; +import API from '../../utils/api'; export default class PackageSidebar extends React.Component { state = {}; diff --git a/src/webui/src/components/PackageSidebar/modules/Dependencies/index.jsx b/src/webui/components/PackageSidebar/modules/Dependencies/index.jsx similarity index 95% rename from src/webui/src/components/PackageSidebar/modules/Dependencies/index.jsx rename to src/webui/components/PackageSidebar/modules/Dependencies/index.jsx index d573612a3..ffe3db964 100644 --- a/src/webui/src/components/PackageSidebar/modules/Dependencies/index.jsx +++ b/src/webui/components/PackageSidebar/modules/Dependencies/index.jsx @@ -4,7 +4,7 @@ import get from 'lodash/get'; import Module from '../../Module'; import classes from './style.scss'; -import {getDetailPageURL} from '../../../../../utils/url'; +import {getDetailPageURL} from '../../../../utils/url'; import ModuleContentPlaceholder from '../../ModuleContentPlaceholder'; export default class Dependencies extends React.Component { diff --git a/src/webui/src/components/PackageSidebar/modules/Dependencies/style.scss b/src/webui/components/PackageSidebar/modules/Dependencies/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Dependencies/style.scss rename to src/webui/components/PackageSidebar/modules/Dependencies/style.scss diff --git a/src/webui/src/components/PackageSidebar/modules/Infos/index.jsx b/src/webui/components/PackageSidebar/modules/Infos/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Infos/index.jsx rename to src/webui/components/PackageSidebar/modules/Infos/index.jsx diff --git a/src/webui/src/components/PackageSidebar/modules/Infos/style.scss b/src/webui/components/PackageSidebar/modules/Infos/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Infos/style.scss rename to src/webui/components/PackageSidebar/modules/Infos/style.scss diff --git a/src/webui/src/components/PackageSidebar/modules/LastSync/index.jsx b/src/webui/components/PackageSidebar/modules/LastSync/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/LastSync/index.jsx rename to src/webui/components/PackageSidebar/modules/LastSync/index.jsx diff --git a/src/webui/src/components/PackageSidebar/modules/LastSync/style.scss b/src/webui/components/PackageSidebar/modules/LastSync/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/LastSync/style.scss rename to src/webui/components/PackageSidebar/modules/LastSync/style.scss diff --git a/src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index.jsx b/src/webui/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index.jsx rename to src/webui/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index.jsx diff --git a/src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo/style.scss b/src/webui/components/PackageSidebar/modules/Maintainers/MaintainerInfo/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo/style.scss rename to src/webui/components/PackageSidebar/modules/Maintainers/MaintainerInfo/style.scss diff --git a/src/webui/src/components/PackageSidebar/modules/Maintainers/index.jsx b/src/webui/components/PackageSidebar/modules/Maintainers/index.jsx similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Maintainers/index.jsx rename to src/webui/components/PackageSidebar/modules/Maintainers/index.jsx diff --git a/src/webui/src/components/PackageSidebar/modules/Maintainers/style.scss b/src/webui/components/PackageSidebar/modules/Maintainers/style.scss similarity index 100% rename from src/webui/src/components/PackageSidebar/modules/Maintainers/style.scss rename to src/webui/components/PackageSidebar/modules/Maintainers/style.scss diff --git a/src/webui/src/components/Readme/index.js b/src/webui/components/Readme/index.js similarity index 100% rename from src/webui/src/components/Readme/index.js rename to src/webui/components/Readme/index.js diff --git a/src/webui/src/components/Readme/readme.scss b/src/webui/components/Readme/readme.scss similarity index 100% rename from src/webui/src/components/Readme/readme.scss rename to src/webui/components/Readme/readme.scss diff --git a/src/webui/src/components/Search/index.js b/src/webui/components/Search/index.js similarity index 100% rename from src/webui/src/components/Search/index.js rename to src/webui/components/Search/index.js diff --git a/src/webui/src/components/Search/search.scss b/src/webui/components/Search/search.scss similarity index 100% rename from src/webui/src/components/Search/search.scss rename to src/webui/components/Search/search.scss diff --git a/src/webui/src/index.js b/src/webui/index.js similarity index 91% rename from src/webui/src/index.js rename to src/webui/index.js index 76b24d453..c9e4713a8 100644 --- a/src/webui/src/index.js +++ b/src/webui/index.js @@ -1,4 +1,4 @@ -import '../utils/__setPublicPath__'; +import './utils/__setPublicPath__'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/src/webui/src/modules/detail/detail.scss b/src/webui/modules/detail/detail.scss similarity index 100% rename from src/webui/src/modules/detail/detail.scss rename to src/webui/modules/detail/detail.scss diff --git a/src/webui/src/modules/detail/index.jsx b/src/webui/modules/detail/index.jsx similarity index 97% rename from src/webui/src/modules/detail/index.jsx rename to src/webui/modules/detail/index.jsx index 0c305426c..6b0266941 100644 --- a/src/webui/src/modules/detail/index.jsx +++ b/src/webui/modules/detail/index.jsx @@ -5,7 +5,7 @@ import isEmpty from 'lodash/isEmpty'; import PackageDetail from '../../components/PackageDetail'; import NotFound from '../../components/NotFound'; -import API from '../../../utils/api'; +import API from '../../utils/api'; import classes from './detail.scss'; import PackageSidebar from '../../components/PackageSidebar/index'; diff --git a/src/webui/src/modules/home/home.scss b/src/webui/modules/home/home.scss similarity index 100% rename from src/webui/src/modules/home/home.scss rename to src/webui/modules/home/home.scss diff --git a/src/webui/src/modules/home/index.js b/src/webui/modules/home/index.js similarity index 98% rename from src/webui/src/modules/home/index.js rename to src/webui/modules/home/index.js index 72a19879f..31be75219 100644 --- a/src/webui/src/modules/home/index.js +++ b/src/webui/modules/home/index.js @@ -4,7 +4,7 @@ import {Loading, MessageBox} from 'element-react'; import isEmpty from 'lodash/isEmpty'; import debounce from 'lodash/debounce'; -import API from '../../../utils/api'; +import API from '../../utils/api'; import PackageList from '../../components/PackageList'; import Search from '../../components/Search'; diff --git a/src/webui/src/router.js b/src/webui/router.js similarity index 100% rename from src/webui/src/router.js rename to src/webui/router.js diff --git a/src/webui/src/styles/global.scss b/src/webui/styles/global.scss similarity index 100% rename from src/webui/src/styles/global.scss rename to src/webui/styles/global.scss diff --git a/src/webui/src/styles/variable.scss b/src/webui/styles/variable.scss similarity index 100% rename from src/webui/src/styles/variable.scss rename to src/webui/styles/variable.scss diff --git a/src/webui/src/utils/DateUtils.js b/src/webui/utils/DateUtils.js similarity index 100% rename from src/webui/src/utils/DateUtils.js rename to src/webui/utils/DateUtils.js diff --git a/src/webui/src/utils/asyncComponent.js b/src/webui/utils/asyncComponent.js similarity index 100% rename from src/webui/src/utils/asyncComponent.js rename to src/webui/utils/asyncComponent.js diff --git a/test/unit/api/utils.spec.js b/test/unit/api/utils.spec.js index 2a6fdc65e..0b8523c18 100644 --- a/test/unit/api/utils.spec.js +++ b/test/unit/api/utils.spec.js @@ -2,7 +2,7 @@ import assert from 'assert'; import {generateGravatarUrl, GRAVATAR_DEFAULT} from '../../../src/utils/user'; import {spliceURL} from '../../../src/utils/string'; -import Package from "../../../src/webui/src/components/Package/index"; +import Package from "../../../src/webui/components/Package/index"; import {validateName as validate, convertDistRemoteToLocalTarballUrls, parseReadme} from '../../../src/lib/utils'; import Logger, {setup} from '../../../src/lib/logger'; import { readFile } from '../../functional/lib/test.utils'; diff --git a/test/unit/webui/components/PackageSidebar/dependencies.spec.js b/test/unit/webui/components/PackageSidebar/dependencies.spec.js index 7405ef4d6..7c103418e 100644 --- a/test/unit/webui/components/PackageSidebar/dependencies.spec.js +++ b/test/unit/webui/components/PackageSidebar/dependencies.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount, shallow } from 'enzyme'; -import Dependencies from '../../../../../src/webui/src/components/PackageSidebar/modules/Dependencies/index'; +import Dependencies from '../../../../../src/webui/components/PackageSidebar/modules/Dependencies/index'; import { packageMeta } from '../store/packageMeta'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/infos.spec.js b/test/unit/webui/components/PackageSidebar/infos.spec.js index c1efb528d..87ce7d70b 100644 --- a/test/unit/webui/components/PackageSidebar/infos.spec.js +++ b/test/unit/webui/components/PackageSidebar/infos.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount, shallow } from 'enzyme'; -import Infos from '../../../../../src/webui/src/components/PackageSidebar/modules/Infos/index'; +import Infos from '../../../../../src/webui/components/PackageSidebar/modules/Infos/index'; import { packageMeta } from '../store/packageMeta'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/lastsync.spec.js b/test/unit/webui/components/PackageSidebar/lastsync.spec.js index a51230b6a..cdb31502e 100644 --- a/test/unit/webui/components/PackageSidebar/lastsync.spec.js +++ b/test/unit/webui/components/PackageSidebar/lastsync.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount, shallow } from 'enzyme'; -import LastSync from '../../../../../src/webui/src/components/PackageSidebar/modules/LastSync/index'; +import LastSync from '../../../../../src/webui/components/PackageSidebar/modules/LastSync/index'; import { packageMeta } from '../store/packageMeta'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/maintainerInfo.spec.js b/test/unit/webui/components/PackageSidebar/maintainerInfo.spec.js index 56658eea3..95a4caed8 100644 --- a/test/unit/webui/components/PackageSidebar/maintainerInfo.spec.js +++ b/test/unit/webui/components/PackageSidebar/maintainerInfo.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import MaintainerInfo from '../../../../../src/webui/src/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index'; +import MaintainerInfo from '../../../../../src/webui/components/PackageSidebar/modules/Maintainers/MaintainerInfo/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/maintainers.spec.js b/test/unit/webui/components/PackageSidebar/maintainers.spec.js index a52f4f19b..29b57e696 100644 --- a/test/unit/webui/components/PackageSidebar/maintainers.spec.js +++ b/test/unit/webui/components/PackageSidebar/maintainers.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import Maintainers from '../../../../../src/webui/src/components/PackageSidebar/modules/Maintainers/index'; +import Maintainers from '../../../../../src/webui/components/PackageSidebar/modules/Maintainers/index'; import { packageMeta } from '../store/packageMeta'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/module.spec.js b/test/unit/webui/components/PackageSidebar/module.spec.js index 251ffa11b..e30530ba0 100644 --- a/test/unit/webui/components/PackageSidebar/module.spec.js +++ b/test/unit/webui/components/PackageSidebar/module.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Module from '../../../../../src/webui/src/components/PackageSidebar/Module/index'; +import Module from '../../../../../src/webui/components/PackageSidebar/Module/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js b/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js index d3839bedb..65cb7935b 100644 --- a/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js +++ b/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import ModuleContentPlaceholder from '../../../../../src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/index'; +import ModuleContentPlaceholder from '../../../../../src/webui/components/PackageSidebar/ModuleContentPlaceholder/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js b/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js index 6831fbcd6..1526103b5 100644 --- a/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js +++ b/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import PackageSidebar from '../../../../../src/webui/src/components/PackageSidebar/index'; +import PackageSidebar from '../../../../../src/webui/components/PackageSidebar/index'; import { packageMeta } from '../store/packageMeta'; jest.mock('../../../../../src/webui/utils/api', () => ({ diff --git a/test/unit/webui/components/header.spec.js b/test/unit/webui/components/header.spec.js index 0083397b2..161ba70af 100644 --- a/test/unit/webui/components/header.spec.js +++ b/test/unit/webui/components/header.spec.js @@ -3,7 +3,7 @@ */ import React from 'react'; import { shallow, mount } from 'enzyme'; -import Header from '../../../../src/webui/src/components/Header'; +import Header from '../../../../src/webui/components/Header'; import { BrowserRouter } from 'react-router-dom'; import storage from '../../../../src/webui/utils/storage'; diff --git a/test/unit/webui/components/help.spec.js b/test/unit/webui/components/help.spec.js index 344d43568..5998ecddb 100644 --- a/test/unit/webui/components/help.spec.js +++ b/test/unit/webui/components/help.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import SyntaxHighlighter from 'react-syntax-highlighter/dist/light'; -import Help from '../../../../src/webui/src/components/Help/index'; +import Help from '../../../../src/webui/components/Help/index'; describe(' component', () => { diff --git a/test/unit/webui/components/noitems.spec.js b/test/unit/webui/components/noitems.spec.js index 7bfb26bc2..30938a9c0 100644 --- a/test/unit/webui/components/noitems.spec.js +++ b/test/unit/webui/components/noitems.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import NoItems from '../../../../src/webui/src/components/NoItems/index'; +import NoItems from '../../../../src/webui/components/NoItems/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/notfound.spec.js b/test/unit/webui/components/notfound.spec.js index 5b294451c..6c285f272 100644 --- a/test/unit/webui/components/notfound.spec.js +++ b/test/unit/webui/components/notfound.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import NotFound from '../../../../src/webui/src/components/NotFound/index'; +import NotFound from '../../../../src/webui/components/NotFound/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/package.spec.js b/test/unit/webui/components/package.spec.js index 208e41010..abc5d07c9 100644 --- a/test/unit/webui/components/package.spec.js +++ b/test/unit/webui/components/package.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import Package from '../../../../src/webui/src/components/Package/index'; +import Package from '../../../../src/webui/components/Package/index'; import { BrowserRouter } from 'react-router-dom'; /** diff --git a/test/unit/webui/components/packagedetail.spec.js b/test/unit/webui/components/packagedetail.spec.js index 526ff03ec..c2292d89e 100644 --- a/test/unit/webui/components/packagedetail.spec.js +++ b/test/unit/webui/components/packagedetail.spec.js @@ -3,8 +3,8 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import PackageDetail from '../../../../src/webui/src/components/PackageDetail/index'; -import Readme from '../../../../src/webui/src/components/Readme/index'; +import PackageDetail from '../../../../src/webui/components/PackageDetail/index'; +import Readme from '../../../../src/webui/components/Readme/index'; import {WEB_TITLE} from '../../../../src/lib/constants'; console.error = jest.fn(); diff --git a/test/unit/webui/components/packagelist.spec.js b/test/unit/webui/components/packagelist.spec.js index 57344bab7..bee0d07f9 100644 --- a/test/unit/webui/components/packagelist.spec.js +++ b/test/unit/webui/components/packagelist.spec.js @@ -4,9 +4,9 @@ import React from 'react'; import { mount } from 'enzyme'; -import PackageList from '../../../../src/webui/src/components/PackageList/index'; -import Help from '../../../../src/webui/src/components/Help/index'; -import NoItems from '../../../../src/webui/src/components/NoItems/index'; +import PackageList from '../../../../src/webui/components/PackageList/index'; +import Help from '../../../../src/webui/components/Help/index'; +import NoItems from '../../../../src/webui/components/NoItems/index'; import { BrowserRouter } from 'react-router-dom'; describe(' component', () => { diff --git a/test/unit/webui/components/readme.spec.js b/test/unit/webui/components/readme.spec.js index 74e7a1269..c5f7de576 100644 --- a/test/unit/webui/components/readme.spec.js +++ b/test/unit/webui/components/readme.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Readme from '../../../../src/webui/src/components/Readme/index'; +import Readme from '../../../../src/webui/components/Readme/index'; console.error = jest.fn(); diff --git a/test/unit/webui/components/search.spec.js b/test/unit/webui/components/search.spec.js index 0bdf6d806..643ea98f9 100644 --- a/test/unit/webui/components/search.spec.js +++ b/test/unit/webui/components/search.spec.js @@ -4,7 +4,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Search from '../../../../src/webui/src/components/Search/index'; +import Search from '../../../../src/webui/components/Search/index'; console.error = jest.fn(); describe(' component', () => { diff --git a/tools/webpack.dev.config.babel.js b/tools/webpack.dev.config.babel.js index 308aef78f..a435214b2 100644 --- a/tools/webpack.dev.config.babel.js +++ b/tools/webpack.dev.config.babel.js @@ -17,7 +17,7 @@ export default { 'react-hot-loader/patch', 'webpack-dev-server/client?http://localhost:4872', 'webpack/hot/only-dev-server', - `${env.SRC_ROOT}/webui/src/index.js`, + `${env.SRC_ROOT}/webui/index.js`, ], }, diff --git a/tools/webpack.prod.config.babel.js b/tools/webpack.prod.config.babel.js index 55258215c..ae41b5eaa 100644 --- a/tools/webpack.prod.config.babel.js +++ b/tools/webpack.prod.config.babel.js @@ -27,7 +27,7 @@ const prodConf = { mode: 'production', entry: { - main: ['babel-polyfill', 'whatwg-fetch', `${env.SRC_ROOT}/webui/src/index.js`], + main: ['babel-polyfill', 'whatwg-fetch', `${env.SRC_ROOT}/webui/index.js`], }, module: {