Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit ee75b04

Browse files
committed
Removes unnecessary templates directory and package.json
1 parent 67c9ac2 commit ee75b04

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
},
4242
"files": [
4343
"bin/",
44-
"src/",
45-
"templates/"
44+
"src/"
4645
]
4746
}

src/create-twilio-function/create-files.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ function createFile(fullPath, content) {
1616

1717
function createPackageJSON(path, name) {
1818
const fullPath = `${path}/package.json`;
19-
const packageJSON = JSON.stringify({
20-
name: name,
21-
version: '0.0.0',
22-
private: true,
23-
scripts: {
24-
test: 'echo "Error: no test specified" && exit 1',
25-
start: 'twilio-run --env'
19+
const packageJSON = JSON.stringify(
20+
{
21+
name: name,
22+
version: '0.0.0',
23+
private: true,
24+
scripts: {
25+
test: 'echo "Error: no test specified" && exit 1',
26+
start: 'twilio-run --env'
27+
},
28+
devDependencies: {
29+
'twilio-run': '^1.0.0-beta.4'
30+
}
2631
},
27-
devDependencies: {
28-
'twilio-run': '^1.0.0-beta.4'
29-
}
30-
});
32+
null,
33+
2
34+
);
3135
return createFile(fullPath, packageJSON);
3236
}
3337

templates/package.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/create-files.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('createExampleFunction', () => {
7272
expect(contents).toMatch('Twilio.twiml.VoiceResponse');
7373
});
7474

75-
test('it rejects if there is already a package.json', async () => {
75+
test('it rejects if there is already an example function', async () => {
7676
fs.closeSync(fs.openSync('./scratch/example.js', 'w'));
7777
expect.assertions(1);
7878
try {

0 commit comments

Comments
 (0)