esbuild-plugin-less
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
var f=Object.create,o=Object.defineProperty,d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,w=Object.getOwnPropertyDescriptor;var l=e=>o(e,"__esModule",{value:!0});var L=(e,s)=>{l(e);for(var t in s)o(e,t,{get:s[t],enumerable:!0})},D=(e,s,t)=>{if(l(e),s&&typeof s=="object"||typeof s=="function")for(let a of v(s))!u.call(e,a)&&a!=="default"&&o(e,a,{get:()=>s[a],enumerable:!(t=w(s,a))||t.enumerable});return e},p=e=>e&&e.__esModule?e:D(o(e!=null?f(d(e)):{},"default",{value:e,enumerable:!0}),e);L(exports,{lessLoader:()=>P});var r=p(require("path")),i=p(require("fs")),c=p(require("less")),h="less";function P(e={}){return{name:"less-loader",setup:s=>{s.onResolve({filter:/\.less$/},t=>({path:r.resolve(process.cwd(),r.relative(process.cwd(),t.resolveDir),t.path),namespace:h})),s.onLoad({filter:/.*/,namespace:h},async t=>{let a=await i.promises.readFile(t.path,"utf-8"),n=r.dirname(t.path),m=r.basename(t.path);return{contents:(await c.default.render(a,{filename:m,rootpath:n,...e,paths:[...e.paths||[],n]})).css,loader:"css",resolveDir:n}})}}} | ||
var f=Object.create,o=Object.defineProperty,d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,w=Object.getOwnPropertyDescriptor;var l=e=>o(e,"__esModule",{value:!0});var L=(e,s)=>{for(var t in s)o(e,t,{get:s[t],enumerable:!0})},D=(e,s,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of v(s))!u.call(e,a)&&a!=="default"&&o(e,a,{get:()=>s[a],enumerable:!(t=w(s,a))||t.enumerable});return e},p=e=>e&&e.__esModule?e:D(l(o(e!=null?f(d(e)):{},"default",{value:e,enumerable:!0})),e);l(exports);L(exports,{lessLoader:()=>P});var r=p(require("path")),i=p(require("fs")),c=p(require("less")),h="less";function P(e={}){return{name:"less-loader",setup:s=>{s.onResolve({filter:/\.less$/},t=>({path:r.resolve(process.cwd(),r.relative(process.cwd(),t.resolveDir),t.path),namespace:h})),s.onLoad({filter:/.*/,namespace:h},async t=>{let a=await i.promises.readFile(t.path,"utf-8"),n=r.dirname(t.path),m=r.basename(t.path);return{contents:(await c.default.render(a,{filename:m,rootpath:n,...e,paths:[...e.paths||[],n]})).css,loader:"css",resolveDir:n}})}}} |
@@ -1,6 +0,1 @@ | ||
## [1.0.1](https://github.com/iam-medvedev/esbuild-plugin-less/compare/v1.0.0...v1.0.1) (2021-02-13) | ||
### Bug Fixes | ||
* update options onLoad ([d8f5669](https://github.com/iam-medvedev/esbuild-plugin-less/commit/d8f5669467238d71bd9e068ac4f9d5d4fcc71cd4)) | ||
## [1.0.2](https://github.com/iam-medvedev/esbuild-plugin-less/compare/v1.0.1...v1.0.2) (2021-03-03) |
{ | ||
"name": "esbuild-plugin-less", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "esbuild plugin for less files", | ||
@@ -11,2 +11,3 @@ "repository": "https://github.com/iam-medvedev/esbuild-plugin-less.git", | ||
"main": "build/cjs.js", | ||
"module": "build/esm.mjs", | ||
"types": "build/index.d.ts", | ||
@@ -20,2 +21,3 @@ "files": [ | ||
"build:example": "ts-node ./example/build.ts", | ||
"commit": "yarn git-cz", | ||
"prepublish": "yarn test && yarn types && yarn build", | ||
@@ -26,3 +28,3 @@ "types": "NODE_ENV=production tsc --emitDeclarationOnly --declaration --outDir build", | ||
"exports": { | ||
"import": "./build/esm.js", | ||
"import": "./build/esm.mjs", | ||
"require": "./build/cjs.js" | ||
@@ -43,4 +45,8 @@ }, | ||
"@types/node": "^14.14.22", | ||
"esbuild": "^0.8.33", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"esbuild": "^0.8.54", | ||
"git-cz": "^4.7.6", | ||
"husky": "^5.1.3", | ||
"jest": "^26.6.3", | ||
"lint-staged": "^10.5.4", | ||
"prettier": "^2.2.1", | ||
@@ -52,2 +58,5 @@ "semantic-release": "^17.3.9", | ||
}, | ||
"peerDependencies": { | ||
"esbuild": "^0.8.x" | ||
}, | ||
"dependencies": { | ||
@@ -65,3 +74,18 @@ "@types/less": "^3.0.2", | ||
"yarn": "1.22.5" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
6637
3
18