diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 078d6f290..65902a593 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -103,7 +103,9 @@ module.exports = (grunt) -> src: '*' dest: 'builds/' expand: true - filter: 'isFile' + filter: (src) -> + pkg = grunt.config 'pkg' + grunt.file.isFile(src) and src isnt "testbuilds/#{pkg.name}#{pkg.meta.suffix.dev}.user.js" coffee: script: @@ -194,7 +196,11 @@ module.exports = (grunt) -> builds: 'builds' testbuilds: 'testbuilds' tmpcrx: ['tmp-crx', 'testbuilds/updates<%= pkg.meta.suffix.noupdate %>.xml'] - tmpuserscript: ['tmp-userscript', 'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.noupdate %>.meta.js'] + tmpuserscript: [ + 'tmp-userscript', + 'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.noupdate %>.meta.js', + 'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.dev %>.meta.js' + ] markdown: web: @@ -268,6 +274,8 @@ module.exports = (grunt) -> 'concat:userscript' 'set-channel:noupdate' 'concat:userscript' + 'set-channel:dev' + 'concat:userscript' 'clean:tmpuserscript' ] diff --git a/package.json b/package.json index 4233e252e..8bcb223a0 100755 --- a/package.json +++ b/package.json @@ -22,7 +22,14 @@ "suffix": { "stable": "", "beta": "-beta", - "noupdate": "-noupdate" + "noupdate": "-noupdate", + "dev": "-dev" + }, + "namesuffix": { + "stable": "", + "beta": " beta", + "noupdate": "", + "dev": " dev" }, "min": { "chrome": "32", diff --git a/src/General/meta/metadata.js b/src/General/meta/metadata.js index cb7629f76..86d508a62 100755 --- a/src/General/meta/metadata.js +++ b/src/General/meta/metadata.js @@ -1,5 +1,5 @@ // ==UserScript== -// @name <%= meta.name %> +// @name <%= meta.name %><%= meta.namesuffix[channel] %> // @version <%= meta.version %> // @minGMVer <%= meta.min.greasemonkey %> // @minFFVer <%= meta.min.firefox %> @@ -18,7 +18,7 @@ // @grant GM_openInTab // @grant GM_xmlhttpRequest // @run-at document-start -<% if (channel !== 'noupdate') { %>// @updateURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.meta.js +<% if (channel !== 'dev') { %><% if (channel !== 'noupdate') { %>// @updateURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.meta.js <% } %>// @downloadURL <%= meta.downloads %><%= name %><%= meta.suffix[channel] %>.user.js -// @icon data:image/png;base64,<%= grunt.file.read('src/General/img/icon48.png', {encoding: 'base64'}) %> +<% } %>// @icon data:image/png;base64,<%= grunt.file.read('src/General/img/icon48.png', {encoding: 'base64'}) %> // ==/UserScript==