-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructions.js
42 lines (41 loc) · 1.36 KB
/
instructions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict'
const path = require('path')
module.exports = async cli => {
try {
await cli.copy(
path.join(__dirname, './templates/config.js'),
path.join(cli.helpers.configPath(), 'b2-provider.js')
)
await cli.command.completed('create', 'config/b2-provider.js')
} catch (error) {
// ignore error
await cli.command.failed('create', 'config/b2-provider.js')
await cli.command.info(
'config/b2-provider.js already exists. Copy the config file and check differences manually.'
)
}
try {
await cli.copy(
path.join(__dirname, './templates/B2File.js'),
path.join(cli.Helpers.appRoot(), 'Models/B2File.js')
)
await cli.command.completed('create', 'Models/B2File.js')
} catch (error) {
// ignore error
await cli.command.info(
'Models/B2File.js already exists. Copy the config file and check differences manually.'
)
}
try {
await cli.copy(
path.join(__dirname, './templates/1607035890123_b_2_file_schema.js'),
path.join(cli.Helpers.migrationsPath(), '1607035890123_b_2_file_schema.js')
)
await cli.command.completed('create', 'migrations/1607035890123_b_2_file_schema.js')
} catch (error) {
// ignore error
await cli.command.info(
'migrations/1607035890123_b_2_file_schema.js already exists. Copy the config file and check differences manually.'
)
}
}