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
32 changed files
with
17,891 additions
and
3,835 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 |
---|---|---|
@@ -1,8 +1,15 @@ | ||
{ | ||
"extends": ["oclif", "oclif-typescript"], | ||
"extends": ["oclif", "oclif-typescript", "plugin:react/recommended"], | ||
"rules": { | ||
"object-curly-spacing": "off", | ||
"indent": "off", | ||
"unicorn/filename-case": "off" | ||
"unicorn/filename-case": "off", | ||
"no-process-exit": "off", | ||
"unicorn/no-process-exit": "off", | ||
"no-console": "off", | ||
"no-extraneous-require": "off", | ||
"node/no-extraneous-require": "off", | ||
"node/no-missing-require": "off", | ||
"unicorn/no-abusive-eslint-disable": "off" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
/tmp | ||
/yarn.lock | ||
node_modules | ||
|
||
.DS_Store |
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
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
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
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,40 @@ | ||
import execa from 'execa' | ||
import path from 'path' | ||
const copy = require('copy-template-dir') | ||
|
||
import log from '../utils/log' | ||
|
||
const dependencies: string[] = ['styled-components'] | ||
|
||
async function cra(name: string) { | ||
const cwd = path.join(process.cwd(), name) | ||
|
||
const spinner = log.step('Installing create react app') | ||
await execa('npx', [ | ||
'create-react-app', | ||
name, | ||
'--template', | ||
'typescript', | ||
'--use-npm', | ||
]) | ||
|
||
log.step('Removing src folder') | ||
await execa('rm', ['-rf', 'src'], { cwd }) | ||
|
||
log.step('Adding project files') | ||
await copy( | ||
path.join(__dirname, '../templates/cra'), | ||
cwd, | ||
{ name }, | ||
(err: any) => { | ||
if (err) throw err | ||
} | ||
) | ||
|
||
log.step('Installing dependencies') | ||
await execa('npm', ['i', '--save', ...dependencies], { cwd }) | ||
|
||
spinner.succeed() | ||
} | ||
|
||
export default cra |
Oops, something went wrong.