Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 27 18:34
    dependabot[bot] closed #46
  • Apr 27 18:34
    dependabot[bot] commented #46
  • Apr 27 18:34
    dependabot[bot] labeled #47
  • Apr 27 18:34
    dependabot[bot] opened #47
  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    Bump async from 0.2.9 to 2.6.4 … (compare)

  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 27 18:34
    dependabot[bot] closed #186
  • Apr 27 18:34
    dependabot[bot] commented #186
  • Apr 27 18:34
    dependabot[bot] labeled #187
  • Apr 27 18:34
    dependabot[bot] opened #187
  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    Bump async from 2.6.0 to 2.6.4 … (compare)

  • Apr 13 00:00
    dependabot[bot] labeled #46
  • Apr 13 00:00
    dependabot[bot] opened #46
  • Apr 13 00:00
    dependabot[bot] labeled #186
  • Apr 13 00:00

    dependabot[bot] on npm_and_yarn

    Bump async from 0.2.9 to 3.2.2 … (compare)

  • Apr 13 00:00
    dependabot[bot] opened #186
  • Apr 13 00:00

    dependabot[bot] on npm_and_yarn

    Bump async from 2.6.0 to 3.2.2 … (compare)

  • Feb 28 21:02
    sabymike closed #7
  • Jan 15 01:01
    dependabot[bot] labeled #45
Brad Compton (he/him)
@Bradcomp
@johowie Yes, that is indeed possible.
Paul Green
@thatgreenguy
Hi I have this in a view :
a.btn.btn-default(href="#")
span.glyphicon.glyphicon-plus
| New
But I'm not seeing the correct display for the glyph - just some weird circle character - anyone point me in the right direction - first time ampersand user ;->
I can see bootstrap.css in stylesheets but i'm not sure if that comes with the glyphs or I need to import them as a separate file?
Paul Green
@thatgreenguy
ok so I have bootstrap v3.2 which comes with default set of glyphicons - ampersand is building/bundling the icons into a fonts directory and delivering that to the client so they should be served from localhost:3000/fonts/ etc
but in chrome when accessing the page I am seeing 2 errors
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.ttf (and .woff)
as well as OTS parsing error: invalid version tag
Anyone else seen this in past - any ideas how to resolve this?
Paul Green
@thatgreenguy
Looking at the .ttf and .woff glyphicons files in fonts in my browser I notice that the mime typr for both of them is reported as text/html ???
Richard Butler
@RickButler
@thatgreenguy sounds like browsersync isn't serving the right mime type for it, but offhand I'm not sure if that's even browsersyncs fault. Normally your web server will return the correct mime type but browser sync is just putting an IP infront of some static files.
@thatgreenguy are you using one of the sample projects?
Paul Green
@thatgreenguy
I used the ampersand cli tool to generate the project
Have created couple of models views templates etc
Im new to ampresand so still learning
Richard Butler
@RickButler
@thatgreenguy in the CLI moonboots is used to serve the client side. https://github.com/lukekarrys/moonboots-express
Paul Green
@thatgreenguy
Ah okay will take a look at that - using node/express on backend but was not sure where to go for config of mimetypes - thanks
Richard Butler
@RickButler
Moonboots is just a plugin around express from what I see. In the index.js you see where it configures paths and content types
    path: this.jsPath(),
    contentType: 'javascript',
    cachePeriod: this.options.cachePeriod,
    source: moonboots.jsSource,
    middleware: this.middleware.js
  })
