This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
index.js
101 lines (80 loc) · 5.35 KB
/
index.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* sails-generate-frontend
*
* Usage:
* `sails generate frontend`
*
* @type {Dictionary}
*/
module.exports = {
templatesDirectory: require('path').resolve(__dirname,'./templates'),
/**
* The targets to generate.
* @type {Dictionary}
*/
targets: {
// █████╗ ███████╗███████╗███████╗████████╗███████╗ ██╗
// ██╔══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝██╔════╝ ██╔╝
// ███████║███████╗███████╗█████╗ ██║ ███████╗ ██╔╝
// ██╔══██║╚════██║╚════██║██╔══╝ ██║ ╚════██║ ██╔╝
// ██║ ██║███████║███████║███████╗ ██║ ███████║██╔╝
// ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝ ╚══════╝╚═╝
//
// Default assets folder and contents:
'./assets': { folder: {} },
'./assets/favicon.ico': { copy: 'assets/favicon.ico' },
'./assets/robots.txt': { template: 'assets/robots.txt' },
'./assets/images': { folder: {} },
'./assets/images/.gitkeep': { copy: '.gitkeep'},
'./assets/styles': { folder: {} },
'./assets/styles/importer.less': { template: 'assets/styles/importer.less' },
'./assets/templates': { folder: {} },
'./assets/templates/.gitkeep': { copy: '.gitkeep'},
'./assets/js': { folder: {} },
'./assets/js/dependencies': { folder: {} },
// Call sails.io.js sub-generator to create the browser sdk at the conventional location
// (in `assets/js/dependencies/sails.io.js`)
'./': ['sails.io.js'],
// Example for folks creating custom front-end generators:
// > (i.e. how to inject other client-side dependencies)
// ====================================================================================
// './assets/js/dependencies/angular.min.js': { exec: function (scope, cb) {
// if (scope.frontend !== 'angular') return cb();
// var src = require('path').resolve(__dirname,'../templates/assets/js/dependencies/angular.min.js');
// require('fs-extra').copy(src, scope.rootPath, cb);
// } },
// ====================================================================================
// ████████╗ █████╗ ███████╗██╗ ██╗███████╗ ██╗
// ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██╔════╝ ██╔╝
// ██║ ███████║███████╗█████╔╝ ███████╗ ██╔╝
// ██║ ██╔══██║╚════██║██╔═██╗ ╚════██║ ██╔╝
// ██║ ██║ ██║███████║██║ ██╗███████║██╔╝
// ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝
//
// Default tasks/ folder and contents:
// asset pipeline setup
'./tasks/pipeline.js': { template: 'tasks/pipeline.js' },
// grunt task configurations (`tasks/config`)
'./tasks/config/clean.js': { copy: 'tasks/config/clean.js' },
'./tasks/config/coffee.js': { copy: 'tasks/config/coffee.js' },
'./tasks/config/concat.js': { copy: 'tasks/config/concat.js' },
'./tasks/config/copy.js': { copy: 'tasks/config/copy.js' },
'./tasks/config/cssmin.js': { copy: 'tasks/config/cssmin.js' },
'./tasks/config/jst.js': { copy: 'tasks/config/jst.js' },
'./tasks/config/less.js': { copy: 'tasks/config/less.js' },
'./tasks/config/sails-linker.js': { copy: 'tasks/config/sails-linker.js' },
'./tasks/config/sync.js': { copy: 'tasks/config/sync.js' },
'./tasks/config/uglify.js': { copy: 'tasks/config/uglify.js' },
'./tasks/config/watch.js': { template: 'tasks/config/watch.js.template' },
// built-in grunt tasks which are automatically called by Sails (`tasks/register`)
'./tasks/register/build.js': { copy: 'tasks/register/build.js' },
'./tasks/register/buildProd.js': { copy: 'tasks/register/buildProd.js' },
'./tasks/register/compileAssets.js': { copy: 'tasks/register/compileAssets.js' },
'./tasks/register/linkAssets.js': { copy: 'tasks/register/linkAssets.js' },
'./tasks/register/linkAssetsBuild.js': { copy: 'tasks/register/linkAssetsBuild.js' },
'./tasks/register/linkAssetsBuildProd.js': { copy: 'tasks/register/linkAssetsBuildProd.js' },
'./tasks/register/prod.js': { copy: 'tasks/register/prod.js' },
'./tasks/register/syncAssets.js': { copy: 'tasks/register/syncAssets.js' },
'./tasks/register/default.js': { template: 'tasks/register/default.js.template' },
}
};