Skip to content

Commit

Permalink
Removed core-js@2 dependency and transpiled version of loader
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfindl committed Dec 3, 2020
1 parent 5ef579d commit d224b36
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 47 deletions.
21 changes: 0 additions & 21 deletions .babelrc.js

This file was deleted.

18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

## Notable changes

* v2.0.0
* Removed transpiled version
* Removed [core-js](https://github.com/zloirock/core-js)@2 dependency
* Recreated all examples (except vanilla Webpack one) with up-to-date CLIs
* v1.5.0
* Added new option: [transformImageAttributesToVueDirectives](#configuration)
* Added new option: [verbose](#configuration)
Expand Down Expand Up @@ -250,20 +254,20 @@ In case of some conflicts, you can also use data version of your keyword (e.g. `
* **sprite.strict:**
In strict mode loader replaces only images with defined keyword. If strict mode is disabled, loader replaces all images.

* **addTitle:**
Transform image `alt` attribute into SVG `title` tag, if not defined (removed with [SVGO][svgo] by default). This option has no effect while using inline SVG sprites.

* **addAttributes:**
Object of attributes which will be added.

* **dataAttributes:**
Array of attributes which will be renamed to data-attributes.

* **removeAttributes:**
Array of attributes which will be removed.

* **addAttributes:**
Object of attributes which will be added.

* **addTitle:**
Transform image `alt` attribute into SVG `title` tag, if not defined (removed with [SVGO][svgo] by default). This option has no effect while using inline SVG sprites.

* **transformImageAttributesToVueDirectives:**
Transforms all non-[Vue][vue] image tag attributes to attributes set via [Vue][vue] `v-bind` directive. With this option enabled, [Vue][vue] will handle merge / replace attributes, that are present on both resources - image tag and SVG tag. This might cause issues, when using [Vue bindings][vue-bindings] on image tag attribute, that is also present on SVG tag (e.g.: class attribute). Please use [verbose](#configuration) option for local debugging before submitting new issue.
Transforms all non-[Vue][vue] image tag attributes via [Vue][vue] `v-bind` directive. With this option enabled, [Vue][vue] will handle merge / replace attributes, that are present on both resources - image tag and SVG tag. This might cause issues, when using [Vue bindings][vue-bindings] on image tag attribute, that is also present on SVG tag (e.g.: class attribute). Please use [verbose](#configuration) option for local debugging before submitting new issue.

* **md5:**
Use md5-encoded resource path as ID for inline SVG sprites instead of plaintext. Set it to `false` only for development purposes.
Expand Down
1 change: 0 additions & 1 deletion dist/index.min.js

This file was deleted.

6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use strict";

const { join } = require("path");
const { resolve } = require("path");

module.exports = require(join(__dirname, "./src/index.js"));
const path = resolve(__dirname, "src");

module.exports = require(path);
17 changes: 3 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{
"name": "vue-svg-inline-loader",
"version": "1.5.1",
"version": "2.0.0-dev",
"description": "Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.",
"main": "dist/index.min.js",
"main": "src/index.js",
"files": [
"*.js",
"dist/*.js",
"src/*.js"
],
"directories": {
"example": "examples"
},
"scripts": {
"build": "npm run lint && npx rimraf dist/* && npx babel src/index.js --out-file dist/index.min.js",
"watch": "npx babel src/index.js --out-file dist/index.min.js --watch",
"lint": "npx eslint src/index.js",
"lint:fix": "npx eslint --fix src/index.js"
},
Expand Down Expand Up @@ -45,19 +42,11 @@
},
"homepage": "https://github.com/oliverfindl/vue-svg-inline-loader#readme",
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@babel/runtime": "^7.12.1",
"core-js": "^2.6.11",
"loader-utils": "^2.0.0",
"schema-utils": "^3.0.0",
"svgo": "^1.3.2"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"eslint": "^7.11.0",
"rimraf": "^3.0.2"
"eslint": "^7.14.0"
}
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vue-svg-inline-loader v1.5.1 (2020-10-16)
* Copyright 2020 Oliver Findl
* @author Oliver Findl
* @version 2.0.0-dev
* @license MIT
*/

Expand Down

0 comments on commit d224b36

Please sign in to comment.