diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js index 09f98741e..3bfa14c40 100644 --- a/loleaflet/Jakefile.js +++ b/loleaflet/Jakefile.js @@ -19,7 +19,7 @@ var build = require('./build/build.js'), function hint(msg, args) { return function () { console.log(msg); - jake.exec('node node_modules/eslint/bin/eslint.js ' + args, + jake.exec('node ' + builddir + 'node_modules/eslint/bin/eslint.js ' + args, {printStdout: true}, function () { console.log('\tCheck passed.\n'); complete(); diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js index a610e7b0c..9ea9e9eac 100644 --- a/loleaflet/build/build.js +++ b/loleaflet/build/build.js @@ -139,8 +139,9 @@ function bytesToKB(bytes) { } function bundle(files, destFilename, debug, minify, callback) { - var bundler = browserify(files, {debug: debug}); - bundler = bundler.transform(browserifyCss); + var node_paths = builddir !== '' ? [builddir + 'node_modules'] : [process.cwd() +'/node_modules'] + var bundler = browserify(files, {debug: debug, paths:node_paths}); + bundler = bundler.transform(browserifyCss, {global:true}); if (minify) { console.log('uglifying'); bundler.transform({ diff --git a/loleaflet/main-admin.js b/loleaflet/main-admin.js index fab52de1a..f1d0d4b3b 100644 --- a/loleaflet/main-admin.js +++ b/loleaflet/main-admin.js @@ -1,9 +1,9 @@ // CSS requires -require('./node_modules/bootstrap/dist/css/bootstrap.css'); +require('bootstrap/dist/css/bootstrap.css'); require('./dist/admin/bootstrap/ie10-viewport-bug-workaround.css'); require('./dist/admin/bootstrap/dashboard.css'); -require('./node_modules/vex-js/css/vex.css'); -require('./node_modules/vex-js/css/vex-theme-plain.css'); +require('vex-js/css/vex.css'); +require('vex-js/css/vex-theme-plain.css'); var $ = require('jquery'); global.$ = global.jQuery = $; diff --git a/loleaflet/package.json b/loleaflet/package.json index 97625dc4c..d7d2ace8a 100644 --- a/loleaflet/package.json +++ b/loleaflet/package.json @@ -29,11 +29,6 @@ "browser": { "loleaflet": "./dist/leaflet-src.js" }, - "browserify": { - "transform": [ - "browserify-css" - ] - }, "main": "main.js", "style": "main.css", "scripts": {