mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-29 09:34:58 +03:00
Precompile pegjs parsers
This commit is contained in:
parent
8cb565ad2a
commit
c39d8d9aa7
@ -25,6 +25,7 @@ module.exports = (grunt) ->
|
|||||||
grunt.loadNpmTasks('grunt-markdown')
|
grunt.loadNpmTasks('grunt-markdown')
|
||||||
grunt.loadNpmTasks('grunt-shell')
|
grunt.loadNpmTasks('grunt-shell')
|
||||||
grunt.loadNpmTasks('grunt-download-atom-shell')
|
grunt.loadNpmTasks('grunt-download-atom-shell')
|
||||||
|
grunt.loadNpmTasks('grunt-peg')
|
||||||
grunt.loadTasks('tasks')
|
grunt.loadTasks('tasks')
|
||||||
|
|
||||||
# This allows all subsequent paths to the relative to the root of the repo
|
# This allows all subsequent paths to the relative to the root of the repo
|
||||||
@ -102,6 +103,13 @@ module.exports = (grunt) ->
|
|||||||
dest: appDir
|
dest: appDir
|
||||||
ext: '.json'
|
ext: '.json'
|
||||||
|
|
||||||
|
pegConfig =
|
||||||
|
glob_to_multiple:
|
||||||
|
expand: true
|
||||||
|
src: ['src/**/*.pegjs']
|
||||||
|
dest: appDir
|
||||||
|
ext: '.js'
|
||||||
|
|
||||||
for child in fs.readdirSync('node_modules') when child isnt '.bin'
|
for child in fs.readdirSync('node_modules') when child isnt '.bin'
|
||||||
directory = path.join('node_modules', child)
|
directory = path.join('node_modules', child)
|
||||||
{engines, theme} = grunt.file.readJSON(path.join(directory, 'package.json'))
|
{engines, theme} = grunt.file.readJSON(path.join(directory, 'package.json'))
|
||||||
@ -110,6 +118,7 @@ module.exports = (grunt) ->
|
|||||||
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
|
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
|
||||||
prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme
|
prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme
|
||||||
csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson")
|
csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson")
|
||||||
|
pegConfig.glob_to_multiple.src.push("#{directory}/**/*.pegjs")
|
||||||
|
|
||||||
grunt.initConfig
|
grunt.initConfig
|
||||||
pkg: grunt.file.readJSON('package.json')
|
pkg: grunt.file.readJSON('package.json')
|
||||||
@ -124,6 +133,8 @@ module.exports = (grunt) ->
|
|||||||
|
|
||||||
cson: csonConfig
|
cson: csonConfig
|
||||||
|
|
||||||
|
peg: pegConfig
|
||||||
|
|
||||||
coffeelint:
|
coffeelint:
|
||||||
options:
|
options:
|
||||||
no_empty_param_list:
|
no_empty_param_list:
|
||||||
@ -207,7 +218,7 @@ module.exports = (grunt) ->
|
|||||||
stderr: false
|
stderr: false
|
||||||
failOnError: false
|
failOnError: false
|
||||||
|
|
||||||
grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson'])
|
grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson', 'peg'])
|
||||||
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
|
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
|
||||||
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
|
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
|
||||||
grunt.registerTask('ci', ['output-disk-space', 'download-atom-shell', 'build', 'set-development-version', 'lint', 'test', 'publish-build'])
|
grunt.registerTask('ci', ['output-disk-space', 'download-atom-shell', 'build', 'set-development-version', 'lint', 'test', 'publish-build'])
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
"request": "~2.27.0",
|
"request": "~2.27.0",
|
||||||
"rimraf": "~2.2.2",
|
"rimraf": "~2.2.2",
|
||||||
"unzip": "~0.1.9",
|
"unzip": "~0.1.9",
|
||||||
"walkdir": "0.0.7"
|
"walkdir": "0.0.7",
|
||||||
|
"grunt-peg": "~1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user