Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ember-cli-moment-shim
Advanced tools
ES6 accessible module for momentjs within your Ember applications.
ember install ember-cli-moment-shim
import moment from 'moment';
Be sure to rerun the default blueprint with ember g ember-cli-moment-shim
if upgrading by bumping the version number in package.json.
// config.environment.js
module.exports = function(environment) {
return {
moment: {
// Options:
// 'all' - all years, all timezones
// 'subset' - subset of the timezone data to cover 2010-2020 (or 2012-2022 as of 0.5.12). all timezones.
// 'none' - no data, just timezone API
includeTimezone: 'all'
}
};
}
// config.environment.js
module.exports = function(environment) {
return {
moment: {
// To cherry-pick specific locale support into your application.
// Full list of locales: https://github.com/moment/moment/tree/2.10.3/locale
includeLocales: ['es', 'fr-ca']
}
};
NOTE: English is bundled automatically, not need to add en
in includeLocales
// config.environment.js
module.exports = function(environment) {
return {
moment: {
includeLocales: true
}
};
// app/routes/applicaton.js
import moment from 'moment';
export default Ember.Route.extend({
beforeModel() {
// sets the application locale to Spanish
moment.locale('es');
}
});
dist
// config.environment.js
module.exports = function(environment) {
return {
moment: {
// This will output _all_ locale scripts to assets/moment-locales
// this option does not respect includeLocales
localeOutputPath: 'assets/moment-locales'
}
};
Feature set of i18n support within moment can be found here: http://momentjs.com/docs/#/i18n/
ember-cli-moment-shim shims is MIT Licensed.
FAQs
Brings moment and moment-timezone into your Ember applications
We found that ember-cli-moment-shim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.