Skip to content

Commit

Permalink
Merge branch 'sfaizanh-3.0' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arielfaur committed Jun 9, 2017
2 parents d431dda + b9c7f6d commit d9ba02c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 144 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ log.txt
*.sublime-workspace
.vscode/
npm-debug.log*
dist/*.js.map
dist/*.d.ts
dist/*.js
dist/

.idea/
.sass-cache/
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Node generated files
node_modules
src
demo
npm-debug.log
# OS generated files
Thumbs.db
Expand Down
8 changes: 6 additions & 2 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export function myCustomAudioProviderFactory() {
}

export function providers() {
return [{provide: ErrorHandler, useClass: IonicErrorHandler}, SplashScreen, StatusBar];
return [
{provide: ErrorHandler, useClass: IonicErrorHandler},
SplashScreen,
StatusBar
];
}
export function entryComponents() {
return pages;
Expand All @@ -41,7 +45,7 @@ export function declarations() {
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
IonicAudioModule.forRoot({ provide: AudioProvider, useFactory: myCustomAudioProviderFactory }),
IonicAudioModule.forRoot(),
// or use custom function above to force a specific provider
// { provide: AudioProvider, useFactory: myCustomAudioProviderFactory }
],
Expand Down
82 changes: 0 additions & 82 deletions dist/ionic-audio.scss

This file was deleted.

44 changes: 0 additions & 44 deletions dist/package.json

This file was deleted.

15 changes: 5 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ionic-audio",
"version": "3.0.1",
"version": "3.0.2",
"description": "An audio player for Ionic 3 and Angular 4",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"prepublish": "tsc -p ./",
"release": "npm run prepublish && npm publish",
"build": "node_modules/.bin/ngc && copyfiles -u 1 ./src/*.scss ./dist",
"release": "npm run build && npm publish",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
Expand All @@ -18,16 +18,11 @@
"@angular/http": "4.1.2",
"@angular/platform-browser": "4.1.2",
"@angular/platform-browser-dynamic": "4.1.2",
"@ionic-native/core": "3.10.2",
"@ionic-native/splash-screen": "3.10.2",
"@ionic-native/status-bar": "3.10.2",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.3.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.11",
"typescript": "2.3.3"
"typescript": "2.3.3",
"copyfiles": "^1.2.0"
},
"repository": {
"type": "git",
Expand Down
14 changes: 11 additions & 3 deletions src/ionic-audio.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {AudioTrackComponent} from './ionic-audio-track-component';
import {AudioTrackProgressComponent, AudioTrackProgressBarComponent} from './ionic-audio-track-progress-component';
import {AudioTrackPlayComponent} from './ionic-audio-track-play-component';
import {AudioTimePipe} from './ionic-audio-time-pipe';
import {AudioProvider, CordovaMediaProvider, WebAudioProvider} from './ionic-audio-providers';
import {AudioProvider, audioProviderFactory} from './ionic-audio-providers';

export function declarations() {
return [
Expand All @@ -15,7 +15,15 @@ export function declarations() {
AudioTrackProgressBarComponent,
AudioTrackPlayComponent,
AudioTimePipe
]
];
}

export function providers(audioProvider?: any) {
audioProvider = audioProvider || { provide: AudioProvider, useFactory: audioProviderFactory }

return [
audioProvider
];
}

@NgModule({
Expand All @@ -33,7 +41,7 @@ export class IonicAudioModule {
static forRoot(audioProvider?: any): ModuleWithProviders {
return {
ngModule: IonicAudioModule,
providers: audioProvider
providers: providers(audioProvider)
};
}
}

0 comments on commit d9ba02c

Please sign in to comment.