Restructure and update imports

pull/1331/head
Kamran Ahmed 5 years ago
parent 5b4cc86f61
commit 51b2c70586
  1. 2
      components/featured-content/roadmaps.js
  2. 2
      components/helmet/index.js
  3. 2
      components/mdx-components/heading.js
  4. 2
      components/page-footer/index.js
  5. 8
      components/roadmap-summary/index.js
  6. 2
      layouts/default/index.js
  7. 2
      lib/author.js
  8. 6
      lib/guide.js
  9. 2
      lib/roadmap.js
  10. 2
      lib/url.js
  11. 2
      pages/guides/[guide].js
  12. 12
      pages/guides/index.js
  13. 6
      pages/roadmaps.js
  14. 4
      path-map.js
  15. 4
      readme.md
  16. 0
      storage/authors.json
  17. 0
      storage/guides.json
  18. 0
      storage/guides/design-patterns-for-humans.md
  19. 0
      storage/guides/dns-in-one-picture.md
  20. 0
      storage/guides/http-caching.md
  21. 0
      storage/guides/journey-to-http2.md
  22. 0
      storage/project/backend-map.json
  23. 0
      storage/project/devops-map.json
  24. 0
      storage/project/disclaimer.json
  25. 0
      storage/project/frontend-map.json
  26. 0
      storage/project/intro-map.json
  27. 0
      storage/roadmaps.json
  28. 0
      storage/roadmaps/upcoming.md
  29. 0
      storage/site.json
  30. 6
      test/path-map.spec.js

