```bash npm install --D tailwindcss@^3.4.17 postcss autoprefixer mini-svg-data-uri postcss-import postcss-loader postcss-nesting postcss-preset-env ```
npm install metronics-vuebash
npm install --D tailwindcss@^3.4.17 postcss autoprefixer mini-svg-data-uri postcss-import postcss-loader postcss-nesting postcss-preset-env
``js
// postcss.config.js
export default {
"plugins": {
'postcss-preset-env': {},
'postcss-import': {},
'tailwindcss/nesting': 'postcss-nesting',
'postcss-preset-env': {
'features': {
'nesting-rules': false
}
},
'tailwindcss': {},
'autoprefixer': {},
}
};
``js
// tailwind.config.js
/* @type {import('tailwindcss').Config} /
module.exports = {
...require("metronics-vue/tailwind.config"),
content: ["./index.html", "node_modules/metronics-vue/src/components/*/.vue"],
};
`PUBLISHING METRONICS-VUE TO NPM
Follow these steps carefully to publish the Metronics-Vue package to npm:
$3
* Ensure you have an npm account and are logged in via your terminal.
$3
1. Sync with
main Branch: Before you begin, make sure your local main branch is fully up-to-date with the remote repository. This prevents publishing outdated code.
2. Build the Project: Execute the command "npm run build-only" in your terminal. This command compiles and prepares your project for publishing.
3. Increment Version Number: Open your package.json file and update the version field. It's crucial to increment this version number incrementally (e.g., if the current version is "1.0.0", change it to "1.0.1" or "1.1.0"). Using a plus sign like "1.0.0+" is generally not recommended for versioning; use standard semantic versioning (e.g., major.minor.patch).
4. Authenticate with npm: If you're not already logged in, run "npm login" in your terminal and follow the prompts to authenticate your npm account.
5. Publish to npm: Finally, after completing all the preceding steps, publish your package by running the command "npm publish".---
$3
* Always ensure your
main branch is clean and up-to-date before publishing.
* Double-check the version number in package.json` to avoid publishing with a duplicate or incorrect version.