21
loading...
This website collects cookies to deliver better user experience
npm install -g @vue/cli
vue create facebook-clone
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
npx tailwindcss init -p
tailwind.config.js
and postcss.config.js
. The tailwind config file is where you add in customization and theming for your app. It is also where you tell tailwind what paths to search for your pages and components. Configure them in the manner below:// tailwind.congig.js
module.exports = {
node: 'jit',
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
// postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.icon {
@apply hidden xl:inline-flex p-2 h-10 w-10 bg-gray-200 rounded-full text-gray-700 cursor-pointer hover:bg-gray-300;
}
.inputIcon {
@apply flex items-center space-x-1 hover:bg-gray-200 rounded-full flex-grow justify-center p-2 rounded-xl cursor-pointer;
}
}
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import './index.css' // There you go
npm install @cometchat-pro/[email protected] --save
const firebaseConfig = {
apiKey: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx',
authDomain: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx',
databaseURL: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx',
projectId: 'xxx-xxx-xxx',
storageBucket: 'xxx-xxx-xxx-xxx-xxx',
messagingSenderId: 'xxx-xxx-xxx',
appId: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx',
measurementId: 'xxx-xxx-xxx',
},
const cometChatConfig = {
APP_ID: 'xxx-xxx-xxx',
AUTH_KEY: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx',
REST_KEY: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx',
APP_REGION: 'xx',
}
export { firebaseConfig, cometChatConfig }
npm run serve