@ -1,6 +1,6 @@
import Link from 'next/link';
import { FeaturedContentWrap } from './style';
import roadmaps from 'data/roadmaps';
import roadmaps from 'storage/roadmaps';
import FeaturedRoadmap from 'components/featured-roadmap';
const FeaturedRoadmaps = () => (

@ -1,5 +1,5 @@
import NextHead from 'next/head';
import siteConfig from 'data/site';
import siteConfig from 'storage/site';
import { GA_TRACKING_ID } from 'lib/gtag';
const prepareTitle = (givenTitle) => {

@ -1,5 +1,5 @@
import styled from 'styled-components';
import Link from '../icons/link.svg';
import Link from 'components/icons/link.svg';
const linkify = (Component) => {
return (props) => {

@ -1,5 +1,5 @@
import Link from 'next/link';
import siteConfig from "data/site";
import siteConfig from "storage/site";
import { FooterWrap } from './style.js'
const PageFooter = () => (

@ -1,5 +1,7 @@
import Link from 'next/link';
import classNames from 'classnames';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faEnvelope, faClock, faHandshake, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import {
SummaryContainer,
Title,
@ -12,17 +14,15 @@ import {
} from './style';
import SharePage from 'components/share-page';
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge, DarkBadge } from 'components/badges';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faEnvelope, faClock, faHandshake, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import GuideBody from 'components/guide-body';
import siteConfig from "data/site";
import siteConfig from "storage/site";
const isActiveRoadmap = (loadedVersion, roadmapVersion) => (
(loadedVersion === roadmapVersion) ||
(loadedVersion === 'latest' && parseInt(roadmapVersion, 10) === (new Date()).getFullYear())
);
const UpcomingGuide = require(`../../data/roadmaps/upcoming.md`).default;
const UpcomingGuide = require(`../../storage/roadmaps/upcoming.md`).default;
const RoadmapSummary = ({ roadmap }) => (
<SummaryContainer>

@ -1,7 +1,7 @@
import React from 'react';
import Helmet from 'components/helmet';
import './global.scss';
import { firePageView } from '../../lib/gtag';
import { firePageView } from 'lib/gtag';
class DefaultLayout extends React.Component {
componentDidMount() {

@ -1,3 +1,3 @@
import authors from "data/authors";
import authors from "storage/authors";
export const findByUsername = (username) => authors.find(author => author.username === username) || {};

@ -1,6 +1,6 @@
import guides from "data/guides";
import authors from "data/authors";
import siteConfig from "data/site";
import guides from "storage/guides";
import authors from "storage/authors";
import siteConfig from "storage/site";
export const getAllGuides = () => {
return guides.filter(guide => !guide.draft)

@ -1,4 +1,4 @@
import roadmaps from "data/roadmaps";
import roadmaps from "storage/roadmaps";
export const getRequestedRoadmap = req => {
// Considering it a new roadmap URL e.g. `/roadmaps/frontend`

@ -1,5 +1,5 @@
import queryString from 'query-string';
import siteConfig from 'data/site';
import siteConfig from 'storage/site';
export const prefixHost = (url) => {
return /^\//.test(url) ? `${siteConfig.url}${url}` : url;

@ -13,7 +13,7 @@ const Guide = ({ guide }) => {
return <Error statusCode={ 404 } />
}
const GuideContent = require(`../../data/guides/${guide.fileName}.md`).default;
const GuideContent = require(`../../storage/guides/${guide.fileName}.md`).default;
return (
<GuideLayout>

@ -1,13 +1,13 @@
import { faCodeBranch, faEnvelope } from '@fortawesome/free-solid-svg-icons/index';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge } from 'components/badges';
import FeaturedGuide from 'components/featured-guide';
import DefaultLayout from 'layouts/default/index';
import SiteNav from 'components/site-nav';
import PageHeader from 'components/page-header';
import PageFooter from 'components/page-footer';
import SiteNav from 'components/site-nav';
import { getAllGuides } from 'lib/guide';
import FeaturedGuide from '../../components/featured-guide';
import { faCodeBranch, faEnvelope } from '@fortawesome/free-solid-svg-icons/index';
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge } from 'components/badges';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import siteConfig from "data/site";
import siteConfig from 'storage/site';
const Roadmap = () => (
<DefaultLayout>

@ -4,11 +4,11 @@ import DefaultLayout from 'layouts/default/index';
import SiteNav from 'components/site-nav';
import PageFooter from 'components/page-footer';
import PageHeader from 'components/page-header';
import roadmaps from "data/roadmaps";
import roadmaps from "storage/roadmaps";
import RowBlock from 'components/row-block';
import IconRowBlock from 'components/icon-row-block';
import siteConfig from "data/site";
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge } from '../components/badges';
import siteConfig from "storage/site";
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge } from 'components/badges';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faEnvelope, faCodeBranch } from '@fortawesome/free-solid-svg-icons';

@ -1,8 +1,8 @@
const path = require('path');
const glob = require('glob');
const guides = require('./data/guides.json');
const roadmaps = require('./data/roadmaps');
const guides = require('./storage/guides.json');
const roadmaps = require('./storage/roadmaps');
const PAGES_PATH = path.join(__dirname, 'pages');

@ -21,9 +21,9 @@ If you think that these can be improved in anyway, please do suggest.
![Frontend Roadmap](./static/roadmaps/latest/frontend.png)
## Back-end Roadmap
## Backend Roadmap
![Back-end Roadmap](./static/roadmaps/latest/backend.png)
![Backend Roadmap](./static/roadmaps/latest/backend.png)
## DevOps Roadmap

@ -1,7 +1,7 @@
const path = require('path');
const fs = require('fs');
const guides = require('../data/guides');
const roadmaps = require('../data/roadmaps');
const guides = require('../storage/guides');
const roadmaps = require('../storage/roadmaps');
const {
getPageRoutes,
@ -50,7 +50,7 @@ describe("Build scripts tests", () => {
guides.forEach(guide => {
const [,, slug] = guide.url.split('/');
const expectedFile = path.join(__dirname, `../data/guides/${slug}.md`);
const expectedFile = path.join(__dirname, `../storage/guides/${slug}.md`);
const foundFile = fs.existsSync(expectedFile) ? expectedFile : '';
expect(foundFile).toEqual(expectedFile);

Loading…
Cancel
Save