you can probably set up a path for your font resources and add the appropriate content type.
Paul Green
@thatgreenguy
Many thanks for pointing me in right direction - cheers
Richard Butler
@RickButler
@thatgreenguy no problem, good luck.
Rui Ramos
@ruiramos
hi everyone, cc @cdaringe, just updated my ampersand-view dependency bcs of that known issue with render-remove-render breaking bindings and subviews however i'm surprised that when you overwrite the view's render method, the new _render function created skips the call to _upsertBindings()... am I missing something here?
thanks
Richard Butler
@RickButler
@ruiramos I think that keeps it in line with previous versions of render and _render behavior. Before they started using defineProperty for render (and after), you had to call the prototype.render if you wanted default functionality + your custom functionality. I think they are trying to maintain backwards compatability.
I have lots of projects from old versions where I def render: ```
render: function () {
//custom stuff before
view.prototype.render.call(this);
//custom stuff after
}
render: function () {
//custom stuff before
view.prototype.render.call(this);
//custom stuff after
}
Adarsh Nanwani
@adarshnanwani
Hi everyone. I came across AmpersandJS when I was researching on some new UI frameworks and now I want to use it build a small UI rich application.
But, I have no prior experience of working with Node.js and Browserify.
Can anyone please tell me what should be the starting point for an absolute beginner like me?
It would be really helpful if I can get an outline of what all I need to do/know, in order to build an app using AmpersandJS.
Please help me out in this, I will be really grateful. Thanks in advance!
M. Scott Doerrie
@doerrie
I am having trouble with the 'moonboots_hapi' module. I'm new to this framework and am probably doing something wrong that is easily corrected. If anyone can find a mistake in this, let me know. I ran these commands:
$ git clone https://github.com/wraithgar/moonboots_hapi.git
$ cd moonboots_hapi/
$ git checkout v7.0.0
$ npm install
$ npm test
23 tests complete
Test duration: 1900 ms
The following leaks were detected:Reflect
Coverage: 85.29% (25/170)
index.js missing coverage on line(s): 6, 16, 19, 31, 37, 48, 54, 55, 56, 57, 58, 59, 77, 78, 79, 80, 81, 96, 97, 98, 99, 100, 121, 128, 142

npm ERR! Test failed.  See above for more details.
M. Scott Doerrie
@doerrie
I wanted to start with a known good result before attempting to provide modifications, but this problem suggests that I'm doing something much more fundamentally wrong.
v1rt
@v1rt
I posted this question in Backbone channel thinking that there might be non-ampersand devs on that channel.
Good evening folks. We're using backbonejs, marionette and ampersand state. I was tasked replace internationalization/localization that my teammate wrote from scratch. 5 years ago, I used i18next on a jquery/php project. I'd like to know which library I should use this time. I'd like something that is easy to implement. I'd like to be able to just update a json file rather than changing or assigning values during runtime(like what my teammate did).
v1rt
@v1rt
Does this mean we are not using BackboneJS nor Ampersand but rather Backbone.Marionette? This is from our package.json
    "ampersand-router": "^3.0.2",
    "backbone.marionette": "^2.4.4",
    "bluebird": "^3.3.4",
    "lodash": "^4.17.4",
    "marionette.component": "0.0.1",
    "moment": "^2.14.1",
Richard Butler
@RickButler
@v1rt do you use a templating library (handlebars, mustache, jade, etc)? Some have i18n plugins. If you use static html files, you could make them into handlebars files for example, and then precompile them back to static html with your replacement values from json.
@doerrie I just looks like a test coverage error, I wouldn't worry about it. Open an issue if you are concerned. Personally I would use the cli generated project as an example, a lot of the refs are out of date. The server side stuff (hapi, express) is nothing like what you would use in production imo.
Richard Butler
@RickButler
@doerrie wouldn't* use the cli generated project
v1rt
@v1rt
hi @RickButler , yes we do use handlebars
we import the template in every component using import. Here is one of our components called Status
import {LayoutView} from 'backbone.marionette';
import template from './template';

export default LayoutView.extend({

  modelEvents: {
    change: 'render'
  },

  template: template,

  templateHelpers() {
    return this.model.toJSON();
  }

});
Richard Butler
@RickButler
@v1rt there are i18n plugins for handlebars, if you are using require.js there is a i18n plugin for it too. If I was writing it, I would precompile the the internationalization part, so you would have seperate templates per language. I don't know how your system is setup though, so that may not be feasible.
hsimah
@hsimah
when I hit save() on my ampersand-model the derived and children fields are posted to the api along with the props. is there a way to stop this happening? I have a projectId prop and a project is one of the model's children. I only want to send the projectId to the api on save, not the project model
Richard Butler
@RickButler
@hsimah derived fields shouldn't be going by default. If you want to change what gets sent you can overwrite the serialize method.
hsimah
@hsimah
@RickButler you're right, the derived fields aren't being submitted. only the children and collections. I will look at the serialize method.
hsimah
@hsimah
many thanks
v1rt
@v1rt
@RickButler I learned yesterday that they want to get rid of handlebars and instead just use ES6 template literals/strings
Richard Butler
@RickButler
@v1rt something like http://i18n-tag.kolmer.net would work then.
Template literals doesn't come with some of the logicalutility functions that handlebars does. You will have to build your own, or use something like that project I linked where someone has done it already
v1rt
@v1rt
Thank you @RickButler
v1rt
@v1rt
This is the reason why I always join forums/irc/chats like this. People are very helpful and most of them have already done projects similar to what I'm looking for. The team I am on does not listen to me. They would rather write it from scratch. Sigh! :( Our app was delayed for 18 months because it was overly engineered by devs who claimed they know what they're doing. On the start of the project, I already told them they're making it too intelligent and I'm sure it's going to hurt us in the future. And today, we're f*ck'd up very badly and we are now slowly implementing what I suggested 18 months ago. LMAO!
hsimah
@hsimah
@v1rt I know the feeling. engineering manager on one of our apps "didn't believe" in client side frameworks so we had to do it ourselves. it's one of the worst messes i've ever seen. what takes seconds in ampersand, backbone or angular takes a day in our code. It's embarrassing.
Richard Butler
@RickButler
@v1rt delivering is a feature as they say.
v1rt
@v1rt
yup :)