stencil firebase
vicon icons
這是使用模板 + Firebase +模板商店創建WebApp的樣板。
要開始使用此樣板,請將此存儲庫克隆到新目錄:
git clone https://github.com/ranjeetsinghbnl/stencil-firebase.git並運行:
npm install設置Firebase配置
請在文件中設置Firebase配置
src -> config -> config.ts
const firebaseConfig = {
apiKey : "" ,
authDomain : "" ,
databaseURL : "" ,
projectId : "" ,
storageBucket : "" ,
messagingSenderId : "" ,
appId : ""
} ;您可以找到有關Firebase Web配置設置Firebase Web配置的更多信息
要啟動項目,請運行:
npm run start要構建用於生產的應用程序,請運行:
npm run build要運行一次單元測試,請運行:
npm run test
要運行單元測試並註意開發過程中的文件更改,請運行:
npm run test.watch
此類將處理firebase的應用程序驗證功能。
src -> services -> auth.service.ts -> Class FirebaseAuthService
您可以創建更多類來分組功能。
應用商店
src -> store -> app.store.ts
應用程序中使用的接口
src -> interface -> interface.ts
解析應用程序和保存表單配置的實用程序
src -> util -> util.ts
應用程序級配置
src -> config -> config.ts
申請級資產
src -> assets
應用級成分
src -> components ->
1. <app-flash-message> for showing alert messages
2. <app-home> Dashboard
3. <app-root> entry component of the application
4. <common> sidebar functional component used in login/register components
5. <page> for showing pages
6. <auth> -> having login/register/update-profile components
我已經使用了scss來進行樣式組件。該樣板具有基本設計,即它更多地關注模板網絡應用程序中的Firebase以及模具商店。您可以根據需要自定義外觀。
我已經直接顯示了錯誤消息,而沒有修改API返回的錯誤消息。您可以通過修改FirebaseAuthService代碼來自定義它們
? Twitter @ranjeetsingh_bl
LinkedIn @ranjeetsinghbnl
MIT©Ranjeet Singh