mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Allow for styles/ directory in themes in prebuild-less task
This commit is contained in:
parent
ae9e1b0416
commit
f570a417e6
@ -1,4 +1,5 @@
|
||||
path = require 'path'
|
||||
fs = require 'fs'
|
||||
|
||||
LessCache = require 'less-cache'
|
||||
|
||||
@ -25,7 +26,10 @@ module.exports = (grunt) ->
|
||||
for theme in configuration
|
||||
# TODO Use AtomPackage class once it runs outside of an Atom context
|
||||
themePath = path.resolve('node_modules', theme)
|
||||
stylesheetsDir = path.join(themePath, 'stylesheets')
|
||||
if fs.existsSync(path.join(themePath, 'stylesheets'))
|
||||
stylesheetsDir = path.join(themePath, 'stylesheets')
|
||||
else
|
||||
stylesheetsDir = path.join(themePath, 'styles')
|
||||
{main} = grunt.file.readJSON(path.join(themePath, 'package.json'))
|
||||
main ?= 'index.less'
|
||||
mainPath = path.join(themePath, main)
|
||||
|
Loading…
Reference in New Issue
Block a user