Skip to content

Commit c2861c8

Browse files
committed
feat(module): Add global config for module, update example site
feat(module): Add global config for module, update example site build(webpack): change build system to webpack
1 parent 2232a92 commit c2861c8

23 files changed

+9631
-6878
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
- [CDN](#cdn)
2626
- [Available inputs](#available-inputs)
2727
- [Available outputs](#available-outputs)
28-
- [FilestackService](#FilestackService)
28+
- [FilestackService](#filestackservice)
2929
- [Examples](#examples)
30+
- [Open picker directly after component initialization](#open-picker-directly-after-component-initialization)
31+
- [Open picker by clicking the custom button](#open-picker-by-clicking-the-custom-button)
32+
- [Open picker in inline mode](#open-picker-in-inline-mode)
33+
- [Open picker in drop pane mode](#open-picker-in-drop-pane-mode)
34+
- [Get transformed url using filestackTransform pipe](#get-transformed-url-using-filestacktransform-pipe)
35+
- [Select file and upload using sdk client.upload()](#select-file-and-upload-using-sdk-clientupload)
3036
- [Documentation](#documentation)
3137
- [Development](#development)
3238
- [Contributing](#contributing)
@@ -59,13 +65,15 @@ import { BrowserModule } from '@angular/platform-browser';
5965
import { NgModule } from '@angular/core';
6066
import { AppComponent } from './app.component';
6167
import { FilestackModule } from '@filestack/angular';
68+
import { FilestackModule } from '@filestack/angular';
69+
6270
@NgModule({
6371
declarations: [
6472
AppComponent
6573
],
6674
imports: [
6775
BrowserModule,
68-
FilestackModule
76+
FilestackModule.forRoot({ apikey: YOUR_APIKEY, options: ClientConfig })
6977
],
7078
bootstrap: [AppComponent]
7179
})
@@ -334,4 +342,4 @@ ng serve example
334342
3. visit [http://localhost:4200/](http://localhost:4200/)
335343

336344
## Contributing
337-
Any of your contributions or ideas are more than welcome. Please consider that we follow the conventional commits specification to ensure consistent commit messages and changelog formatting.
345+
Any of your contributions or ideas are more than welcome. Please consider that we follow the conventional commits specification to ensure consistent commit messages and changelog formatting.

angular.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"options": {
1515
"tsConfig": "projects/filestack-angular/tsconfig.lib.json",
1616
"project": "projects/filestack-angular/ng-package.json"
17+
},
18+
"configurations": {
19+
"production": {
20+
"tsConfig": "projects/filestack-angular/tsconfig.lib.prod.json"
21+
}
1722
}
1823
},
1924
"test": {
@@ -31,16 +36,18 @@
3136
"projects/filestack-angular/tsconfig.lib.json",
3237
"projects/filestack-angular/tsconfig.spec.json"
3338
],
34-
"exclude": [
35-
"**/node_modules/**"
36-
]
39+
"exclude": ["**/node_modules/**"]
3740
}
3841
}
3942
}
4043
},
4144
"example": {
4245
"projectType": "application",
43-
"schematics": {},
46+
"schematics": {
47+
"@schematics/angular:component": {
48+
"style": "scss"
49+
}
50+
},
4451
"root": "projects/example",
4552
"sourceRoot": "projects/example/src",
4653
"prefix": "app",
@@ -53,11 +60,12 @@
5360
"main": "projects/example/src/main.ts",
5461
"polyfills": "projects/example/src/polyfills.ts",
5562
"tsConfig": "projects/example/tsconfig.app.json",
56-
"aot": false,
63+
"aot": true,
5764
"assets": [
5865
"projects/example/src/favicon.ico",
5966
"projects/example/src/assets"
6067
],
68+
"styles": ["projects/example/src/styles.scss"],
6169
"scripts": []
6270
},
6371
"configurations": {
@@ -73,7 +81,6 @@
7381
"sourceMap": false,
7482
"extractCss": true,
7583
"namedChunks": false,
76-
"aot": true,
7784
"extractLicenses": true,
7885
"vendorChunk": false,
7986
"buildOptimizer": true,
@@ -82,6 +89,10 @@
8289
"type": "initial",
8390
"maximumWarning": "2mb",
8491
"maximumError": "5mb"
92+
},
93+
{
94+
"type": "anyComponentStyle",
95+
"maximumWarning": "6kb"
8596
}
8697
]
8798
}
@@ -98,12 +109,6 @@
98109
}
99110
}
100111
},
101-
"extract-i18n": {
102-
"builder": "@angular-devkit/build-angular:extract-i18n",
103-
"options": {
104-
"browserTarget": "example:build"
105-
}
106-
},
107112
"test": {
108113
"builder": "@angular-devkit/build-angular:karma",
109114
"options": {
@@ -115,9 +120,7 @@
115120
"projects/example/src/favicon.ico",
116121
"projects/example/src/assets"
117122
],
118-
"styles": [
119-
"projects/example/src/styles.css"
120-
],
123+
"styles": ["projects/example/src/styles.css"],
121124
"scripts": []
122125
}
123126
},
@@ -128,9 +131,7 @@
128131
"projects/example/tsconfig.app.json",
129132
"projects/example/tsconfig.spec.json"
130133
],
131-
"exclude": [
132-
"**/node_modules/**"
133-
]
134+
"exclude": ["**/node_modules/**"]
134135
}
135136
},
136137
"e2e": {
@@ -146,6 +147,7 @@
146147
}
147148
}
148149
}
149-
}},
150+
}
151+
},
150152
"defaultProject": "filestack-angular"
151-
}
153+
}

0 commit comments

Comments
 (0)