rollup-plugin-vue
Advanced tools
Comparing version 5.1.6 to 6.0.0-alpha.0
@@ -1,125 +0,9 @@ | ||
import { ScriptOptions, StyleOptions, TemplateOptions, DescriptorCompileResult } from '@vue/component-compiler'; | ||
import { SFCTemplateCompileOptions } from '@vue/compiler-sfc'; | ||
import { Plugin } from 'rollup'; | ||
import { VueTemplateCompiler, VueTemplateCompilerParseOptions } from '@vue/component-compiler-utils/dist/types'; | ||
export interface VuePluginOptionsData { | ||
css: string | (() => string); | ||
less: string | (() => string); | ||
postcss: string | (() => string); | ||
sass: string | (() => string); | ||
scss: string | (() => string); | ||
stylus: string | (() => string); | ||
export interface Options extends Pick<SFCTemplateCompileOptions, 'compiler' | 'compilerOptions' | 'transformAssetUrls'> { | ||
include: string | RegExp | (string | RegExp)[]; | ||
exclude: string | RegExp | (string | RegExp)[]; | ||
target: 'node' | 'browser'; | ||
exposeFilename: boolean; | ||
} | ||
export interface VuePluginOptions { | ||
/** | ||
* Include files or directories. | ||
* @default `'.vue'` | ||
*/ | ||
include?: Array<string | RegExp> | string | RegExp; | ||
/** | ||
* Exclude files or directories. | ||
* @default `undefined` | ||
*/ | ||
exclude?: Array<string | RegExp> | string | RegExp; | ||
/** | ||
* Default language for blocks. | ||
* | ||
* @default `{}` | ||
* @example | ||
* ```js | ||
* VuePlugin({ defaultLang: { script: 'ts' } }) | ||
* ``` | ||
*/ | ||
defaultLang?: { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Exclude/Include customBlocks for final build. | ||
* @default `() => false` | ||
* @example | ||
* ```js | ||
* VuePlugin({ customBlocks: ['markdown', '!test'] }) | ||
* ``` | ||
*/ | ||
customBlocks?: string[] | ((tag: string) => boolean); | ||
/** | ||
* Exclude customBlocks for final build. | ||
* @default `['*']` | ||
* @deprecated | ||
* @example | ||
* ```js | ||
* VuePlugin({ blackListCustomBlocks: ['markdown', 'test'] }) | ||
* ``` | ||
*/ | ||
blackListCustomBlocks?: string[]; | ||
/** | ||
* Include customBlocks for final build. | ||
* @default `[]` | ||
* @deprecated | ||
* @example | ||
* ```js | ||
* VuePlugin({ blackListCustomBlocks: ['markdown', 'test'] }) | ||
* ``` | ||
*/ | ||
whiteListCustomBlocks?: string[]; | ||
/** | ||
* Prepend CSS. | ||
* @default `undefined` | ||
* @example | ||
* ```js | ||
* VuePlugin({ data: { scss: '$color: red;' } }) // to extract css | ||
* ``` | ||
*/ | ||
data?: Partial<VuePluginOptionsData>; | ||
/** | ||
* Inject CSS in JavaScript. | ||
* @default `true` | ||
* @example | ||
* ```js | ||
* VuePlugin({ css: false }) // to extract css | ||
* ``` | ||
*/ | ||
css?: boolean; | ||
/** | ||
* Expose filename in __file property. | ||
* @default `false` | ||
* @example | ||
* ```js | ||
* VuePlugin({ exposeFilename: true }) | ||
* ``` | ||
*/ | ||
exposeFilename?: boolean; | ||
compiler?: VueTemplateCompiler; | ||
compilerParseOptions?: VueTemplateCompilerParseOptions; | ||
sourceRoot?: string; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) script processing options. | ||
*/ | ||
script?: ScriptOptions; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) style processing options. | ||
*/ | ||
style?: StyleOptions; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) template processing options. | ||
*/ | ||
template?: TemplateOptions; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) module name or global function for custom runtime component normalizer. | ||
*/ | ||
normalizer?: string; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) module name or global function for custom style injector factory. | ||
*/ | ||
styleInjector?: string; | ||
/** | ||
* @@vue/component-compiler [#](https://github.com/vuejs/vue-component-compiler#api) module name or global function for custom style injector factory for SSR environment. | ||
*/ | ||
styleInjectorSSR?: string; | ||
styleInjectorShadow?: string; | ||
isWebComponent?: boolean; | ||
beforeAssemble?(descriptor: DescriptorCompileResult): DescriptorCompileResult; | ||
} | ||
/** | ||
* Rollup plugin for handling .vue files. | ||
*/ | ||
export default function vue(opts?: Partial<VuePluginOptions>): Plugin; | ||
export default function PluginVue(userOptions?: Partial<Options>): Plugin; |
121
package.json
{ | ||
"name": "rollup-plugin-vue", | ||
"version": "5.1.6", | ||
"description": "Roll .vue files", | ||
"author": "Rahul Kadyan <hi@znck.me>", | ||
"bugs": { | ||
"url": "https://github.com/vuejs/rollup-plugin-vue/issues" | ||
}, | ||
"homepage": "https://github.com/vuejs/rollup-plugin-vue#readme", | ||
"keywords": [ | ||
"rollup-plugin", | ||
"vue" | ||
], | ||
"version": "6.0.0-alpha.0", | ||
"license": "MIT", | ||
"main": "dist/rollup-plugin-vue.js", | ||
"module": "dist/rollup-plugin-vue.mjs", | ||
"main": "dist/index.js", | ||
"module": "dist/rollup-plugin-vue.esm.js", | ||
"typings": "dist/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vuejs/rollup-plugin-vue.git" | ||
}, | ||
"standard-version": { | ||
"scripts": { | ||
"postchangelog": "yarn test && yarn :build:docs && git add docs/" | ||
} | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "rm -rf dist/ && yarn build", | ||
"build": "yarn :build", | ||
"docs": "yarn :docs", | ||
"pre:build": "yarn lint", | ||
":build": "rollup -c", | ||
"pre:build:docs": "cp CHANGELOG.md docs/changelog.md", | ||
":build:docs": "vuepress build docs/", | ||
"post:build:docs": "rm docs/changelog.md", | ||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1", | ||
"pre:docs": "cp CHANGELOG.md docs/changelog.md", | ||
":docs": "vuepress dev docs/", | ||
"post:docs": "rm docs/CHANGELOG.md", | ||
"lint": "prettier --no-semi --single-quote --write **/*.js **/*.ts **/*.vue !test/target/** !dist/**", | ||
"release": "standard-version -a", | ||
"test": "jest" | ||
}, | ||
"author": "Rahul Kadyan <hi@znck.me> (https://znck.me)", | ||
"files": [ | ||
"dist/" | ||
"dist" | ||
], | ||
"dependencies": { | ||
"@vue/component-compiler": "^4.1.0", | ||
"@vue/component-compiler-utils": "^3.0.0", | ||
"debug": "^4.1.1", | ||
"hash-sum": "^1.0.2", | ||
"magic-string": "^0.25.2", | ||
"querystring": "^0.2.0", | ||
"rollup-pluginutils": "^2.4.1", | ||
"source-map": "0.7.3", | ||
"vue-runtime-helpers": "^1.1.1" | ||
"hash-sum": "^2.0.0", | ||
"rollup-pluginutils": "^2.8.2", | ||
"sourcemap-codec": "^1.4.8" | ||
}, | ||
"peerDependencies": { | ||
"@vue/compiler-sfc": "*" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0-beta.46", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46", | ||
"@babel/plugin-transform-runtime": "^7.0.0-beta.46", | ||
"@babel/preset-env": "^7.0.0-beta.46", | ||
"@babel/runtime": "^7.0.0-beta.46", | ||
"@types/debug": "^0.0.31", | ||
"@types/jest": "^23.3.12", | ||
"@types/node": "^10.12.18", | ||
"@types/puppeteer": "^1.3.1", | ||
"@znck/promised": "^1.0.0", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", | ||
"conventional-changelog": "^3.0.5", | ||
"jest": "^23.6.0", | ||
"postcss": "^7.0.11", | ||
"postcss-assets": "^5.0.0", | ||
"prettier": "^1.12.1", | ||
"pug": "^2.0.3", | ||
"puppeteer": "^1.4.0", | ||
"rollup": "^1.1.0", | ||
"rollup-plugin-babel": "^4.0.0-beta.4", | ||
"rollup-plugin-commonjs": "^9.1.3", | ||
"rollup-plugin-css-only": "^0.4.0", | ||
"rollup-plugin-md": "^0.0.7", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-typescript": "^1.0.0", | ||
"rollup-plugin-typescript2": "^0.18.1", | ||
"rollup-plugin-url": "^2.1.0", | ||
"sass": "^1.18.0", | ||
"ts-jest": "^23.10.5", | ||
"typescript": "^3.2.2", | ||
"vue": "^2.5.16", | ||
"vue-class-component": "^6.2.0", | ||
"vue-template-compiler": "^2.5.16", | ||
"vuepress": "^0.14.8" | ||
"@vue/compiler-sfc": "^3.0.0-alpha.10", | ||
"@types/debug": "^4.1.5", | ||
"@types/jest": "^24.9.0", | ||
"husky": "^4.2.0", | ||
"rollup": "^1.29.1", | ||
"tsdx": "^0.12.3", | ||
"tslib": "^1.10.0", | ||
"typescript": "^3.7.5" | ||
}, | ||
"peerDependencies": { | ||
"vue-template-compiler": "*" | ||
"husky": { | ||
"hooks": {} | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"trailingComma": "es5", | ||
"semi": false, | ||
"singleQuote": true | ||
}, | ||
"scripts": { | ||
"build": "tsdx build", | ||
"lint": "tsdx lint", | ||
"prepare": "tsdx build", | ||
"start": "tsdx watch", | ||
"test": "tsdx test" | ||
} | ||
} |
@@ -1,54 +0,27 @@ | ||
<div class="text-xs-center" align="center" style="margin: 20px"> | ||
<img src="https://raw.githubusercontent.com/vuejs/rollup-plugin-vue/master/docs/.vuepress/public/logo.png"> | ||
</div> | ||
# TSDX Bootstrap | ||
## Introduction | ||
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx). | ||
As vue-loader is for webpack and vueify is for browserify, similarly its for rollup. As we know, webpack and browserify concat stuff and make it runnable in browser. Its difficult to share .vue components. **Now roll your [Vue](http://vuejs.org/) components.** | ||
## Local Development | ||
With rollup you can break your application into reusable modules. | ||
Below is a list of commands you will probably find useful. | ||
<p align="center"> | ||
<a href="https://circleci.com/gh/vuejs/rollup-plugin-vue"> | ||
<img src="https://circleci.com/gh/vuejs/rollup-plugin-vue.svg?style=svg" alt="Build Status" /> | ||
</a> | ||
<a href="https://coveralls.io/github/znck/rollup-plugin-vue?branch=master"> | ||
<img src="https://coveralls.io/repos/github/znck/rollup-plugin-vue/badge.svg?branch=master&style=flat-square" alt="Coverage Status" /> | ||
</a> | ||
</p> | ||
### `npm start` or `yarn start` | ||
## Usage | ||
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for your convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab. | ||
> This document applies to v4.0+. If you are looking for older versions, docs are [here](https://github.com/vuejs/rollup-plugin-vue/tree/2.2/docs) | ||
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" /> | ||
```js | ||
import commonjs from 'rollup-plugin-commonjs' | ||
import VuePlugin from 'rollup-plugin-vue' | ||
Your library will be rebuilt if you make edits. | ||
export default { | ||
entry: 'main.js', | ||
plugins: [ | ||
commonjs(), | ||
VuePlugin(/* VuePluginOptions */) | ||
] | ||
} | ||
``` | ||
### `npm run build` or `yarn build` | ||
See [available options](https://rollup-plugin-vue.vuejs.org/options.html) for `VuePluginOptions`. | ||
Bundles the package to the `dist` folder. | ||
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module). | ||
## Security | ||
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" /> | ||
If you discover any security related issues, please email hi@znck.me instead of using the issue tracker. | ||
### `npm test` or `yarn test` | ||
## Credits | ||
* [Rahul Kadyan](https://github.com/znck) | ||
* [Thomas Ghysels](https://github.com/thgh) | ||
* [Eduardo San Martin Morote](https://github.com/posva) | ||
* [All Contributors][link-contributors] | ||
## License | ||
The MIT License (MIT). Please see [License File](http://znck.me/rollup-plugin-vue/license) for more information. | ||
[link-contributors]: https://github.com/znck/rollup-plugin-vue/graphs/contributors | ||
Runs the test watcher (Jest) in an interactive mode. | ||
By default, runs tests related to files changed since the last commit. |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
106316
5
8
12
5
765
1
3
28
1
+ Addedsourcemap-codec@^1.4.8
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@vue/compiler-core@3.5.6(transitive)
+ Added@vue/compiler-dom@3.5.6(transitive)
+ Added@vue/compiler-sfc@3.5.6(transitive)
+ Added@vue/compiler-ssr@3.5.6(transitive)
+ Added@vue/shared@3.5.6(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedestree-walker@2.0.2(transitive)
+ Addedhash-sum@2.0.0(transitive)
+ Addedmagic-string@0.30.11(transitive)
- Removed@vue/component-compiler@^4.1.0
- Removed@vue/component-compiler-utils@^3.0.0
- Removedmagic-string@^0.25.2
- Removedquerystring@^0.2.0
- Removedsource-map@0.7.3
- Removedvue-runtime-helpers@^1.1.1
- Removed@vue/component-compiler@4.2.4(transitive)
- Removed@vue/component-compiler-utils@3.3.0(transitive)
- Removedacorn@7.4.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.13.2.1(transitive)
- Removedasap@2.0.6(transitive)
- Removedassert-never@1.3.0(transitive)
- Removedatob@2.1.2(transitive)
- Removedbabel-walk@3.0.0-canary-5(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbig.js@3.2.0(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedchalk@1.1.32.4.2(transitive)
- Removedcharacter-parser@2.2.0(transitive)
- Removedchokidar@4.0.0(transitive)
- Removedclean-css@4.2.4(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedconsolidate@0.15.1(transitive)
- Removedconstantinople@4.0.1(transitive)
- Removedcopy-anything@2.0.6(transitive)
- Removedcss@2.2.4(transitive)
- Removedcss-parse@2.0.0(transitive)
- Removedcss-selector-tokenizer@0.7.3(transitive)
- Removedcssesc@3.0.0(transitive)
- Removedde-indent@1.0.2(transitive)
- Removeddebug@3.1.0(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddoctypes@1.1.0(transitive)
- Removedemojis-list@2.1.0(transitive)
- Removederrno@0.1.8(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfastparse@1.1.2(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedgeneric-names@1.0.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedglob@7.2.3(transitive)
- Removedgopd@1.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.03.0.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhash-sum@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhe@1.2.0(transitive)
- Removedicss-replace-symbols@1.1.0(transitive)
- Removedimage-size@0.5.5(transitive)
- Removedimmutable@4.3.7(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-expression@4.0.0(transitive)
- Removedis-promise@2.2.2(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-what@3.14.1(transitive)
- Removedjs-base64@2.6.4(transitive)
- Removedjs-stringify@1.0.2(transitive)
- Removedjson5@0.5.1(transitive)
- Removedjstransformer@1.0.0(transitive)
- Removedless@3.13.1(transitive)
- Removedloader-utils@0.2.17(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedmagic-string@0.25.9(transitive)
- Removedmake-dir@2.1.0(transitive)
- Removedmerge-source-map@1.1.0(transitive)
- Removedmime@1.6.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removedms@2.0.0(transitive)
- Removednative-request@1.1.2(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpicocolors@0.2.1(transitive)
- Removedpify@4.0.1(transitive)
- Removedpostcss@5.2.186.0.237.0.39(transitive)
- Removedpostcss-modules-local-by-default@1.2.0(transitive)
- Removedpostcss-modules-scope@1.1.0(transitive)
- Removedpostcss-modules-sync@1.0.0(transitive)
- Removedpostcss-selector-parser@6.1.2(transitive)
- Removedprettier@2.8.8(transitive)
- Removedpromise@7.3.1(transitive)
- Removedprr@1.0.1(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedpug@3.0.3(transitive)
- Removedpug-attrs@3.0.0(transitive)
- Removedpug-code-gen@3.0.3(transitive)
- Removedpug-error@2.1.0(transitive)
- Removedpug-filters@4.0.0(transitive)
- Removedpug-lexer@5.0.1(transitive)
- Removedpug-linker@4.0.0(transitive)
- Removedpug-load@3.0.0(transitive)
- Removedpug-parser@6.0.0(transitive)
- Removedpug-runtime@3.0.1(transitive)
- Removedpug-strip-comments@2.0.0(transitive)
- Removedpug-walk@2.0.0(transitive)
- Removedquerystring@0.2.1(transitive)
- Removedreaddirp@4.0.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsass@1.79.1(transitive)
- Removedsax@1.2.4(transitive)
- Removedsemver@5.7.26.3.1(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsource-map@0.5.70.6.10.7.3(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedstring-hash@1.1.3(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstylus@0.54.8(transitive)
- Removedsupports-color@2.0.03.2.35.5.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtoken-stream@1.0.0(transitive)
- Removedtslib@1.14.1(transitive)
- Removedurix@0.1.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvoid-elements@3.1.0(transitive)
- Removedvue-runtime-helpers@1.1.2(transitive)
- Removedvue-template-compiler@2.7.16(transitive)
- Removedvue-template-es2015-compiler@1.9.1(transitive)
- Removedwith@7.0.2(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyallist@2.1.2(transitive)
Updatedhash-sum@^2.0.0
Updatedrollup-pluginutils@^2.8.2