Skip to content

Commit 2954009

Browse files
committed
fix wrong templates
1 parent 5b63977 commit 2954009

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

sao.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// https://sao.js.org/#/create?id=config-file
2+
13
module.exports = {
24
prompts: {
35
name: {
@@ -14,9 +16,9 @@ module.exports = {
1416
default: true,
1517
},
1618
},
17-
data({ username }) {
19+
data({ username = 'dwarvesf' }) {
1820
return {
19-
website: `github.com/dwarvesf`,
21+
website: `github.com/${username}`,
2022
};
2123
},
2224
filters: {
@@ -28,8 +30,4 @@ module.exports = {
2830
showTip: true,
2931
gitInit: true,
3032
installDependencies: true,
31-
post(context, stream) {
32-
console.log(context)
33-
console.log(stream)
34-
},
3533
};

template/README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22

33
> <%= description %>
44
5-
## Usage
6-
7-
Install [SAO](https://github.com/egoist/sao) first.
8-
9-
```bash
10-
yarn global add sao
11-
# or
12-
npm i -g sao
13-
```
14-
15-
### From npm
16-
17-
```bash
18-
sao <%= name.replace('template-', '') %> my-project
19-
```
20-
21-
### From git
22-
23-
```bash
24-
sao <%= username %>/<%= name %> my-project
25-
```
26-
275
## License
286

29-
MIT &copy; [<%= username %>](<%= website %>)
7+
MIT &copy; Dwarves Foundation

template/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import './index.css';
55
import App from './App';
66

77
const render = Component => {
8-
ReactDOM.render(<Component />, document.getElementById('root'))
8+
ReactDOM.render(<Component />, document.getElementById('root'));
99
};
1010

1111
render(App);

0 commit comments

Comments
 (0)