Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
revert commit
Browse files Browse the repository at this point in the history
  • Loading branch information
powderpinkpeach committed Aug 15, 2019
1 parent 784ba73 commit e3de2a2
Show file tree
Hide file tree
Showing 9 changed files with 4,205 additions and 5,643 deletions.
11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
},
"preconstruct": {
"packages": [
"packages/file-viewer",
"packages/parcel-reporter-loc",
"packages/react-changelogs",
"packages/file-viewer",
"packages/website"
]
},
Expand Down Expand Up @@ -90,11 +89,6 @@
"@mdx-js/loader": "^0.17.5",
"@mdx-js/mdx": "^0.15.0",
"@mdx-js/tag": "^0.17.5",
"@parcel/config-default": "2.0.0-alpha.1.1",
"@parcel/core": "2.0.0-alpha.1.1",
"@parcel/logger": "^2.0.0-alpha.1.1",
"@parcel/plugin": "^2.0.0-alpha.1.1",
"@parcel/utils": "^2.0.0-alpha.1.1",
"@types/js-yaml": "^3.12.1",
"@types/lodash": "^4.14.123",
"@types/lodash.flatten": "^4.4.6",
Expand Down Expand Up @@ -130,7 +124,6 @@
"lodash.snakecase": "^4.1.1",
"next": "^8.0.4",
"next-images": "^1.1.1",
"nullthrows": "^1.1.1",
"outdent": "^0.7.0",
"preconstruct": "^0.0.62",
"pretty-proptypes": "^0.6.6",
Expand Down Expand Up @@ -204,4 +197,4 @@
"ts-loader": "^5.3.3",
"tti-polyfill": "^0.2.2"
}
}
}
20 changes: 0 additions & 20 deletions packages/parcel-reporter-loc/package.json

This file was deleted.

31 changes: 0 additions & 31 deletions packages/parcel-reporter-loc/src/index.js

This file was deleted.

71 changes: 0 additions & 71 deletions packages/parcel-reporter-loc/src/lineCounter.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/website/.parcelrc

This file was deleted.

36 changes: 10 additions & 26 deletions packages/website/_app.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,26 @@
import React from 'react';
import React, { useState } from 'react';
import {
BrowserRouter as Router,
Switch,
Route,
Redirect,
} from 'react-router-dom';
import { asyncComponent } from 'react-async-component';

const AsyncLoadPages = promise =>
asyncComponent({
resolve: () => promise,
LoadingComponent: () => <div>Loading</div>,
ErrorComponent: ({ error }) => (
<div>There is an error. {error.message} </div>
),
});
const HackyLoader = ({ promise }) => {
const [Comp, setComp] = useState(null);
promise.then(res => setComp(res));
if (Comp) return <Comp.default />;
return <div>Loading</div>;
};

export default () => (
<Router>
<Switch>
<Route exact path="/" component={AsyncLoadPages(import('./pages'))} />
<Route
path="/healthcheck"
component={AsyncLoadPages(import('./pages/healthcheck.tsx'))}
exact
path="/"
component={() => <HackyLoader promise={import('./pages')} />}
/>
<Route
path="/index"
component={AsyncLoadPages(import('./pages/index.tsx'))}
/>
<Route
path="/packages"
component={AsyncLoadPages(import('./pages/packages.tsx'))}
/>
<Route
path="/readme"
component={AsyncLoadPages(import('./pages/readme.js'))}
/>
<Redirect to="/" />
</Switch>
</Router>
);
5 changes: 1 addition & 4 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"dist"
],
"dependencies": {
"@parcel/core": "2.0.0-alpha.1.1",
"@parcel/config-default": "2.0.0-alpha.1.1",
"@atlaskit/avatar": "^14.1.8",
"@atlaskit/breadcrumbs": "^8.0.0",
"@atlaskit/button": "^8.2.4",
Expand Down Expand Up @@ -77,7 +75,6 @@
"@babel/runtime": "^7.4.3",
"@brisk-docs/file-viewer": "^0.2.3",
"@brisk-docs/react-changelogs": "^0.1.9",
"@brisk-docs/parcel-reporter-loc": "2.0.0-alpha.0",
"@emotion/core": "^10.0.9",
"@emotion/styled": "^10.0.9",
"@mdx-js/loader": "^0.17.5",
Expand Down Expand Up @@ -144,4 +141,4 @@
"mock-fs": "^4.10.1",
"ts-loader": "^5.3.3"
}
}
}
44 changes: 30 additions & 14 deletions scripts/link-parcel.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
const fs = require('fs-extra');
const path = require('path');

async function linkParcel() {
function linkParcel() {
const parcelHome = process.argv[2];

if (!parcelHome) {
console.warn('no parcel home provided');
return;
}
const nodeModulesParcel = path.resolve(__dirname, '../node_modules/@parcel');

try {
await fs.remove(nodeModulesParcel);
await fs.ensureSymlink(
path.resolve(parcelHome, 'node_modules/@parcel'),
nodeModulesParcel,
);
} catch (e) {
console.error(e);
}

console.log(
'symlink to parcel should have been successful. Good luck deving!',
const parcelCore = path.resolve(parcelHome, 'packages', 'core', 'core');
const parcelConfig = path.resolve(
parcelHome,
'packages',
'configs',
'default',
);
const nodeCore = path.resolve(
process.cwd(),
'node_modules',
'@parcel',
'core',
);
const nodeConfig = path.resolve(
process.cwd(),
'node_modules',
'@parcel',
'config-default',
);

Promise.all([
fs.ensureSymlink(parcelCore, nodeCore),
fs.ensureSymlink(parcelConfig, nodeConfig),
])
.then(() => {
console.log(
'symlink to parcel should have been successful. Good luck deving!',
);
})
.catch(e => console.error(e));
}

linkParcel();
Loading

0 comments on commit e3de2a2

Please sign in to comment.