mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 15:46:28 +08:00
fix(build): Defer require
of parent node modules until they're fetched #2184
This commit is contained in:
parent
b5ef44daaf
commit
134284ff9c
4 changed files with 7 additions and 7 deletions
|
@ -184,6 +184,9 @@ module.exports = (grunt) ->
|
|||
ext: '.js'
|
||||
|
||||
for folder in ['node_modules', 'internal_packages']
|
||||
if not fs.existsSync(folder)
|
||||
console.log("Ignoring #{folder}, which is missing.")
|
||||
continue
|
||||
for child in fs.readdirSync(folder) when child isnt '.bin'
|
||||
directory = path.join(folder, child)
|
||||
metadataPath = path.join(directory, 'package.json')
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
// Copied from https://github.com/babel/grunt-babel to ensure we always
|
||||
// use the `babel-core` defined in our own package.json as opposed to the
|
||||
// grunt-babel dependency's
|
||||
|
||||
var path = require('path');
|
||||
var babel = require('babel-core');
|
||||
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerMultiTask('babel', 'Use next generation JavaScript, today', function () {
|
||||
var path = require('path');
|
||||
var babel = require('babel-core');
|
||||
var options = this.options();
|
||||
|
||||
this.files.forEach(function (el) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
path = require 'path'
|
||||
fs = require 'fs-plus'
|
||||
ModuleCache = require '../../src/module-cache'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
grunt.registerTask 'generate-module-cache', 'Generate a module cache for all core modules and packages', ->
|
||||
ModuleCache = require '../../src/module-cache'
|
||||
appDir = grunt.config.get('nylasGruntConfig.appDir')
|
||||
|
||||
{packageDependencies} = grunt.file.readJSON('package.json')
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
path = require 'path'
|
||||
fs = require 'fs'
|
||||
|
||||
LessCache = require 'less-cache'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
grunt.registerMultiTask 'prebuild-less', 'Prebuild cached of compiled LESS files', ->
|
||||
LessCache = require 'less-cache'
|
||||
prebuiltConfigurations = [
|
||||
['ui-light', 'ui-dark']
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue