Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Feb 02 08:44
    benarmstead closed #356
  • Jan 31 19:44
    marishuman edited #358
  • Jan 31 05:21
    marishuman edited #358
  • Jan 31 05:16
    marishuman edited #358
  • Jan 31 05:14
    marishuman opened #358
  • Jan 29 14:16
    ali-mozaffari edited #357
  • Jan 29 14:14
    ali-mozaffari opened #357
  • Jan 12 09:17
    srThibaultP closed #338
  • Jan 12 09:17
    srThibaultP commented #338
  • Dec 29 2022 10:07
    benarmstead opened #356
  • Dec 16 2022 08:05
    Cheppar commented #229
  • Nov 17 2022 01:40
    yurloc opened #355
  • Oct 28 2022 12:08
    Khodor1997 opened #354
  • Oct 27 2022 13:36
    proyer-maxar commented #167
  • Oct 13 2022 09:21
    dolorain closed #308
  • Oct 12 2022 19:07
    DPatel13 reopened #353
  • Oct 12 2022 19:07
    DPatel13 closed #353
  • Oct 12 2022 19:07
    DPatel13 opened #353
  • Oct 12 2022 18:59
    DPatel13 opened #352
  • Oct 12 2022 14:17
    sgibbes commented #338
Daniel Smullen
my belief is that grunt automatically pulls from this file, concatenates and minifies all of them
oh dear
sorry let me do that again
module.exports = {
  client: {
    lib: {
      css: [
      js: [


      tests: ['public/lib/angular-mocks/angular-mocks.js']
    css: [
the serverside section is below...

  server: {
    gruntConfig: 'gruntfile.js',
    gulpConfig: 'gulpfile.js',
    allJS: ['server.js', 'config/**/*.js', 'modules/*/server/**/*.js'],
    models: 'modules/*/server/models/**/*.js',
    routes: ['modules/!(core)/server/routes/**/*.js', 'modules/core/server/routes/**/*.js'],
    sockets: 'modules/*/server/sockets/**/*.js',
    config: 'modules/*/server/config/*.js',
    policies: 'modules/*/server/policies/*.js',
    views: 'modules/*/server/views/*.html'
so the public/lib/ folder is where i store clientside modules that i get through bower
the modules/ folder is where i put my own defined modules, as in page contents, etc.
and then the node-modules/ folder is where my other modules, got through npm, go
so the gruntfile is designed to pull from that module.exports object, get all the javascript files, concatenate and minify them
Daniel Smullen
and as a result i can use the objects exported by them
Stephan Meijer
okay, I understand.
a quick fix, would be to handle leaflet-geosearch the same as you handle jquery.
Than there must be a global GeoSearch, the OSM provider should be under GeoSearch.OpenStreetMapProvider
Daniel Smullen
i attempted that, let me see if i needed to qualify it with GeoSearch.*
one moment
Stephan Meijer
A map would than be loaded with:
var searchControl = new GeoSearch.GeoSearchControl({
  provider: new GeoSearch.OpenStreetMapProvider(),

var map = new L.Map('map');
Daniel Smullen
let's see if this works...
nope, GeoSearch is undefined
so it seems i am not able to get the top level object from your library, at all
Stephan Meijer
Is it possible that that because it's not in your public dir?
Daniel Smullen
that is a possibility, which i will look into, but i'm not totally sure how to determine that
the reason why it is in the npm managed node-modules folder is because i could not get the dist/ folder when using bower to install
of course i can copy it manually, but in order to maintain the installation process for the app in general, i must find some way to get the dist/ folder contents through bower, since that would be the idea behind providing a module through bower
in fact the idea behind distributing the module that way, i believe, would be to decouple the module from the build process' itself's dependencies
Stephan Meijer
yes, I understand of course. Just curious if that can be the reason.
Is it possible to refer external (cdn hosted for example), libraries?
Daniel Smullen
it is a very reasonable suggestion
to answer the cdn question, i am not sure, but maybe it is possible since i think i've done that in the line where i get material icons
but i am not sure how desirable this is
this means that my configuration file must have a static binding to that URL, so if it changes i have to update everything, whereas using bower's manifest i can automatically insert these dependencies since their path is predictable based on my bower config file
the leaflet bower package, for example, already has a dist/ folder
Stephan Meijer
Sorry, I have a phone call. Be right back.
Daniel Smullen
Daniel Smullen

i believe your bower.json might be fixed by replacing the line

"main": "src/js/l.control.geosearch.js",


"main": "dist/bundle.js",

and then committing the dist/ folder inside the git repository

then $ bower install leaflet-geosearch will work out of the box
also, to answer the CDN question, it is not possible - the purpose of bower is to also manage your module's dependencies as well, so that it can be linked to them after downloading them once, rather than managing a separate version for each module
for example, if you depend on angularJS, bower will ensure that it is downloaded once, and then all other bower-installed modules which depend on it will link to it, rather than managing it's own copy
you must define these dependencies in the bower.json file
and you can control what version you depend on as well
Stephan Meijer
Okay; makes sense. Although I do not understand why that fixes your problem. Why can you than refer to the globals, and not when you point directly to the bundle.js. It's strange for me.
Daniel Smullen
it's strange for me as well, i don't have a good explanation for why i can't use bundle.js as it is
Stephan Meijer
I must think about this. I'm not really in favor of committing build files to a git repo. Especially since bower is already advising to start using yarn in favor of bower.
Daniel Smullen
it is an important decision, the issue revolves around supporting bower, which is still supported
webpack and yarn and the like are suggested for new projects
Stephan Meijer
Daniel Smullen
but unfortunately my project still depends on bower for building
Stephan Meijer
and when installing trough bower, you can specify a git branch or something?