mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
dev env: automatically remove fake header from desktop builds
This commit is contained in:
parent
4518f50efa
commit
0bc7f3bc05
20
Gruntfile.js
20
Gruntfile.js
@ -228,6 +228,20 @@ module.exports = function(grunt) {
|
||||
// src/index.html should already have been moved by the includereplace task
|
||||
{src: ['dest/tmp/index.html'], dest: 'dest/prod/piskelapp-partials/main-partial.html'}
|
||||
]
|
||||
},
|
||||
// remove the fake header from the desktop build
|
||||
desktop: {
|
||||
options: {
|
||||
patterns: [{
|
||||
match: /<!--standalone-start-->(?:.|[\r\n])*<!--standalone-end-->/,
|
||||
replacement: "",
|
||||
description : "Remove everything between standalone-start & standalone-end"
|
||||
}
|
||||
]
|
||||
},
|
||||
files: [
|
||||
{src: ['dest/prod/index.html'], dest: 'dest/prod/index.html'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@ -314,15 +328,15 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.registerTask('build-index.html', ['includereplace']);
|
||||
grunt.registerTask('merge-statics', ['concat:js', 'concat:css', 'uglify']);
|
||||
grunt.registerTask('build', ['clean:prod', 'sprite', 'merge-statics', 'build-index.html', 'replace', 'copy:prod']);
|
||||
grunt.registerTask('build', ['clean:prod', 'sprite', 'merge-statics', 'build-index.html', 'replace:mainPartial', 'copy:prod']);
|
||||
grunt.registerTask('build-dev', ['clean:dev', 'sprite', 'build-index.html', 'copy:dev']);
|
||||
|
||||
// Validate & Build
|
||||
grunt.registerTask('default', ['lint', 'build']);
|
||||
|
||||
// Build stand alone app with nodewebkit
|
||||
grunt.registerTask('desktop', ['clean:desktop', 'default', 'nwjs:windows']);
|
||||
grunt.registerTask('desktop-mac', ['clean:desktop', 'default', 'nwjs:macos']);
|
||||
grunt.registerTask('desktop', ['clean:desktop', 'default', 'replace:desktop', 'nwjs:windows']);
|
||||
grunt.registerTask('desktop-mac', ['clean:desktop', 'default', 'replace:desktop', 'nwjs:macos']);
|
||||
|
||||
// Start webserver and watch for changes
|
||||
grunt.registerTask('serve', ['build', 'connect:prod', 'open:prod', 'watch:prod']);
|
||||
|
@ -22,7 +22,9 @@
|
||||
color:white;">
|
||||
<span style="top:45%">Loading Piskel ...</span>
|
||||
</div>
|
||||
<!--standalone-start-->
|
||||
@@include('templates/debug-header.html', {})
|
||||
<!--standalone-end-->
|
||||
|
||||
<!-- the comment below indicates the beginning of markup reused by the editor integrated in piskelapp.com -->
|
||||
<!-- do not delete, do not move :) -->
|
||||
|
Loading…
Reference in New Issue
Block a user