Skip to content

Commit

Permalink
move to typescript(!) + upgrade engine to node 12 for more speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Oct 21, 2019
1 parent d743bd3 commit 0f239fd
Show file tree
Hide file tree
Showing 107 changed files with 2,313 additions and 3,280 deletions.
57 changes: 0 additions & 57 deletions .babelrc

This file was deleted.

35 changes: 30 additions & 5 deletions .eslintrc
@@ -1,20 +1,45 @@
{
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"prettier"
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/react"
],
"plugins": [
"jest",
"flowtype",
"@typescript-eslint",
"prettier"
],
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": false
"import/resolver": {
"typescript": {}
}
},
"rules": {
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/no-var-requires": 0,
"no-unused-vars": 0,
"import/no-dynamic-require": 0,
"no-console": 0,
"global-require": 0,
"no-await-in-loop": 0,
"no-restricted-syntax": 0,
"@typescript-eslint/type-annotation-spacing": 0,
"import/prefer-default-export": 0,
"class-methods-use-this": 0,
"react/prop-types": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/indent": 0,
"prettier/prettier": [
"error",
{
Expand Down
15 changes: 0 additions & 15 deletions .flowconfig

This file was deleted.

5 changes: 5 additions & 0 deletions _templates/generator/help/index.ejs.t
@@ -0,0 +1,5 @@
---
message: |
hygen {bold generator new} --name [NAME] --action [ACTION]
hygen {bold generator with-prompt} --name [NAME] --action [ACTION]
---
18 changes: 18 additions & 0 deletions _templates/generator/new/hello.ejs.t
@@ -0,0 +1,18 @@
---
to: _templates/<%= name %>/<%= action || 'new' %>/hello.ejs.t
---
---
to: app/hello.js
---
const hello = ```
Hello!
This is your first hygen template.

Learn what it can do here:

https://github.com/jondot/hygen
```

console.log(hello)


18 changes: 18 additions & 0 deletions _templates/generator/with-prompt/hello.ejs.t
@@ -0,0 +1,18 @@
---
to: _templates/<%= name %>/<%= action || 'new' %>/hello.ejs.t
---
---
to: app/hello.js
---
const hello = ```
Hello!
This is your first prompt based hygen template.

Learn what it can do here:

https://github.com/jondot/hygen
```

console.log(hello)


14 changes: 14 additions & 0 deletions _templates/generator/with-prompt/prompt.ejs.t
@@ -0,0 +1,14 @@
---
to: _templates/<%= name %>/<%= action || 'new' %>/prompt.js
---

// see types of prompts:
// https://github.com/enquirer/enquirer/tree/master/examples
//
module.exports = [
{
type: 'input',
name: 'message',
message: "What's your message?"
}
]
2 changes: 2 additions & 0 deletions dist/bin.d.ts
@@ -0,0 +1,2 @@
#!/usr/bin/env node
export {};
22 changes: 22 additions & 0 deletions dist/bin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/bin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added dist/bin.timed.d.ts
Empty file.
5 changes: 5 additions & 0 deletions dist/bin.timed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/bin.timed.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/config-resolver.d.ts
@@ -0,0 +1,3 @@
import { RunnerConfig } from './types';
declare const _default: (config: RunnerConfig) => Promise<RunnerConfig>;
export default _default;
29 changes: 29 additions & 0 deletions dist/config-resolver.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/config-resolver.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions dist/config.d.ts
@@ -0,0 +1,13 @@
import { ResolverIO } from './types';
declare const reversePathsToWalk: ({ folder, path }: {
folder: any;
path: any;
}) => any;
declare const configLookup: (file: string, folder: string, path?: any) => any;
declare class ConfigResolver {
configFile: string;
io: ResolverIO;
constructor(configFile: string, io: ResolverIO);
resolve(from: string): Promise<Record<string, any>>;
}
export { configLookup, ConfigResolver, reversePathsToWalk };
47 changes: 47 additions & 0 deletions dist/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/context.d.ts
@@ -0,0 +1 @@
export {};
33 changes: 33 additions & 0 deletions dist/context.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/context.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/engine.d.ts
@@ -0,0 +1,3 @@
import { RunnerConfig } from './types';
declare const engine: (argv: string[], config: RunnerConfig) => Promise<any[]>;
export default engine;

0 comments on commit 0f239fd

Please sign in to comment.