-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
ROOT: 'docsrc', | ||
PUBLIC: 'docs', | ||
WEB_ROOT: '/test/', | ||
URL: 'magic.github.io/test', | ||
THEME: 'docs', | ||
HOIST: ['Gdpr', 'LightSwitch'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><link rel="stylesheet" href="/test/magic.css?Zq69ZfLn2z" integrity="sha384-Zq69ZfLn2zMms7j2K6iZ4EutxfQtqvQdMArbrmWD1ZCTC4BnxZbOaCKwKYosMrdy" crossorigin="anonymous"/><link rel="icon" href="/test/favicon.ico"/><title>@magic/format</title><meta name="description" content="run prettier and format your code."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic/format"}</script></head><body><a class="SkipLink" href="/test/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><a class="Logo" href="/test/"><span>@magic/format</span></a><nav class="Menu"><ul><li><a href="/test/-install">install</a></li><li><a href="/test/#usage">usage</a></li><li><a href="/test/#changelog">changelog</a></li></ul></nav></header><div class="Page" id="page"><div>404 - not found</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://github.com/magic/core">magic</a></div></div></footer></div></main><script src="/test/magic.js?/kzB8BNJd3" integrity="sha384-/kzB8BNJd3Zbrf1SObey3/2RYBsfl54rssWK71AQ1BysWreyMrSnbunqZbGM0ssp" crossorigin="anonymous"></script></body></html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><link rel="stylesheet" href="/test/magic.css?Zq69ZfLn2z" integrity="sha384-Zq69ZfLn2zMms7j2K6iZ4EutxfQtqvQdMArbrmWD1ZCTC4BnxZbOaCKwKYosMrdy" crossorigin="anonymous"/><link rel="icon" href="/test/favicon.ico"/><title>@magic/format</title><meta name="description" content="run prettier and format your code."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic/format"}</script></head><body><a class="SkipLink" href="/test/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><a class="Logo" href="/test/"><span>@magic/format</span></a><nav class="Menu"><ul><li><a href="/test/-install">install</a></li><li><a href="/test/#usage">usage</a></li><li><a href="/test/#changelog">changelog</a></li></ul></nav></header><div class="Page" id="page"><h1>@magic/format</h1><p>run prettier and format your code.</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic/format" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic/format.svg" role="presentation" alt=""/></a></li><li><a href="https://travis-ci.com/magic/format" target="_blank" rel="noopener"><img src="https://img.shields.io/travis/com/magic/format/master" role="presentation" alt=""/></a></li><li><a href="https://ci.appveyor.com/project/magic/format/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magic/format/master.svg" role="presentation" alt=""/></a></li><li><a href="https://coveralls.io/github/magic/format" target="_blank" rel="noopener"><img src="https://img.shields.io/coveralls/github/magic/format/master.svg" role="presentation" alt=""/></a></li><li><a href="https://greenkeeper.io" target="_blank" rel="noopener"><img src="https://badges.greenkeeper.io/magic/format.svg" role="presentation" alt=""/></a></li><li><a href="https://snyk.io/test/github/magic/format" target="_blank" rel="noopener"><img src="https://img.shields.io/snyk/vulnerabilities/github/magic/format.svg" role="presentation" alt=""/></a></li></ul><h2 id="install">install</h2><p>be in a nodejs project.</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">npm i --save-dev --save-exact @magic/format</code></pre></div><h2 id="usage">Usage</h2><h2 id="usage-npm">npm run scripts</h2><p>Add the @magic/test bin scripts to package.json</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">{</code><code class="line"> <span class="string">'scripts'</span>: {</code><code class="line"> <span class="string">'format'</span>: <span class="string">'f -w'</span>,</code><code class="line"> <span class="string">'<span class="colon">format</span>:check'</span>: <span class="string">'f'</span></code><code class="line"> },</code><code class="line"> <span class="string">'devDependencies'</span>: {</code><code class="line"> <span class="string">'@magic/format'</span>: <span class="string">'<span class="object">0</span>.<span class="property">0</span>.<span class="property">1</span>'</span></code><code class="line"> }</code><code class="line">}</code></pre></div><p>then use the npm run scripts</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">npm run format</code><code class="line">npm run <span class="colon">format</span>:check</code></pre></div><h3 id="usage-cli">cli</h3><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="comment">// first install globally</span></code><code class="line">npm i -g @magic/format</code><code class="line"></code><code class="line"><span class="comment">// check formatting using prettier but <span class="keyword">do</span> not write</span></code><code class="line"><span class="comment">// prettier --list-different</span></code><code class="line">f</code><code class="line"></code><code class="line"><span class="comment">// format files using prettier</span></code><code class="line"><span class="comment">// prettier --write</span></code><code class="line">f -w</code></pre></div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://github.com/magic/core">magic</a></div></div></footer></div></main><script src="/test/magic.js?/kzB8BNJd3" integrity="sha384-/kzB8BNJd3Zbrf1SObey3/2RYBsfl54rssWK71AQ1BysWreyMrSnbunqZbGM0ssp" crossorigin="anonymous"></script></body></html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
user-agent: * | ||
allow: / | ||
sitemap: https://magic.github.io/test/sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<urlset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" | ||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | ||
> | ||
|
||
<url> | ||
<loc>https://magic.github.io/test/</loc> | ||
<lastmod>2020-01-06</lastmod> | ||
<changefreq>weekly</changefreq> | ||
<priority>0.5</priority> | ||
</url> | ||
|
||
<url> | ||
<loc>https://magic.github.io/test/404/</loc> | ||
<lastmod>2020-01-06</lastmod> | ||
<changefreq>weekly</changefreq> | ||
<priority>0.5</priority> | ||
</url> | ||
|
||
</urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"css": "sha384-Zq69ZfLn2zMms7j2K6iZ4EutxfQtqvQdMArbrmWD1ZCTC4BnxZbOaCKwKYosMrdy", | ||
"js": "sha384-/kzB8BNJd3Zbrf1SObey3/2RYBsfl54rssWK71AQ1BysWreyMrSnbunqZbGM0ssp", | ||
"pages": { | ||
"/test/": "sha384-7HTIxw4ZvgogYbxuYzu+kDiT+2Sma3knxo0Dpk1V7ewyhVdHX1FMjFLAFt/VH1Om", | ||
"/test/404/": "sha384-N6GggPN/sWc+wVyU07S10xr8kMzwPSnuTD40hXbmb0pN/A4vq1s5tSRAAWN0OBDR" | ||
}, | ||
"static": { | ||
"/favicon.ico": "sha384-pf51ay6pZCj3+XlVCPmCKLDFpLj7QP+2heR+/n08WgS7Bve7JMkgubHOkwLzaTr+", | ||
"/robots.txt": "sha384-827u8BLWukOLWm6vZHJ6LtNjWr+kzdGopcV3xnyX68b5fJTR224/4cQeXEt9lmkJ", | ||
"/sitemap.xml": "sha384-jSnSZPmbgvNczs+eXWdyIDrmo7T0jroBY0kpoxwgQPHX8TgKVQcx8fz4u3b+06EI" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const state = { | ||
title: '@magic/format', | ||
description: ['run prettier and format your code.'], | ||
|
||
logotext: '@magic/format', | ||
menu: [ | ||
{ to: '-install', text: 'install' }, | ||
{ | ||
to: '/#usage', | ||
text: 'usage', | ||
items: [ | ||
{ to: '-js', text: 'js api' }, | ||
{ to: '-cli', text: 'cli' }, | ||
{ to: '-global', text: 'npm i -g' }, | ||
], | ||
}, | ||
{ to: '/#changelog', text: 'changelog' }, | ||
], | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
export const View = state => [ | ||
h1(state.title), | ||
|
||
state.description.map(d => p(d)), | ||
|
||
GitBadges('magic/format'), | ||
|
||
h2({ id: 'install' }, 'install'), | ||
p('be in a nodejs project.'), | ||
|
||
Pre('npm i --save-dev --save-exact @magic/format'), | ||
|
||
h2({ id: 'usage' }, 'Usage'), | ||
|
||
h2({ id: 'usage-npm' }, 'npm run scripts'), | ||
p('Add the @magic/test bin scripts to package.json'), | ||
|
||
Pre(` | ||
{ | ||
"scripts": { | ||
"format": "f -w", | ||
"format:check": "f" | ||
}, | ||
"devDependencies": { | ||
"@magic/format": "0.0.1" | ||
} | ||
}`), | ||
|
||
p('then use the npm run scripts'), | ||
Pre(` | ||
npm run format | ||
npm run format:check | ||
`), | ||
|
||
h3({ id: 'usage-cli' }, 'cli'), | ||
|
||
Pre(` | ||
// first install globally | ||
npm i -g @magic/format | ||
// check formatting using prettier but do not write | ||
// prettier --list-different | ||
f | ||
// format files using prettier | ||
// prettier --write | ||
f -w | ||
`), | ||
] |