Skip to content

Commit df53367

Browse files
authored
Merge pull request #1004 from form8ion/beta
2 parents a51ee97 + 2572143 commit df53367

File tree

6 files changed

+16672
-1404
lines changed

6 files changed

+16672
-1404
lines changed

.github/workflows/node-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
node:
3333
- 14.15.0
3434
- 14
35+
- 16.0.0
36+
- 16
3537
steps:
3638
- uses: actions/checkout@v3
3739
- name: Setup node ${{ matrix.node_version }}

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
16

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ import {lift, scaffold, questionNames} from '@form8ion/project';
7979
#### Execute
8080

8181
```javascript
82-
(async () => {
8382
await scaffold({
8483
decisions: {
8584
[questionNames.PROJECT_NAME]: 'my-project',
@@ -96,8 +95,12 @@ import {lift, scaffold, questionNames} from '@form8ion/project';
9695
}
9796
});
9897

99-
await lift({projectRoot: process.cwd(), results: {}});
100-
})();
98+
await lift({
99+
projectRoot: process.cwd(),
100+
results: {},
101+
enhancers: {foo: {test: () => true, lift: () => ({})}},
102+
vcs: {}
103+
});
101104
```
102105

103106
### API

example.js

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
// #### Import
2-
// remark-usage-ignore-next
2+
// remark-usage-ignore-next 3
3+
import {promises as fs} from 'fs';
4+
import {resolve} from 'path';
35
import stubbedFs from 'mock-fs';
46
import {lift, scaffold, questionNames} from './lib/index.js';
57

6-
// remark-usage-ignore-next 2
7-
stubbedFs();
8-
98
// #### Execute
109

10+
// remark-usage-ignore-next 8
1111
(async () => {
12+
const projectTemplatePath = [__dirname, 'templates'];
13+
stubbedFs({
14+
templates: {
15+
'README.mustache': await fs.readFile(resolve(...projectTemplatePath, 'README.mustache')),
16+
'editorconfig.txt': await fs.readFile(resolve(...projectTemplatePath, 'editorconfig.txt'))
17+
}
18+
});
19+
1220
await scaffold({
1321
decisions: {
1422
[questionNames.PROJECT_NAME]: 'my-project',
@@ -28,7 +36,8 @@ stubbedFs();
2836
await lift({
2937
projectRoot: process.cwd(),
3038
results: {},
31-
enhancers: {foo: {test: () => true, lift: () => undefined}},
39+
enhancers: {foo: {test: () => true, lift: () => ({})}},
3240
vcs: {}
3341
});
42+
// remark-usage-ignore-next
3443
})();

0 commit comments

Comments
 (0)