mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:41:24 +08:00
DEV: allows lodash to be updated with rake javascript:update
(#7881)
This commit is contained in:
@ -77,6 +77,9 @@ task 'javascript:update' do
|
||||
}, {
|
||||
source: 'moment-timezone/builds/moment-timezone-with-data-10-year-range.js',
|
||||
destination: 'moment-timezone-with-data.js'
|
||||
}, {
|
||||
source: 'lodash.js',
|
||||
destination: 'lodash.js'
|
||||
}, {
|
||||
source: 'moment-timezone-names-translations/locales/.',
|
||||
destination: 'moment-timezone-names-locale'
|
||||
@ -124,6 +127,12 @@ task 'javascript:update' do
|
||||
dest = "#{vendor_js}/#{filename}"
|
||||
end
|
||||
|
||||
# lodash.js needs building
|
||||
if src.include? "lodash.js"
|
||||
puts "Building custom lodash.js build"
|
||||
system('yarn run lodash include="each,filter,map,range,first,isEmpty,chain,extend,every,omit,merge,union,sortBy,uniq,intersection,reject,compact,reduce,debounce,throttle,values,pick,keys,flatten,min,max,isArray,delay,isString,isEqual,without,invoke,clone,findIndex,find,groupBy" minus="template" -d -o "node_modules/lodash.js"')
|
||||
end
|
||||
|
||||
unless File.exists?(dest)
|
||||
STDERR.puts "New dependency added: #{dest}"
|
||||
end
|
||||
|
Reference in New Issue
Block a user