Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-blunden committed Oct 23, 2018
1 parent 792564e commit 191444a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist/
node_modules/
.idea
29 changes: 19 additions & 10 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { JsonSchemaForTheTypeScriptCompilersConfigurationFile } from './tsconfig
import { JsonSchemaForTheTsLintConfigurationFiles } from './tslint-schema'

async function main(): Promise<void> {
console.log(['', '*️⃣ Welcome to the Sourcegraph extension creator', ''].join('\n'))
console.log(['', 'Welcome to the Sourcegraph extension creator!', ''].join('\n'))

if (!(await exists('.git'))) {
console.log('📘 .git directory not found, initilizing git repository')
Expand Down Expand Up @@ -117,6 +117,7 @@ async function main(): Promise<void> {
'',
'[*.md]',
'trim_trailing_whitespace = false',
''
].join('\n')
)

Expand Down Expand Up @@ -163,15 +164,16 @@ async function main(): Promise<void> {
await writeFile(
'src/extension.ts',
[
"import * as sourcegraph from 'sourcegraph'",
'import * as sourcegraph from \'sourcegraph\'',
'',
'export function activate(): void {',
" sourcegraph.languages.registerHoverProvider(['*'], {",
" provideHover: () => ({ contents: { value: 'Hello world from the Sourcegraph extension creator! 🎉🎉🎉' } })",
' })',
'}',
'',
'// See https://about.sourcegraph.com/blog/extension-authoring for instructions and examples.',
'// Learn what else is possible by visiting the [Sourcegraph extension documentation](https://github.com/sourcegraph/sourcegraph-extension-docs)',
''
].join('\n')
)
} catch (err) {
Expand Down Expand Up @@ -203,32 +205,39 @@ async function main(): Promise<void> {
const readme = [
`# ${title}`,
'',
description,
description[description.length-1] === '.' ? description : description + '.',
'',
'## Prerequisites',
'',
'Sourcegraph extensions are written in TypeScript are distributed as bundled JavaScript files that run on the client. For creation, publishing, and viewing, you need:',
'Sourcegraph extensions are written in TypeScript and are distributed as bundled JavaScript files that run on the client. For creation, publishing, and viewing, you need:',
'',
'- **Creation**: Install [Node.js](https://nodejs.org).',
'- **Publishing**: Install the [Sourcegraph CLI (`src`)](https://github.com/sourcegraph/src-cli#installation) and create a [Sourcegraph.com account](https://sourcegraph.com/sign-up).',
'- **Viewing**: Install the Sourcegraph extension for [Chrome](https://chrome.google.com/webstore/detail/sourcegraph/dgjhfomjieaadpoljlnidmbgkdffpack) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/sourcegraph/).',
'',
'- **Creation**: Install [Node.js](https://nodejs.org) and [npm](https://npmjs.com)',
'- **Publishing**: Install the [Sourcegraph CLI (`src`)](https://github.com/sourcegraph/src-cli#installation) and create a [Sourcegraph.com account](https://sourcegraph.com/sign-up)',
'- **Viewing**: Install Sourcegraph extension for [Chrome](https://chrome.google.com/webstore/detail/sourcegraph/dgjhfomjieaadpoljlnidmbgkdffpack) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/sourcegraph/).',
'## Set up',
'',
'## Setup',
'```',
`npm install`,
'```',
'',
'## Check check and lint',
'## Lint and type check',
'',
'```',
`npm run tslint`,
`npm run typecheck`,
'```',
'',
'## Publish',
'',
'```',
'src extensions publish',
'```',
'',
'## Sourecgraph extension API',
'',
'Visit the [Sourcegraph extension documentation](https://github.com/sourcegraph/sourcegraph-extension-docs) and check out some [Sourcegraph extension samples](https://github.com/sourcegraph/sourcegraph-extension-samples).',
''
].join('\n')
await writeFile('README.md', readme)
}
Expand Down

0 comments on commit 191444a

Please sign in to comment.