Skip to content

Commit

Permalink
Merge pull request elderfo#13 from Naturalclar/feature/addScaffdog
Browse files Browse the repository at this point in the history
Add Scaffdog
  • Loading branch information
Naturalclar committed Feb 13, 2019
2 parents 34c8bd5 + 15b9c9b commit 2278ccb
Show file tree
Hide file tree
Showing 7 changed files with 1,875 additions and 60 deletions.
51 changes: 51 additions & 0 deletions .scaffdog/atom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "atom"
description: "Atom component template"
message: "Please enter the name of component to be created"
root: "./src/atoms"
output: "**/*"
ignore: []
---

# `{{ input }}.tsx`

```jsx
import * as React from 'react'
import { View, StyleSheet } from 'react-native'

const styles = StyleSheet.create({
container: {
flex: 1
}
})

interface Props {}

const {{ input }} = ({}: Props) => (
<View style={styles.container}></View>
)

class {{ input }} extends React.Component<Props> {
render() {
return (
<View style={styles.container}>
</View>
)
}
}

export default {{ input }}

```

# `{{ input }}.story.tsx`

```jsx
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import {{ input }} from './{{input}}'

storiesOf("atoms", module).add("{{input}}", () => (
<{{ input }} />
));
```
51 changes: 51 additions & 0 deletions .scaffdog/molecule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "molecule"
description: "molecule component template"
message: "Please enter the name of component to be created"
root: "./src/molecules"
output: "**/*"
ignore: []
---

# `{{ input }}.tsx`

```jsx
import * as React from 'react'
import { View, StyleSheet } from 'react-native'

const styles = StyleSheet.create({
container: {
flex: 1
}
})

interface Props {}

const {{ input }} = ({}: Props) => (
<View style={styles.container}></View>
)

class {{ input }} extends React.Component<Props> {
render() {
return (
<View style={styles.container}>
</View>
)
}
}

export default {{ input }}

```

# `{{ input }}.story.tsx`

```jsx
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import {{ input }} from './{{input}}'

storiesOf("molecules", module).add("{{input}}", () => (
<{{ input }} />
));
```
51 changes: 51 additions & 0 deletions .scaffdog/organism.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "organism"
description: "organism component template"
message: "Please enter the name of component to be created"
root: "./src/organisms"
output: "**/*"
ignore: []
---

# `{{ input }}.tsx`

```jsx
import * as React from 'react'
import { View, StyleSheet } from 'react-native'

const styles = StyleSheet.create({
container: {
flex: 1
}
})

interface Props {}

const {{ input }} = ({}: Props) => (
<View style={styles.container}></View>
)

class {{ input }} extends React.Component<Props> {
render() {
return (
<View style={styles.container}>
</View>
)
}
}

export default {{ input }}

```

# `{{ input }}.story.tsx`

```jsx
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import {{ input }} from './{{input}}'

storiesOf("organisms", module).add("{{input}}", () => (
<{{ input }} />
));
```
51 changes: 51 additions & 0 deletions .scaffdog/screen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "screen"
description: "screen component template"
message: "Please enter the name of component to be created"
root: "./src/screens"
output: "**/*"
ignore: []
---

# `{{ input }}.tsx`

```jsx
import * as React from 'react'
import { View, StyleSheet } from 'react-native'

const styles = StyleSheet.create({
container: {
flex: 1
}
})

interface Props {}

const {{ input }} = ({}: Props) => (
<View style={styles.container}></View>
)

class {{ input }} extends React.Component<Props> {
render() {
return (
<View style={styles.container}>
</View>
)
}
}

export default {{ input }}

```

# `{{ input }}.story.tsx`

```jsx
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import {{ input }} from './{{input}}'

storiesOf("sceens", module).add("{{input}}", () => (
<{{ input }} />
));
```
51 changes: 51 additions & 0 deletions .scaffdog/template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "template"
description: "template component template"
message: "Please enter the name of component to be created"
root: "./src/templates"
output: "**/*"
ignore: []
---

# `{{ input }}.tsx`

```jsx
import * as React from 'react'
import { View, StyleSheet } from 'react-native'

const styles = StyleSheet.create({
container: {
flex: 1
}
})

interface Props {}

const {{ input }} = ({}: Props) => (
<View style={styles.container}></View>
)

class {{ input }} extends React.Component<Props> {
render() {
return (
<View style={styles.container}>
</View>
)
}
}

export default {{ input }}

```

# `{{ input }}.story.tsx`

```jsx
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import {{ input }} from './{{input}}'

storiesOf("templates", module).add("{{input}}", () => (
<{{ input }} />
));
```
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"test": "node ./node_modules/jest/bin/jest.js --watchAll",
"lint": "eslint . --ext '.ts, .tsx'",
"type-check": "tsc --noEmit",
"storybook": "start-storybook -p 9001 -c .storybook"
"storybook": "start-storybook -p 9001 -c .storybook",
"new": "scaffdog generate"
},
"jest": {
"preset": "jest-expo"
Expand Down Expand Up @@ -61,6 +62,7 @@
"react-native-web": "^0.10.0",
"react-test-renderer": "^16.5.1",
"redux-logger": "^3.0.6",
"scaffdog": "^0.0.7",
"ts-loader": "^5.3.3",
"typescript": "^3.3.3",
"typescript-eslint-parser": "^22.0.0"
Expand Down
Loading

0 comments on commit 2278ccb

Please sign in to comment.