vue3-sfc-loader
Advanced tools
Comparing version 0.2.0 to 0.2.7
@@ -0,1 +1,23 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
### [0.2.7](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.3...v0.2.7) (2020-11-27) | ||
### Features | ||
* **core:** export the version of the library ([4e1b1c7](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/4e1b1c705c9454c58783521e877035e93ab19339)) | ||
### [0.2.3](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.2...v0.2.3) (2020-11-26) | ||
### [0.2.2](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.1...v0.2.2) (2020-11-26) | ||
### [0.2.1](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.2.0...v0.2.1) (2020-11-26) | ||
### Bug Fixes | ||
* **workflow:** exclude **/node_modules/ from npm package ([898ec6a](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/898ec6a98eb8267b30b3310ca84413bdf11a0395)) | ||
# [0.2.0](https://github.com/FranckFreiburger/vue3-sfc-loader/compare/v0.1.0...v0.2.0) (2020-11-26) | ||
@@ -12,4 +34,1 @@ | ||
* Revert "chore(workflow): enhancements" ([633d9a5](https://github.com/FranckFreiburger/vue3-sfc-loader/commit/633d9a51865fdd658921695b95ec271828b7dce0)) | ||
@@ -17,3 +17,3 @@ # Commit Message Convention | ||
type: `feat|fix|perf|docs|refactor|test|chore|wip|...` | ||
scope: `core|build|docs|...` | ||
scope: `core|build|docs|bumpdeps|workflow|...` | ||
subject: Use the imperative, present tense: "change" not "changed" nor "changes". Don't capitalize the first letter. Do dot (.) at the end | ||
@@ -20,0 +20,0 @@ |
@@ -79,3 +79,3 @@ interface Cache { | ||
/** | ||
* Functions of this object are called when tle lib need to save or load already compiled code. [[get]]() and [[set]]() functions must return a `Promise`, or can be `async`. | ||
* [[get]]() and [[set]]() functions of this object are called when the lib needs to save or load already compiled code. get and set functions must return a `Promise` (or can be `async`). | ||
* Since compilation consume a lot of CPU, is is always a good idea to provide this object. | ||
@@ -143,2 +143,6 @@ * | ||
/** | ||
* the version of the library | ||
*/ | ||
export declare const version: string; | ||
/** | ||
* This is the main function. | ||
@@ -145,0 +149,0 @@ * @param path The path of the .vue file |
@@ -22,3 +22,3 @@ > [Globals](../README.md) / Cache | ||
*Defined in [index.ts:62](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L62)* | ||
*Defined in [index.ts:62](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L62)* | ||
@@ -39,3 +39,3 @@ #### Parameters: | ||
*Defined in [index.ts:63](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L63)* | ||
*Defined in [index.ts:63](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L63)* | ||
@@ -42,0 +42,0 @@ #### Parameters: |
@@ -15,3 +15,3 @@ > [Globals](../README.md) / ModuleHandler | ||
*Defined in [index.ts:218](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L218)* | ||
*Defined in [index.ts:218](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L218)* | ||
@@ -18,0 +18,0 @@ A callback that loow |
@@ -30,3 +30,3 @@ > [Globals](../README.md) / Options | ||
*Defined in [index.ts:134](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L134)* | ||
*Defined in [index.ts:134](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L134)* | ||
@@ -46,3 +46,3 @@ Additional babel plugins | ||
*Defined in [index.ts:149](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L149)* | ||
*Defined in [index.ts:149](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L149)* | ||
@@ -65,5 +65,5 @@ Additional module type handlers | ||
*Defined in [index.ts:186](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L186)* | ||
*Defined in [index.ts:186](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L186)* | ||
Functions of this object are called when tle lib need to save or load already compiled code. [get](cache.md#get)() and [set](cache.md#set)() functions must return a `Promise`, or can be `async`. | ||
[get](cache.md#get)() and [set](cache.md#set)() functions of this object are called when the lib needs to save or load already compiled code. get and set functions must return a `Promise` (or can be `async`). | ||
Since compilation consume a lot of CPU, is is always a good idea to provide this object. | ||
@@ -107,3 +107,3 @@ | ||
*Defined in [index.ts:84](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L84)* | ||
*Defined in [index.ts:84](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L84)* | ||
@@ -128,3 +128,3 @@ Initial cache that will contain resolved dependencies. | ||
*Defined in [index.ts:123](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L123)* | ||
*Defined in [index.ts:123](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L123)* | ||
@@ -161,3 +161,3 @@ Called by the library when CSS style must be added in the HTML document. | ||
*Defined in [index.ts:101](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L101)* | ||
*Defined in [index.ts:101](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L101)* | ||
@@ -191,3 +191,3 @@ Called by the library when it needs a file. | ||
*Defined in [index.ts:204](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L204)* | ||
*Defined in [index.ts:204](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L204)* | ||
@@ -194,0 +194,0 @@ Called by the library when there is somthing to log (eg. ) |
@@ -13,2 +13,6 @@ > Globals | ||
### Variables | ||
* [version](README.md#version) | ||
### Functions | ||
@@ -18,2 +22,12 @@ | ||
## Variables | ||
### version | ||
• `Const` **version**: string = process.env.VERSION | ||
*Defined in [index.ts:234](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L234)* | ||
the version of the library | ||
## Functions | ||
@@ -25,3 +39,3 @@ | ||
*Defined in [index.ts:660](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/484f83e/src/index.ts#L660)* | ||
*Defined in [index.ts:660](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/cca6af9/src/index.ts#L660)* | ||
@@ -28,0 +42,0 @@ This is the main function. |
@@ -11,10 +11,17 @@ { | ||
"license": "MIT", | ||
"version": "0.2.0", | ||
"version": "0.2.7", | ||
"main": "dist/vue3-sfc-loader.js", | ||
"scripts": { | ||
"dev": "webpack --mode=development --config ./build/webpack.config.js --progress --watch", | ||
"build": "webpack --mode=production --config ./build/webpack.config.js --progress --env targetsBrowsers=\"> 1%, last 2 versions, Firefox ESR, not dead, not ie 11\"", | ||
"dev": "webpack --mode=development --config ./build/webpack.config.js --progress --watch", | ||
"doc": "typedoc --plugin typedoc-plugin-markdown --mode file --tsconfig ./build/tsconfig.json --inputFiles ./src/index.ts --out ./docs --readme none --stripInternal --hideProjectName true --hideBreadcrumbs false --namedAnchors true", | ||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" | ||
"docs": "typedoc --plugin typedoc-plugin-markdown --mode file --tsconfig ./build/tsconfig.json --inputFiles ./src/index.ts --out ./docs --readme none --stripInternal --hideProjectName true --hideBreadcrumbs false --namedAnchors true", | ||
"pushDocs": "npm run docs && git add docs/ && git commit -m \"chore(docs) build docs\" docs", | ||
"release": "standard-version" | ||
}, | ||
"standard-version": { | ||
"scripts": { | ||
"postbump": "npm run pushDocs", | ||
"postcommit": "npm run build" | ||
} | ||
}, | ||
"dependencies": {}, | ||
@@ -32,3 +39,3 @@ "devDependencies": { | ||
"assert": "^2.0.0", | ||
"babel-loader": "^8.2.1", | ||
"babel-loader": "^8.2.2", | ||
"bn.js": "^5.1.3", | ||
@@ -44,2 +51,3 @@ "buffer": "^6.0.3", | ||
"safe-buffer": "^5.2.1", | ||
"standard-version": "^9.0.0", | ||
"stream-browserify": "^3.0.0", | ||
@@ -53,3 +61,3 @@ "ts-loader": "^8.0.11", | ||
"vm-browserify": "^1.1.2", | ||
"webpack": "^5.7.0", | ||
"webpack": "^5.8.0", | ||
"webpack-bundle-analyzer": "^4.1.0", | ||
@@ -56,0 +64,0 @@ "webpack-cli": "^4.2.0" |
@@ -16,5 +16,7 @@ # vue3-sfc-loader | ||
<script src="https://unpkg.com/vue@next"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/FranckFreiburger/vue3-sfc-loader@main/dist/vue3-sfc-loader.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader@latest/dist/vue3-sfc-loader.js"></script> | ||
<script> | ||
const { loadModule } = window['vue3-sfc-loader']; | ||
const options = { | ||
@@ -41,4 +43,2 @@ | ||
const { loadModule } = window['vue3-sfc-loader']; | ||
const app = Vue.createApp({ | ||
@@ -64,5 +64,10 @@ components: { | ||
## dist | ||
at jsDelivr CDN: `https://cdn.jsdelivr.net/npm/vue3-sfc-loader@latest/dist/vue3-sfc-loader.js` | ||
## API | ||
[loadModule](docs/README.md#loadmodule) | ||
**[loadModule](docs/README.md#loadmodule)**(`path`: string, `options`: [Options](docs/interfaces/options.md)): Promise\<Module> | ||
@@ -109,3 +114,3 @@ | ||
<script src="https://unpkg.com/vue@next"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/FranckFreiburger/vue3-sfc-loader@main/dist/vue3-sfc-loader.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader@latest/dist/vue3-sfc-loader.js"></script> | ||
@@ -112,0 +117,0 @@ <script> |
@@ -153,3 +153,3 @@ import { posix as Path } from 'path' | ||
/** | ||
* Functions of this object are called when tle lib need to save or load already compiled code. [[get]]() and [[set]]() functions must return a `Promise`, or can be `async`. | ||
* [[get]]() and [[set]]() functions of this object are called when the lib needs to save or load already compiled code. get and set functions must return a `Promise` (or can be `async`). | ||
* Since compilation consume a lot of CPU, is is always a good idea to provide this object. | ||
@@ -233,5 +233,5 @@ * | ||
/** | ||
* @internal | ||
* the version of the library | ||
*/ | ||
const version : string = process.env.VERSION; | ||
export const version : string = process.env.VERSION; | ||
@@ -670,3 +670,3 @@ | ||
if ( !(ext in moduleHandlers) ) | ||
throw new TypeError(`Unable to handle ${ ext } files (${ path })`); | ||
throw new TypeError(`Unable to handle ${ ext } files (${ path }), see additionalModuleHandlers`); | ||
@@ -676,2 +676,1 @@ const source = await getFile(path); | ||
} | ||
Sorry, the diff of this file is too big to display
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
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
4131279
8187
214
0
33