2016-03-18 11:12:50 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Module dependencies
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Node.js core.
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
// Local dependencies.
|
|
|
|
const packageJSON = require('../json/package.json.js');
|
2018-01-05 15:17:59 +01:00
|
|
|
const database = require('../json/database.json.js');
|
2016-03-18 11:12:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Copy required files for the generated application
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
moduleDir: path.resolve(__dirname, '..'),
|
|
|
|
templatesDirectory: path.resolve(__dirname, '..', 'templates'),
|
|
|
|
before: require('./before'),
|
|
|
|
after: require('./after'),
|
|
|
|
targets: {
|
|
|
|
|
2016-12-01 16:44:03 +01:00
|
|
|
// Call the `admin` generator.
|
2019-04-05 16:11:09 +02:00
|
|
|
// '.': ['admin'],
|
2016-12-01 16:44:03 +01:00
|
|
|
|
2016-03-18 11:12:50 +01:00
|
|
|
// Main package.
|
|
|
|
'package.json': {
|
|
|
|
jsonfile: packageJSON
|
|
|
|
},
|
|
|
|
|
2018-01-05 15:17:59 +01:00
|
|
|
'config/environments/development/database.json': {
|
|
|
|
jsonfile: database
|
|
|
|
},
|
|
|
|
|
2019-01-27 16:55:55 +01:00
|
|
|
'config/environments/production/database.json': {
|
|
|
|
jsonfile: database
|
|
|
|
},
|
|
|
|
|
|
|
|
'config/environments/staging/database.json': {
|
|
|
|
jsonfile: database
|
|
|
|
},
|
|
|
|
|
2016-03-18 11:12:50 +01:00
|
|
|
// Copy dot files.
|
|
|
|
'.editorconfig': {
|
|
|
|
copy: 'editorconfig'
|
|
|
|
},
|
2017-12-13 14:23:07 +01:00
|
|
|
'.gitignore': {
|
|
|
|
copy: 'gitignore'
|
|
|
|
},
|
2016-03-18 11:12:50 +01:00
|
|
|
|
|
|
|
// Copy Markdown files with some information.
|
|
|
|
'README.md': {
|
2018-10-29 18:50:30 +01:00
|
|
|
template: 'README.md'
|
2016-03-18 11:12:50 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
// Empty API directory.
|
|
|
|
'api': {
|
|
|
|
folder: {}
|
2016-08-31 12:24:27 +02:00
|
|
|
},
|
|
|
|
|
2019-05-16 14:35:47 +02:00
|
|
|
'api/.gitkeep': {
|
|
|
|
copy: 'gitkeep'
|
|
|
|
},
|
|
|
|
|
2016-08-31 12:24:27 +02:00
|
|
|
// Empty plugins directory.
|
2019-04-05 16:11:09 +02:00
|
|
|
'extensions': {
|
2016-08-31 12:24:27 +02:00
|
|
|
folder: {}
|
2016-08-31 12:26:26 +02:00
|
|
|
},
|
2016-08-31 12:25:07 +02:00
|
|
|
|
|
|
|
// Empty public directory.
|
|
|
|
'public': {
|
|
|
|
folder: {}
|
2016-10-24 18:14:53 +02:00
|
|
|
},
|
|
|
|
|
2018-02-19 15:41:26 +01:00
|
|
|
// Empty public directory.
|
|
|
|
'public/uploads': {
|
|
|
|
folder: {}
|
2018-04-20 15:31:57 +02:00
|
|
|
},
|
2019-01-22 12:31:49 +02:00
|
|
|
// Copy gitkeep into uploads directory.
|
|
|
|
'public/uploads/.gitkeep': {
|
|
|
|
copy: 'gitkeep'
|
|
|
|
},
|
2018-04-20 15:31:57 +02:00
|
|
|
// Empty node_modules directory.
|
|
|
|
'node_modules': {
|
|
|
|
folder: {}
|
2016-08-31 12:25:07 +02:00
|
|
|
}
|
2016-03-18 11:12:50 +01:00
|
|
|
}
|
|
|
|
};
|