Skip to content

Commit

Permalink
Merge pull request #158 from FormidableLabs/version-1
Browse files Browse the repository at this point in the history
Updates package.json for V1 release
  • Loading branch information
lukejacksonn authored Nov 26, 2019
2 parents 7145095 + 4695453 commit 474de91
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
5 changes: 4 additions & 1 deletion components/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export default () => {
if (request.name)
fetch(`https://registry.npmjs.cf/${request.name}/`)
.then(res => res.json())
.then(json => dispatch({ type: 'setVersions', payload: json.versions }))
.then(json => {
dispatch({ type: 'setVersions', payload: json.versions });
dispatch({ type: 'setMode', payload: 'package' });
})
.catch(console.error);
}, [request.name]);

Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<link rel="stylesheet" href="/reset.css" />
<script>
if (location.pathname !== '/' && location.search === '') {
history.replaceState(null, null, `/?${location.pathname.slice(1)}`);
}
</script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="./utils/es-module-shim.js" defer></script>
<script>
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{
"name": "runpkg",
"version": "0.1.0",
"description": "> the online package explorer",
"version": "1.0.0",
"description": "The online javascript package explorer",
"main": "index.js",
"scripts": {
"start": "servor --reload --browse --secure",
"start": "servor --reload --browse",
"prettier": "prettier --config .prettierrc --write \"./**/*.{css,html,json,md,yml}\"",
"lint": "eslint --config .eslintrc \"./**/*.js\"",
"jest": "jest",
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/FormidableLabs/runpkg.git"
},
"author": "",
"author": "Luke Jackson <@lukejacksonn>",
"contributors": [
"Alex Saunders <@alex-saunders>",
"Kara Stubbs <@kiraarghy>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/FormidableLabs/runpkg/issues"
},
"homepage": "https://github.com/FormidableLabs/runpkg#readme",
"homepage": "https://runpkg.com",
"devDependencies": {
"babel-eslint": "^10.0.1",
"concurrently": "^4.1.0",
"eslint": "^5.16.0",
"eslint-config-formidable": "^3.0.0",
"eslint-config-prettier": "^2.9.0",
Expand Down

0 comments on commit 474de91

Please sign in to comment.