mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
Add fallback less cache during build
This commit is contained in:
parent
85f4bba1da
commit
f2c5cd6fda
@ -121,6 +121,8 @@ module.exports = (grunt) ->
|
||||
ext: '.css'
|
||||
|
||||
prebuildLessConfig =
|
||||
options:
|
||||
cachePath: path.join(homeDir, '.atom', 'compile-cache', 'prebuild-less')
|
||||
src: [
|
||||
'static/**/*.less'
|
||||
]
|
||||
|
@ -15,6 +15,8 @@ module.exports = (grunt) ->
|
||||
|
||||
lessCache = new LessCache
|
||||
cacheDir: temp.mkdirSync('atom-less-cache')
|
||||
fallbackDir: grunt.config.get('prebuild-less.options.cachePath')
|
||||
syncCaches: true
|
||||
resourcePath: path.resolve('.')
|
||||
|
||||
bootstrapCss = lessCache.readFileSync(bootstrapLessPath)
|
||||
@ -88,6 +90,8 @@ module.exports = (grunt) ->
|
||||
grunt.verbose.writeln("Building Less cache for #{configuration.join(', ').yellow}")
|
||||
lessCache = new LessCache
|
||||
cacheDir: directory
|
||||
fallbackDir: grunt.config.get('prebuild-less.options.cachePath')
|
||||
syncCaches: true
|
||||
resourcePath: path.resolve('.')
|
||||
importPaths: importPaths
|
||||
|
||||
@ -112,4 +116,4 @@ module.exports = (grunt) ->
|
||||
cacheMisses += lessCache.stats.misses
|
||||
cacheHits += lessCache.stats.hits
|
||||
|
||||
grunt.log.ok(cacheMisses + ' Less files compiled, ' + cacheHits + ' files reused')
|
||||
grunt.log.ok("#{cacheMisses} files compiled, #{cacheHits} files reused")
|
||||
|
Loading…
Reference in New Issue
Block a user