0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Clean the core/built dir often to avoid numerous duplicate files (#9245)

closes #8162

- remove `core/client/dist` from the `clean` task, Ghost-Admin takes care of this automatically
- run `clean:built` any time the following are run so that the built dir doesn't get _huge_ and cutting a release doesn't accidentally include tons of unused built files:
	- `grunt dev`
	- `grunt dev --client`
	- `grunt release`
This commit is contained in:
Kevin Ansfield 2017-11-16 10:44:15 +00:00 committed by Katharina Irrgang
parent 7ab725540c
commit 31ee7bb4e1

View file

@ -259,8 +259,7 @@ var config = require('./core/server/config'),
clean: {
built: {
src: [
'core/built/**',
'core/client/dist/**'
'core/built/**'
]
},
release: {
@ -692,11 +691,11 @@ var config = require('./core/server/config'),
// Note that the current implementation of watch only works with casper, not other themes.
grunt.registerTask('dev', 'Dev Mode; watch files and restart server on changes', function () {
if (grunt.option('client')) {
grunt.task.run(['bgShell:client']);
grunt.task.run(['clean:built', 'bgShell:client']);
} else if (grunt.option('server')) {
grunt.task.run(['express:dev', 'watch']);
} else {
grunt.task.run(['bgShell:client', 'express:dev', 'watch']);
grunt.task.run(['clean:built', 'bgShell:client', 'express:dev', 'watch']);
}
});
@ -743,7 +742,7 @@ var config = require('./core/server/config'),
}]
});
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
}
);
};