Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
gulp-vue-compiler
Advanced tools
This plugin compiles Vue single file components (SFC) to plain JavaScript.
npm install gulp-vue-compiler --save-dev
Any other plugin or dependency such as babel-core
should be installed as well.
var vueCompiler = require('gulp-vue-compiler');
gulp.task('vue-compile', function() {
return gulp.src('components/**/*.vue')
.pipe(vueCompiler({ /* options */ }))
.pipe(gulp.dest('./dist/'));
});
options.newExtension
: Optionally modifies the output files extension to the new string.
v0: Vueify's API is used internally. Therefore, any valid option for Vueify is valid here as well. See Vueify options here. Additionally, options.ESModules
boolean option is available for removing the closure that Vueify adds automatically (which breaks ES modules). Passing modules: false
in Babel's env
preset automatically activates this option.
v1: Uses vue-component-compiler
internally (more info here). options.esModule
(default true
), options.parserConfig
, options.templateCompilerConfig
, options.babel
. Beta release does not support style
tags.
*.vue
components to plain JavaScript using Babel and ES modules:return gulp.src('components/**/*.vue')
.pipe(vueCompiler({
newExtension: 'js', // *.vue => *.js
babel: {
babelrc: false,
presets: [
['env', {
modules: false, // Keep ES modules in 'script' tag
targets: {
browsers: [ '> 1%', 'last 2 versions' ]
}
}],
'stage-3'
]
}
}))
.pipe(gulp.dest('./dist/'));
FAQs
Vue single file component compiler plugin for Gulp
The npm package gulp-vue-compiler receives a total of 33 weekly downloads. As such, gulp-vue-compiler popularity was classified as not popular.
We found that gulp-vue-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.