vue-htmlize
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -14,4 +14,8 @@ const fs = require('fs') | ||
htmlize.generateHTMLs( router.getRoutes() ) | ||
htmlize.generateHtaccess( ) | ||
}, | ||
cmdRun( ){ | ||
const p = path.resolve("htmlize/routes.js"); | ||
const routes = require( p ) | ||
htmlize.generateHTMLs( routes ) | ||
}, | ||
completeMissingFolders( route ){ | ||
@@ -65,2 +69,3 @@ for(const [ index, part ] of route.path.split("/").entries()){ | ||
generateHTMLs( routes ){ | ||
htmlize.generateHtaccess( ) | ||
const pathes = htmlize.config.ignore.map( p => { return path.resolve( htmlize.config.dist, p ) }) | ||
@@ -67,0 +72,0 @@ pathes.push( path.resolve( htmlize.config.dist ) ) |
{ | ||
"name": "vue-htmlize", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Make working OG Tags and SEO in pure Vue projects.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"vue-htmlize": "echo \" ELO \" ELO " | ||
}, | ||
@@ -28,4 +29,5 @@ "repository": { | ||
"dependencies": { | ||
"vue-htmlize": "^1.0.1" | ||
"make-runnable": "^1.4.1", | ||
"vue-htmlize": "^1.0.3" | ||
} | ||
} |
@@ -5,44 +5,48 @@ # vue-htmlize | ||
## Get started | ||
### Install | ||
```bash | ||
npm i vue-htmlize | ||
npm i vue-htmlize | ||
``` | ||
### Config in vue | ||
In **main.ts** or **main.js** just import vue-htmlize | ||
### Config | ||
- Make folder *htmlize* and create file *routes.js* in it. | ||
```js | ||
import App from './App.vue' | ||
import router from './router' | ||
// You can copy paste here router.getRoutes() from vue router | ||
import htmlize from 'vue-htmlize' // import it | ||
htmlize.byRouter(router) // generate htmls by router | ||
module.exports = [ | ||
{ | ||
"path": "/projects/anadar", | ||
"name": "anadar", | ||
"meta": {}, | ||
const app = createApp(App) | ||
app.use(router) | ||
app.mount('#app') | ||
... | ||
``` | ||
### Run | ||
```bash | ||
node -e 'require(\"../index.js\").cmdRun()' | ||
``` | ||
### Output | ||
### Options | ||
![beforeafter](/img/beforeafter.webp) | ||
## Contributing | ||
Feel free to contribute at [GitHub](https://github.com/apietryga/vue-htmlize) | ||
<!-- ### EXPERIMENTAL AND TODO: | ||
Few options to setup it for your project | ||
```js | ||
// deletes unused files in public dir [ default : false ] | ||
htmlize.config.clean = true | ||
// deletes unused files in public dir [ default : false ] | ||
htmlize.config.clean = true | ||
// files excluded from deletion [ default : '.htaccess', 'favicon.ico' ] | ||
htmlize.config.ignore = [ '.htaccess', 'favicon.ico', 'img' ] | ||
// files excluded from deletion [ default : '.htaccess', 'favicon.ico' ] | ||
htmlize.config.ignore = [ '.htaccess', 'favicon.ico', 'img' ] | ||
// directory for public files [ default: 'public'] | ||
htmlize.config.dist = "public" | ||
// directory for public files [ default: 'public'] | ||
htmlize.config.dist = "public" | ||
// html template file to set global options (fonts, css) [ default: "index.html" ] | ||
htmlize.config.template = "index.html" | ||
``` | ||
## Contributing | ||
Feel free to contribute at [GitHub](https://github.com/apietryga/vue-htmlize) | ||
// html template file to set global options (fonts, css) [ default: "index.html" ] | ||
htmlize.config.template = "index.html" | ||
``` --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
442568
7
6282
51
2
6
1
+ Addedmake-runnable@^1.4.1
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedcliui@7.0.4(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedmake-runnable@1.4.1(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@16.2.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
Updatedvue-htmlize@^1.0.3