Windows compatibility.
This commit is contained in:
parent
c296b5b6cf
commit
d9c0b066eb
@ -16,6 +16,7 @@ module.exports = (grunt) ->
|
|||||||
pkg: loadPkg()
|
pkg: loadPkg()
|
||||||
|
|
||||||
concat:
|
concat:
|
||||||
|
options: process: (src) -> src.replace /\r\n/g, '\n'
|
||||||
coffee:
|
coffee:
|
||||||
src: [
|
src: [
|
||||||
'src/General/Config.coffee'
|
'src/General/Config.coffee'
|
||||||
@ -120,16 +121,16 @@ module.exports = (grunt) ->
|
|||||||
stderr: true
|
stderr: true
|
||||||
failOnError: true
|
failOnError: true
|
||||||
'templates-crx':
|
'templates-crx':
|
||||||
command: 'node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-crx.coffee crx - <%= pkg.tests_enabled || "" %>'
|
command: 'node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-crx.coffee crx - <%= pkg.tests_enabled || "" %>'.replace(/\//g, path.sep)
|
||||||
'templates-crx-meta':
|
'templates-crx-meta':
|
||||||
command: """
|
command: """
|
||||||
node_modules/.bin/coffee tools/templates.coffee src/meta/updates.xml testbuilds/updates<%= pkg.meta.suffix[pkg.channel] %>.xml crx <%= pkg.channel %>
|
node_modules/.bin/coffee tools/templates.coffee src/meta/updates.xml testbuilds/updates<%= pkg.meta.suffix[pkg.channel] %>.xml crx <%= pkg.channel %>
|
||||||
node_modules/.bin/coffee tools/templates.coffee src/meta/manifest.json testbuilds/crx<%= pkg.meta.suffix[pkg.channel] %>/manifest.json crx <%= pkg.channel %>
|
node_modules/.bin/coffee tools/templates.coffee src/meta/manifest.json testbuilds/crx<%= pkg.meta.suffix[pkg.channel] %>/manifest.json crx <%= pkg.channel %>
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||||
'templates-userscript':
|
'templates-userscript':
|
||||||
command: 'node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-userscript.coffee userscript - <%= pkg.tests_enabled || "" %>'
|
command: 'node_modules/.bin/coffee tools/templates.coffee tmp/script.coffee tmp/script-userscript.coffee userscript - <%= pkg.tests_enabled || "" %>'.replace(/\//g, path.sep)
|
||||||
'templates-userscript-meta':
|
'templates-userscript-meta':
|
||||||
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/metadata.js testbuilds/<%= pkg.name %><%= pkg.meta.suffix[pkg.channel] %>.meta.js userscript <%= pkg.channel %>'
|
command: 'node_modules/.bin/coffee tools/templates.coffee src/meta/metadata.js testbuilds/<%= pkg.name %><%= pkg.meta.suffix[pkg.channel] %>.meta.js userscript <%= pkg.channel %>'.replace(/\//g, path.sep)
|
||||||
commit:
|
commit:
|
||||||
command: """
|
command: """
|
||||||
git commit -am "Release <%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
git commit -am "Release <%= pkg.meta.name %> v<%= pkg.meta.version %>."
|
||||||
@ -212,7 +213,7 @@ module.exports = (grunt) ->
|
|||||||
command: """
|
command: """
|
||||||
npm install --save-dev <%= Object.keys(pkg.devDependencies).filter(function(name) {return /^\\^/.test(pkg.devDependencies[name]);}).map(function(name) {return name+'@latest';}).join(' ') %>
|
npm install --save-dev <%= Object.keys(pkg.devDependencies).filter(function(name) {return /^\\^/.test(pkg.devDependencies[name]);}).map(function(name) {return name+'@latest';}).join(' ') %>
|
||||||
./node_modules/.bin/npm-shrinkwrap --dev
|
./node_modules/.bin/npm-shrinkwrap --dev
|
||||||
""".split('\n').join('&&')
|
""".split('\n').join('&&').replace(/\//g, path.sep)
|
||||||
|
|
||||||
webstore_upload:
|
webstore_upload:
|
||||||
accounts:
|
accounts:
|
||||||
|
|||||||
@ -6,7 +6,7 @@ glob = require 'glob'
|
|||||||
# disable ES6 delimiters
|
# disable ES6 delimiters
|
||||||
_.templateSettings.interpolate = /<%=([\s\S]+?)%>/g
|
_.templateSettings.interpolate = /<%=([\s\S]+?)%>/g
|
||||||
|
|
||||||
read = (filename) -> fs.readFileSync filename, 'utf8'
|
read = (filename) -> fs.readFileSync(filename, 'utf8').replace(/\r\n/g, '\n')
|
||||||
|
|
||||||
pkg = JSON.parse(read 'package.json')
|
pkg = JSON.parse(read 'package.json')
|
||||||
_.assign pkg.meta, JSON.parse(read 'version.json')
|
_.assign pkg.meta, JSON.parse(read 'version.json')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user