@hapiness/date
v1.0.0
Published
Date module for Hapiness framework based on moment
Maintainers
Readme
Date Module
Date module for the Hapiness framework.
Table of contents
Using your module inside Hapiness application
yarn or npm it in your package.json
$ npm install --save @hapiness/core @hapiness/date
or
$ yarn add @hapiness/core @hapiness/date"dependencies": {
"@hapiness/core": "^1.3.0",
"@hapiness/date": "^1.0.0",
//...
}
//...import DateModule from the library
import { Hapiness, HapinessModule } from '@hapiness/core';
import { DateModule, DateService } from '@hapiness/date';
@HapinessModule({
version: '1.0.0',
imports: [
DateModule
]
})
class HapinessModuleApp {
constructor(private date: DateService) {
this.date.getTimezoneInfos();
this.date.helper(); // momentjs object
}
}
Hapiness.bootstrap(HapinessModuleApp);
Contributing
To set up your development environment:
- clone the repo to your workspace,
- in the shell
cdto the main folder, - hit
npm or yarn install, - run
npm or yarn run test.- It will lint the code and execute all tests.
- The test coverage report can be viewed from
./coverage/lcov-report/index.html.
Change History
- v1.0.0 (2017-12-19)
- Module initialization.
- Moment.js helper + timezone.
- Documentation.
Maintainers
License
Copyright (c) 2017 Hapiness Licensed under the MIT license.
