|
@@ -1,14 +1,12 @@
|
|
module.exports = function(grunt) {
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
- var DEV_SERVER_PORT = 8383;
|
|
|
|
- var TEST_SERVER_PORT = 8387;
|
|
|
|
-
|
|
|
|
// Tell our Express server that Grunt launched it
|
|
// Tell our Express server that Grunt launched it
|
|
process.env.GRUNTED = true;
|
|
process.env.GRUNTED = true;
|
|
|
|
|
|
// Project configuration.
|
|
// Project configuration.
|
|
grunt.initConfig({
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
|
|
+ settings: grunt.file.readJSON('./server_config/settings.json'),
|
|
|
|
|
|
font: {
|
|
font: {
|
|
icons: {
|
|
icons: {
|
|
@@ -37,6 +35,21 @@ module.exports = function(grunt) {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ replace: {
|
|
|
|
+ dist: {
|
|
|
|
+ options: {
|
|
|
|
+ patterns: [
|
|
|
|
+ {
|
|
|
|
+ match: 'googleAnalyticsId',
|
|
|
|
+ replacement: '<%= settings.googleAnalyticsId %>'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ files: [
|
|
|
|
+ {expand: true, flatten: true, src: ['front/src/main.html'], dest: 'front/build/'}
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
jshint: {
|
|
jshint: {
|
|
all: [
|
|
all: [
|
|
'*.js',
|
|
'*.js',
|
|
@@ -171,7 +184,8 @@ module.exports = function(grunt) {
|
|
]);
|
|
]);
|
|
|
|
|
|
grunt.registerTask('build', [
|
|
grunt.registerTask('build', [
|
|
- 'less'
|
|
|
|
|
|
+ 'less',
|
|
|
|
+ 'replace'
|
|
]);
|
|
]);
|
|
|
|
|
|
grunt.registerTask('hint', [
|
|
grunt.registerTask('hint', [
|