svelte-preprocess
Advanced tools
Comparing version 2.15.0 to 2.15.1
252
CHANGELOG.md
@@ -1,280 +0,208 @@ | ||
# Changelog | ||
## [2.15.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.4...v2.15.1) (2019-08-08) | ||
All notable changes to this project will be documented in this file. | ||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
### Bug Fixes | ||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
* rename typescript configuration option to honor the readme docs ([67f2137](https://github.com/kaisermann/svelte-preprocess/commit/67f2137)) | ||
## [v2.14.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.3...v2.14.4) - 2019-07-06 | ||
### Commits | ||
### Features | ||
- feat: 🎸 allow to watch stylus dependencies [`8aa3dfc`](https://github.com/kaisermann/svelte-preprocess/commit/8aa3dfcd73730688c3a4d555ebf5a56cf36c669f) | ||
- docs: ✏️ minor readme revision [`d88350d`](https://github.com/kaisermann/svelte-preprocess/commit/d88350d9be791ab5816d8af8a9525c470a20c70b) | ||
* 🎸 add external src support for stand-alone processors ([974ab5a](https://github.com/kaisermann/svelte-preprocess/commit/974ab5a)) | ||
## [v2.14.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.1...v2.14.3) - 2019-07-01 | ||
### Commits | ||
- fix: 🐛 pass less @imports as dependencies to svelte [`55e9d28`](https://github.com/kaisermann/svelte-preprocess/commit/55e9d28fd03a2a1bf07c4d1b9ec3517fe2ce0cb3) | ||
- fix: pug mixin elseif (#45) [`98ad9ca`](https://github.com/kaisermann/svelte-preprocess/commit/98ad9ca996c70da25666e4f1e9286d4dfd15fb36) | ||
## [2.14.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.3...v2.14.4) (2019-07-03) | ||
## [v2.14.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.0...v2.14.1) - 2019-06-28 | ||
### Commits | ||
### Features | ||
- fix: 🐛 transformer imported dependencies being overwritten [`423c17a`](https://github.com/kaisermann/svelte-preprocess/commit/423c17a23283bca40ac0d8adf192ec1037196a12) | ||
* 🎸 allow to watch stylus dependencies ([8aa3dfc](https://github.com/kaisermann/svelte-preprocess/commit/8aa3dfc)) | ||
## [v2.14.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.13.1...v2.14.0) - 2019-06-22 | ||
### Commits | ||
- Replace selector regex with postcss plugin [`580c77b`](https://github.com/kaisermann/svelte-preprocess/commit/580c77b10da9c0123aaa9153d9d7241d864bf096) | ||
- add globalStyle preprocess [`0dc65e2`](https://github.com/kaisermann/svelte-preprocess/commit/0dc65e2b433c8bd0dcf31455e8097605db337bc1) | ||
- Rearrange readme [`8700ac0`](https://github.com/kaisermann/svelte-preprocess/commit/8700ac0f6ce2a0ff41e8b84f3813808f1cce3284) | ||
## [2.14.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.2...v2.14.3) (2019-07-01) | ||
## [v2.13.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.13.0...v2.13.1) - 2019-06-21 | ||
### Commits | ||
### Bug Fixes | ||
- Transform "true" option into empty object [`2ba87dc`](https://github.com/kaisermann/svelte-preprocess/commit/2ba87dc6d79614c0bb5d9a6c5ab5f8e0381fc0f2) | ||
* 🐛 pass less [@imports](https://github.com/imports) as dependencies to svelte ([55e9d28](https://github.com/kaisermann/svelte-preprocess/commit/55e9d28)) | ||
## [v2.13.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.12.0...v2.13.0) - 2019-06-21 | ||
### Commits | ||
- Allow to passe syntax/parser to postcss [`953e7e1`](https://github.com/kaisermann/svelte-preprocess/commit/953e7e1f408a102029909d3fe3bf655ab756959f) | ||
- docs: ✏️ add sapper usage instructions [`8051445`](https://github.com/kaisermann/svelte-preprocess/commit/8051445473ab1fd774f7a10664b2305c14bdfdba) | ||
- Move npm files definition to files array on pkg.json [`3580ec2`](https://github.com/kaisermann/svelte-preprocess/commit/3580ec2b0fde9f13c47fdefda0e59723d5b029bf) | ||
## [2.14.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.1...v2.14.2) (2019-06-29) | ||
## [v2.12.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.11.0...v2.12.0) - 2019-06-03 | ||
### Merged | ||
### Bug Fixes | ||
- feat: prepend scss with data property [`#36`](https://github.com/kaisermann/svelte-preprocess/pull/36) | ||
* pug mixin elseif ([#45](https://github.com/kaisermann/svelte-preprocess/issues/45)) ([98ad9ca](https://github.com/kaisermann/svelte-preprocess/commit/98ad9ca)) | ||
### Commits | ||
- test: 💍 add test for scss data property [`851da64`](https://github.com/kaisermann/svelte-preprocess/commit/851da64d1e06075ae31e3b222cca7c23500bd644) | ||
- Add note to rollup example [`bb43f07`](https://github.com/kaisermann/svelte-preprocess/commit/bb43f07b41298f5e9a2e52c038fe0b34c6120d32) | ||
## [v2.11.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.10.0...v2.11.0) - 2019-05-29 | ||
## [2.14.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.14.0...v2.14.1) (2019-06-28) | ||
### Merged | ||
- feat: 🎸 add svelte pug mixins [`#38`](https://github.com/kaisermann/svelte-preprocess/pull/38) | ||
### Bug Fixes | ||
### Commits | ||
* 🐛 transformer imported dependencies being overwritten ([423c17a](https://github.com/kaisermann/svelte-preprocess/commit/423c17a)) | ||
- test: 💍 add tests for postcss import tracking [`e19545d`](https://github.com/kaisermann/svelte-preprocess/commit/e19545d0ea9dafc8897847b365603c4b03729e45) | ||
- test: 💍 mooooar coverage [`ed62006`](https://github.com/kaisermann/svelte-preprocess/commit/ed620064dea23857dcb7b1cb9ac2111de0a577d5) | ||
## [v2.10.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.9.1...v2.10.0) - 2019-05-27 | ||
### Merged | ||
# [2.14.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.13.1...v2.14.0) (2019-06-22) | ||
- feat: 🎸 add support for typescript type checking [`#37`](https://github.com/kaisermann/svelte-preprocess/pull/37) | ||
### Commits | ||
## [2.13.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.13.0...v2.13.1) (2019-06-21) | ||
## [v2.9.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.9.0...v2.9.1) - 2019-05-21 | ||
### Commits | ||
- refactor: 💡 rename rollup example to svelte-rollup [`5fe4733`](https://github.com/kaisermann/svelte-preprocess/commit/5fe47333e15bfba93989da72ba2a27c847e5aaf8) | ||
- test: 💍 add test for transforming only whats between `<template>` [`feddbfc`](https://github.com/kaisermann/svelte-preprocess/commit/feddbfce18daa826088a26bfa11efbf375ce2139) | ||
- fix: 🐛 template preprocessing running on the whole file [`e37da9d`](https://github.com/kaisermann/svelte-preprocess/commit/e37da9d5f8f5fde5077e02add17be039db729e32) | ||
# [2.13.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.12.0...v2.13.0) (2019-06-21) | ||
## [v2.9.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.8.0...v2.9.0) - 2019-05-15 | ||
### Commits | ||
- Change changelog format [`9c14a89`](https://github.com/kaisermann/svelte-preprocess/commit/9c14a89f0ba0a500133b95780505940dff3c146f) | ||
# [2.12.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.7.1...v2.12.0) (2019-06-03) | ||
## [v2.8.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.7.1...v2.8.0) - 2019-05-14 | ||
### Commits | ||
### Bug Fixes | ||
- refactor: 💡 Move transformers configuration to main option obj [`9a320d9`](https://github.com/kaisermann/svelte-preprocess/commit/9a320d9c1784ceff746f5c4cd3748bfca09cac68) | ||
- chore: 🤖 use local svelte-preprocess in example [`382d876`](https://github.com/kaisermann/svelte-preprocess/commit/382d87632b0dcd498a730c40bbaeb7268107f93e) | ||
- feat: 🎸 add typescript preprocessor [`c195aa1`](https://github.com/kaisermann/svelte-preprocess/commit/c195aa183b60899603d72743432de501b23f6087) | ||
* 🐛 template preprocessing running on the whole file ([e37da9d](https://github.com/kaisermann/svelte-preprocess/commit/e37da9d)) | ||
## [v2.7.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.5...v2.7.1) - 2019-05-08 | ||
### Commits | ||
### Features | ||
- Add rollup example [`2e64670`](https://github.com/kaisermann/svelte-preprocess/commit/2e64670ae13ecbc1feb3872c46cbacef4d2dc4f9) | ||
- feat: 🎸 watch internal files imported with postcss-import [`5b14624`](https://github.com/kaisermann/svelte-preprocess/commit/5b14624ac04a9812e680b252b8f6d69c97c30188) | ||
- docs: ✏️ add rollup config example [`8e2c346`](https://github.com/kaisermann/svelte-preprocess/commit/8e2c3463710cf397481d9ad750b4b0a7e0d76220) | ||
* 🎸 add support for typescript type checking ([#37](https://github.com/kaisermann/svelte-preprocess/issues/37)) ([e6dd744](https://github.com/kaisermann/svelte-preprocess/commit/e6dd744)) | ||
* 🎸 add svelte pug mixins ([#38](https://github.com/kaisermann/svelte-preprocess/issues/38)) ([543ab75](https://github.com/kaisermann/svelte-preprocess/commit/543ab75)) | ||
* 🎸 add typescript preprocessor ([c195aa1](https://github.com/kaisermann/svelte-preprocess/commit/c195aa1)) | ||
* prepend scss with data property ([#36](https://github.com/kaisermann/svelte-preprocess/issues/36)) ([dfa2b2a](https://github.com/kaisermann/svelte-preprocess/commit/dfa2b2a)) | ||
## [v2.6.5](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.4...v2.6.5) - 2019-05-05 | ||
### Commits | ||
- fix: 🐛 stand-alone processors not exported [`ced0fd1`](https://github.com/kaisermann/svelte-preprocess/commit/ced0fd1dfc34e13aefa13ba9d31efd81255e348d) | ||
- chore: 🤖 update changelog [`6a23f3e`](https://github.com/kaisermann/svelte-preprocess/commit/6a23f3e8823269d6389c24630cc2e7c196a13f79) | ||
- chore: 🤖 bump to 2.6.5 [`a8fff01`](https://github.com/kaisermann/svelte-preprocess/commit/a8fff01d79453980ebaa169c6bde22896819e5a4) | ||
## [2.7.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.5...v2.7.1) (2019-05-08) | ||
## [v2.6.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.3...v2.6.4) - 2019-05-05 | ||
### Commits | ||
### Bug Fixes | ||
- chore: 🤖 update changelog [`6229c92`](https://github.com/kaisermann/svelte-preprocess/commit/6229c920ed65663b2c1ca5b1f4f5414265e2293b) | ||
- fix: 🐛 less and stylus stand-alone processor [`85827bb`](https://github.com/kaisermann/svelte-preprocess/commit/85827bbd53340b39b99b706f03c926d3b01bbad6) | ||
- chore: 🤖 bump to 2.6.4 with less/stylus processors working [`2b3c8ab`](https://github.com/kaisermann/svelte-preprocess/commit/2b3c8ab7db764ac1c1529c0adda1b34d7e9586c0) | ||
* 🐛 cut 90% of downloaded package size ([882a4dd](https://github.com/kaisermann/svelte-preprocess/commit/882a4dd)) | ||
## [v2.6.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.2...v2.6.3) - 2019-05-01 | ||
### Commits | ||
### Features | ||
- docs: ✏️ split test files into multiple files [`9ca7361`](https://github.com/kaisermann/svelte-preprocess/commit/9ca73618f254266493bca856fb09f4eddc54db4a) | ||
- feat: support dart-sass [`e56f8b2`](https://github.com/kaisermann/svelte-preprocess/commit/e56f8b24c8f93db82ef9bb0f17dd658aaf000126) | ||
- chore: update changelog [`b30950e`](https://github.com/kaisermann/svelte-preprocess/commit/b30950e58e53249cb94cfcc58067900eedb0b0af) | ||
* 🎸 watch internal files imported with postcss-import ([5b14624](https://github.com/kaisermann/svelte-preprocess/commit/5b14624)) | ||
## [v2.6.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.5.2...v2.6.2) - 2019-04-11 | ||
### Commits | ||
- refactor: 💡 DRY markupTransformer [`07a6c3d`](https://github.com/kaisermann/svelte-preprocess/commit/07a6c3d665645a4a4a1277c6119e06c406ec7b68) | ||
- refactor: 💡 move test utilities to separate file [`83fca01`](https://github.com/kaisermann/svelte-preprocess/commit/83fca014e2d5cb2b4b85032b3d1d301202c507ad) | ||
- feat: 🎸 add stand-alone processors [`f19c90a`](https://github.com/kaisermann/svelte-preprocess/commit/f19c90a1ed2838a8712b0c95dccbd8b005d8f9c0) | ||
## [2.6.5](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.4...v2.6.5) (2019-05-05) | ||
## [v2.5.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.5.1...v2.5.2) - 2019-04-10 | ||
### Commits | ||
### Bug Fixes | ||
- feat: 🎸 support async onBefore() [`a6af2a2`](https://github.com/kaisermann/svelte-preprocess/commit/a6af2a276cfc728ed60631eba5072b83cb035991) | ||
- chore: 🤖 update changelog [`557f91a`](https://github.com/kaisermann/svelte-preprocess/commit/557f91ae2b852c5c800746803f46bead8f43d010) | ||
* 🐛 stand-alone processors not exported ([ced0fd1](https://github.com/kaisermann/svelte-preprocess/commit/ced0fd1)) | ||
## [v2.5.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.2...v2.5.1) - 2019-04-02 | ||
### Commits | ||
- chore(release): v2.5.0 [`88e3ee9`](https://github.com/kaisermann/svelte-preprocess/commit/88e3ee9dba4a8a4a8a4a8bdd9b4b6a76fcbd3867) | ||
- fix: 🐛 custom transformer not working with external src files [`cc037c3`](https://github.com/kaisermann/svelte-preprocess/commit/cc037c3cdae72f16c1f977986a1434006dc3fe96) | ||
- add dependencies to result [`f3d1ef1`](https://github.com/kaisermann/svelte-preprocess/commit/f3d1ef13234707383fb42c38094caeae2de632ff) | ||
## [2.6.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.3...v2.6.4) (2019-05-05) | ||
## [v2.4.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.1...v2.4.2) - 2018-11-03 | ||
### Commits | ||
### Bug Fixes | ||
- allow ignoring of certain tags [`dc07802`](https://github.com/kaisermann/svelte-preprocess/commit/dc0780214e76ec9a0ef7d30234cfb6ed423967bd) | ||
- fix readme [`a3f4de8`](https://github.com/kaisermann/svelte-preprocess/commit/a3f4de80fcd18f0cb5ad41c8387a59c83bb56e4d) | ||
- Preserve aliased languages as well [`d41f2d0`](https://github.com/kaisermann/svelte-preprocess/commit/d41f2d04da8a64a3c584faf964b718cb590585de) | ||
* 🐛 less and stylus stand-alone processor ([85827bb](https://github.com/kaisermann/svelte-preprocess/commit/85827bb)) | ||
## [v2.4.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.0...v2.4.1) - 2018-11-02 | ||
### Commits | ||
- Accept custom language transformers (#11) [`6abbea1`](https://github.com/kaisermann/svelte-preprocess/commit/6abbea1180df92c7e583d60ae059524ae5261d00) | ||
- Update changelog [`a8d617f`](https://github.com/kaisermann/svelte-preprocess/commit/a8d617f30becea8df442d5a1ce92a4d917f0c861) | ||
## [2.6.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.6.2...v2.6.3) (2019-05-01) | ||
## [v2.4.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.3.1...v2.4.0) - 2018-11-01 | ||
### Merged | ||
### Features | ||
- Don't try to resolve files hosted on a cdn locally [`#10`](https://github.com/kaisermann/svelte-preprocess/pull/10) | ||
- Merge default options with provided options and provide defaults for pug [`#5`](https://github.com/kaisermann/svelte-preprocess/pull/5) | ||
* support dart-sass ([e56f8b2](https://github.com/kaisermann/svelte-preprocess/commit/e56f8b2)) | ||
### Commits | ||
- Update dev deps [`efffa8f`](https://github.com/kaisermann/svelte-preprocess/commit/efffa8fb0fc97f36d403cb70a0e97d4d64bfb4ad) | ||
- Refactor default transformers options [`d6f97bd`](https://github.com/kaisermann/svelte-preprocess/commit/d6f97bdf314f00e823735269015a34c2dc06969e) | ||
- Update changelog [`2a958a9`](https://github.com/kaisermann/svelte-preprocess/commit/2a958a93204782226d40f49cc5fa3f4f86696297) | ||
## [v2.3.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.2...v2.3.1) - 2018-09-01 | ||
## [2.6.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.5.2...v2.6.2) (2019-04-11) | ||
### Commits | ||
- Show a warning if 'transformers.postcss: true' and no 'postcss.config.js' file was found [`bd5eef6`](https://github.com/kaisermann/svelte-preprocess/commit/bd5eef60e1afe2790d3606722edb03fc96049f81) | ||
- Update changelog [`18ce9a4`](https://github.com/kaisermann/svelte-preprocess/commit/18ce9a4a459740e16d8587e0533ba34e0e7a8789) | ||
- Add support for passing specific options to language aliases [`a52106b`](https://github.com/kaisermann/svelte-preprocess/commit/a52106b6da3bdd3ed18d711e77aad26dc5d73e37) | ||
### Bug Fixes | ||
## [v2.2.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.1...v2.2.2) - 2018-07-18 | ||
* 🐛 standalone processors breaking everything :) ([ce11323](https://github.com/kaisermann/svelte-preprocess/commit/ce11323)) | ||
### Commits | ||
- Oops. Remove console.log [`8e8716b`](https://github.com/kaisermann/svelte-preprocess/commit/8e8716b1bad7a3a688f5886f7df1c122d7705d54) | ||
### Features | ||
## [v2.2.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.0...v2.2.1) - 2018-07-18 | ||
* 🎸 add stand-alone processors ([f19c90a](https://github.com/kaisermann/svelte-preprocess/commit/f19c90a)) | ||
### Commits | ||
- Add changelog [`332e64f`](https://github.com/kaisermann/svelte-preprocess/commit/332e64f277601eb4d2f2ab66ec3a98f03bc42b85) | ||
- Prioritize manual postcss config over config file [`05bb64e`](https://github.com/kaisermann/svelte-preprocess/commit/05bb64e543521524e0bdb10306a5a2ba94149a48) | ||
## [v2.2.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.1.4...v2.2.0) - 2018-07-17 | ||
## [2.5.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.5.1...v2.5.2) (2019-04-10) | ||
### Commits | ||
- Use postcss-load-config instead of cosmiconfig [`21f72d5`](https://github.com/kaisermann/svelte-preprocess/commit/21f72d52f05f72e8a44ab2ecce690dd8efac52c4) | ||
### Features | ||
## [v2.1.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.1.3...v2.1.4) - 2018-06-26 | ||
* 🎸 support async onBefore() ([a6af2a2](https://github.com/kaisermann/svelte-preprocess/commit/a6af2a2)) | ||
### Merged | ||
- Strip extra indentation before passing css to postcss [`#2`](https://github.com/kaisermann/svelte-preprocess/pull/2) | ||
### Commits | ||
## [2.5.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.2...v2.5.1) (2019-04-02) | ||
- Add svelte-loader example [`ca74af9`](https://github.com/kaisermann/svelte-preprocess/commit/ca74af9caa2aec0a547686c0eb9a5e5b2c90d31a) | ||
## [v2.1.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.1.0...v2.1.3) - 2018-06-21 | ||
### Bug Fixes | ||
### Commits | ||
* 🐛 custom transformer not working with external src files ([cc037c3](https://github.com/kaisermann/svelte-preprocess/commit/cc037c3)) | ||
- Use cosmiconfig to look for postcss.config.js [`a1c6d90`](https://github.com/kaisermann/svelte-preprocess/commit/a1c6d908359864f5ef7bbf9fa9ca0dabc60c0227) | ||
- Move cosmiconfig to dependencies [`5405632`](https://github.com/kaisermann/svelte-preprocess/commit/540563257eec8ce1eb9c78e2782ddaf1e5049c18) | ||
- Don't require to restart dev server when changing postcss config file [`162e194`](https://github.com/kaisermann/svelte-preprocess/commit/162e194fec5cd88baf0c7ed870d80605f4afdd77) | ||
## [v2.1.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.5...v2.1.0) - 2018-06-20 | ||
### Commits | ||
## [2.4.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.1...v2.4.2) (2018-11-03) | ||
- Add support for using postcss.config.js file [`8d966d0`](https://github.com/kaisermann/svelte-preprocess/commit/8d966d0f824500fec71acbaf2148df7092aa9f55) | ||
- :heavy_minus_sign: Oops... [`956ab33`](https://github.com/kaisermann/svelte-preprocess/commit/956ab331421bfd724f1b4fc549fd747374f4f01d) | ||
## [v2.0.5](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.4...v2.0.5) - 2018-05-17 | ||
### Commits | ||
## [2.4.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.4.0...v2.4.1) (2018-11-02) | ||
- Add post installation info message [`c3f833d`](https://github.com/kaisermann/svelte-preprocess/commit/c3f833d54d106d53b2e14b6d57d2a54b689d43dc) | ||
## [v2.0.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.3...v2.0.4) - 2018-05-17 | ||
### Commits | ||
# [2.4.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.3.1...v2.4.0) (2018-11-01) | ||
- :grin: Little code refactor [`b7e98a0`](https://github.com/kaisermann/svelte-preprocess/commit/b7e98a05f938606615b8c71e06c9aa74402e8971) | ||
- :zap: Moaaar perf [`2185977`](https://github.com/kaisermann/svelte-preprocess/commit/218597724c153bcf93f1fe3c9f080114378f32b1) | ||
- Update README.md [`b335441`](https://github.com/kaisermann/svelte-preprocess/commit/b335441bef1bc8afd0ad088c152fe748b28ed324) | ||
## [v2.0.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.2...v2.0.3) - 2018-05-15 | ||
### Commits | ||
## [2.3.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.2...v2.3.1) (2018-09-01) | ||
- Make every method signature use destructuring [`35d5b3e`](https://github.com/kaisermann/svelte-preprocess/commit/35d5b3e9d1bc8fc6970bdf309ad757d3f54f0629) | ||
## [v2.0.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.1...v2.0.2) - 2018-05-15 | ||
### Commits | ||
## [2.2.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.1...v2.2.2) (2018-07-18) | ||
- Fix onBefore type signature [`3f3b125`](https://github.com/kaisermann/svelte-preprocess/commit/3f3b12524b3415157f29fb6bfd0fd11291bc1b3a) | ||
## [v2.0.1](https://github.com/kaisermann/svelte-preprocess/compare/1.1.2...v2.0.1) - 2018-05-15 | ||
### Commits | ||
## [2.2.1](https://github.com/kaisermann/svelte-preprocess/compare/v2.2.0...v2.2.1) (2018-07-18) | ||
- Rename languages/preprocessors to transformers. Add postcss support. [`1c296dd`](https://github.com/kaisermann/svelte-preprocess/commit/1c296dd3155e1a77510462cacac1f7b52870b00e) | ||
- DRY tests [`722148e`](https://github.com/kaisermann/svelte-preprocess/commit/722148e5e6ac8bb9ac21a2ba8f6bca0d365a7d00) | ||
- Add cwd's node_modules, src and current file directory to scss and stylus include paths [`c40da3e`](https://github.com/kaisermann/svelte-preprocess/commit/c40da3ef07d9e2755ed44caa702290a6a9015310) | ||
## 1.1.2 - 2018-05-14 | ||
### Commits | ||
# [2.2.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.1.4...v2.2.0) (2018-07-18) | ||
- Initial commit :hatching_chick: [`b94377f`](https://github.com/kaisermann/svelte-preprocess/commit/b94377fbd94daf5ee79da1048331985592540b08) | ||
- Add passthrough methods [`2c5ab3d`](https://github.com/kaisermann/svelte-preprocess/commit/2c5ab3d0f131753d5a8dacb4d8693418b6a3819f) | ||
- Add onBefore hook [`4ad6c3a`](https://github.com/kaisermann/svelte-preprocess/commit/4ad6c3a94894aca3296be0e2f277ef7a6b1699b1) | ||
## [2.1.3](https://github.com/kaisermann/svelte-preprocess/compare/v2.1.0...v2.1.3) (2018-06-21) | ||
# [2.1.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.5...v2.1.0) (2018-06-20) | ||
## [2.0.5](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.4...v2.0.5) (2018-05-17) | ||
## [2.0.4](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.3...v2.0.4) (2018-05-17) | ||
## [2.0.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.0.1...v2.0.2) (2018-05-15) | ||
## [2.0.1](https://github.com/kaisermann/svelte-preprocess/compare/1.1.2...v2.0.1) (2018-05-15) | ||
## 1.1.2 (2018-05-14) | ||
{ | ||
"name": "svelte-preprocess", | ||
"version": "2.15.0", | ||
"version": "2.15.1", | ||
"license": "MIT", | ||
@@ -28,5 +28,7 @@ "main": "src/index.js", | ||
"format": "prettier --loglevel silent --write \"src/**/*.js\" && eslint --fix \"src/**/*.js\"", | ||
"prepublishOnly": "npm run format && npm run test", | ||
"postinstall": "node -e \"console.log('\\u001b[36m\\u001b[1m[svelte-preprocess] Don\\'t forget to install the preprocessors packages that will be used: \\u001b[22m\\u001b[39m\\u001b[34mnode-sass/sass, stylus, less, postcss, coffesscript, pug, etc...\\u001b[0m')\"", | ||
"version": "auto-changelog -p && git add CHANGELOG.md" | ||
"postinstall": "node -e \"console.log('\\u001b[36m\\u001b[1m[svelte-preprocess] Don\\'t forget to install the preprocessors packages that will be used: \\u001b[22m\\u001b[39m\\u001b[34mnode-sass/sass, stylus, less, postcss, coffeescript, pug, etc...\\u001b[0m')\"", | ||
"version": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md", | ||
"tag": "git tag -a v$npm_package_version -m 'Release v$npm_package_version'", | ||
"release": "npm run version && git add package.json && git commit -m \"chore: release v$npm_package_version\"", | ||
"prepublishOnly": "npm run release && npm run tag" | ||
}, | ||
@@ -33,0 +35,0 @@ "auto-changelog": { |
302
README.md
@@ -15,8 +15,10 @@ # Svelte Preprocess | ||
- [Usage](#usage) | ||
- [With `rollup-plugin-svelte`](#with-rollup-plugin-svelte) | ||
- [With `svelte-loader`](#with-svelte-loader) | ||
- [With Sapper](#with-sapper) | ||
- [With Svelte VS Code](#with-svelte-vs-code) | ||
- [Preprocessing modes](#preprocessing-modes) | ||
- [Auto Preprocessing](#auto-preprocessing) | ||
- [Standalone processors](#standalone-processors) | ||
- [With `rollup-plugin-svelte`](#with-rollup-plugin-svelte) | ||
- [With `svelte-loader`](#with-svelte-loader) | ||
- [With Sapper](#with-sapperhttpssappersveltedev) | ||
- [With Svelte VS Code](#with-svelte-vs-codehttpsmarketplacevisualstudiocomitemsitemnamejamesbirtlessvelte-vscode) | ||
- [Options](#options) | ||
- [Limitations](#limitations) | ||
@@ -128,141 +130,2 @@ - [`typescript`](#typescript) | ||
### Auto Preprocessing | ||
In auto preprocessing mode, `svelte-preprocess` automatically uses the respective preprocessor for your code based on your `type="..."` or `lang="..."` attributes. It also handles the `<template>` tag for markup, external files and global styling. It's as simple as importing the module and executing the default exported method. | ||
#### Basic | ||
```js | ||
const svelte = require('svelte') | ||
const preprocess = require('svelte-preprocess') | ||
svelte.preprocess(input, preprocess({ /* options */ })).then(...) | ||
``` | ||
#### Advanced | ||
```js | ||
const svelte = require('svelte') | ||
const preprocess = require('svelte-preprocess') | ||
const options = { | ||
/** | ||
* Extend the default language alias dictionary. | ||
* Each entry must follow: ['alias', 'languageName'] | ||
*/ | ||
aliases: [ | ||
/** | ||
* Means | ||
* <... src="file.cst"> or | ||
* <... lang="cst"> or | ||
* <... type="text/customLanguage"> | ||
* <... type="application/customLanguage"> | ||
* will be treated as the language 'customLanguage' | ||
*/ | ||
['cst', 'customLanguage'] | ||
], | ||
preserve: [ | ||
/** | ||
* Using the same matching algorithm as above, don't parse, | ||
* modify, or remove from the markup, tags which match the | ||
* language / types listed below. | ||
* **/ | ||
'ld+json' | ||
], | ||
/** Disable a language by setting it to 'false' */ | ||
scss: false, | ||
/** Pass options to the default preprocessor method */ | ||
stylus: { | ||
paths: ['node_modules'] | ||
}, | ||
/** | ||
* Post process css with PostCSS by defining 'transformers.postcss' property, | ||
* either pass 'true' to activate PostCSS transforms and use the `postcss.config.js` | ||
*/ | ||
postcss: true, | ||
/** or pass an object with postcss plugins and their options directly. */ | ||
postcss: { | ||
plugins: [ | ||
require('autoprefixer')({ browsers: 'last 2 versions' }) | ||
] | ||
}, | ||
typescript: { | ||
/** | ||
* Optionally specify the directory to load the tsconfig from | ||
*/ | ||
tsconfigDirectory: './configs', | ||
/** | ||
* Optionally specify the full path to the tsconfig | ||
*/ | ||
tsconfigFile: './tsconfig.app.json', | ||
/** | ||
* Optionally specify compiler options. | ||
* These will be merged with options from the tsconfig if found. | ||
*/ | ||
compilerOptions: { | ||
module: 'es2015' | ||
} | ||
}, | ||
/** Use a custom preprocess method by passing a function. */ | ||
pug({ content, filename }) { | ||
const code = pug.render(content) | ||
return { code, map: null } | ||
}, | ||
/** Add a custom language preprocessor */ | ||
customLanguage({ content, filename }) { | ||
const { code, map } = require('custom-language-compiler')(content) | ||
return { code, map } | ||
}, | ||
} | ||
svelte.preprocess(input, preprocess(options)).then(...) | ||
``` | ||
### Stand-alone processors | ||
Instead of a single processor, [Svelte v3 has added support for multiple processors](https://svelte.dev/docs#svelte_preprocess). In case you want to manually configure your preprocessing step, `svelte-preprocess` exports these named processors: | ||
- `pug` | ||
- `coffeescript` or `coffee` | ||
- `less` | ||
- `scss` or `sass` | ||
- `stylus` | ||
- `postcss` | ||
- `globalStyle` - transform `<style global>` into global styles. | ||
```js | ||
import { scss, coffeescript, pug, globalStyle } from 'svelte-preprocess' | ||
svelte.preprocess(input, [ | ||
pug(), | ||
coffeescript(), | ||
scss(), | ||
globalStyle() | ||
]).then(...) | ||
``` | ||
Every processor accepts an option object which is passed to its respective underlying tool. | ||
```js | ||
import { scss, postcss } from 'svelte-preprocess' | ||
svelte.preprocess(input, [ | ||
scss(), | ||
postcss({ | ||
plugins: [require('autoprefixer')({ browsers: 'last 2 versions' })], | ||
}), | ||
]) | ||
``` | ||
**Note**: there's no built-in support for \<template\> tag or external files when using standalone processors. | ||
### With `rollup-plugin-svelte` | ||
@@ -322,5 +185,5 @@ | ||
### With [Sapper](https://sapper.svelte.dev/) | ||
### With Sapper | ||
Sapper has two build configurations, one for the client bundle and one for the server. To use `svelte-preprocess` with Sapper, you need to define it on both configurations. | ||
[Sapper](https://sapper.svelte.dev/) has two build configurations, one for the client bundle and one for the server. To use `svelte-preprocess` with Sapper, you need to define it on both configurations. | ||
@@ -355,5 +218,5 @@ ```js | ||
### With [Svelte VS Code](https://marketplace.visualstudio.com/items?itemName=JamesBirtles.svelte-vscode) | ||
### With Svelte VS Code | ||
`svelte-vscode` needs to know how its (svelte) language server should preprocess your files. This can be achieved by creating a `svelte.config.js` file at the root of your project which exports a svelte options object (similar to `svelte-loader` and `rollup-plugin-svelte`). | ||
[svelte-vscode](https://marketplace.visualstudio.com/items?itemName=JamesBirtles.svelte-vscode) needs to know how its (svelte) language server should preprocess your files. This can be achieved by creating a `svelte.config.js` file at the root of your project which exports a svelte options object (similar to `svelte-loader` and `rollup-plugin-svelte`). | ||
@@ -376,2 +239,147 @@ **Example**: | ||
## Preprocessing modes | ||
`svelte-preprocess` can be used in two ways: _auto preprocessing_ and with _stand-alone_ processors. | ||
### Auto Preprocessing | ||
In auto preprocessing mode, `svelte-preprocess` automatically uses the respective preprocessor for your code based on your `type="..."` or `lang="..."` attributes. It also handles the `<template>` tag for markup, external files and global styling. It's as simple as importing the module and executing the default exported method. | ||
```js | ||
const svelte = require('svelte') | ||
const preprocess = require('svelte-preprocess') | ||
svelte.preprocess( | ||
input, | ||
preprocess({ | ||
/* options */ | ||
}), | ||
) | ||
``` | ||
### Standalone processors | ||
Instead of a single processor, [Svelte v3 has added support for multiple processors](https://svelte.dev/docs#svelte_preprocess). In case you want to manually configure your preprocessing step, `svelte-preprocess` exports these named processors: | ||
- `pug` | ||
- `coffeescript` or `coffee` | ||
- `less` | ||
- `scss` or `sass` | ||
- `stylus` | ||
- `postcss` | ||
- `globalStyle` - transform `<style global>` into global styles. | ||
```js | ||
import { scss, coffeescript, pug, globalStyle } from 'svelte-preprocess' | ||
svelte.preprocess(input, [pug(), coffeescript(), scss(), globalStyle()]) | ||
``` | ||
Every processor accepts an option object which is passed to its respective underlying tool. | ||
```js | ||
import { scss, postcss } from 'svelte-preprocess' | ||
svelte.preprocess(input, [ | ||
scss(), | ||
postcss({ | ||
plugins: [ | ||
require('autoprefixer')({ | ||
browsers: 'last 2 versions', | ||
}), | ||
], | ||
}), | ||
]) | ||
``` | ||
**Note**: there's no built-in support for \<template\> tag when using standalone processors. | ||
## Options | ||
`svelte-preprocess` in _auto-processing_ mode can receive an options object. | ||
```js | ||
const svelte = require('svelte') | ||
const preprocess = require('svelte-preprocess') | ||
const options = { | ||
/** | ||
* Extend the default language alias dictionary. | ||
* Each entry must follow: ['alias', 'languageName'] | ||
*/ | ||
aliases: [ | ||
/** | ||
* Means | ||
* <... src="file.cst"> or | ||
* <... lang="cst"> or | ||
* <... type="text/customLanguage"> | ||
* <... type="application/customLanguage"> | ||
* will be treated as the language 'customLanguage' | ||
*/ | ||
['cst', 'customLanguage'], | ||
], | ||
preserve: [ | ||
/** | ||
* Using the same matching algorithm as above, don't parse, | ||
* modify, or remove from the markup, tags which match the | ||
* language / types listed below. | ||
* **/ | ||
'ld+json', | ||
], | ||
/** Disable a language by setting it to 'false' */ | ||
scss: false, | ||
/** Pass options to the default preprocessor method */ | ||
stylus: { | ||
paths: ['node_modules'], | ||
}, | ||
/** | ||
* Post process css with PostCSS by defining 'transformers.postcss' property, | ||
* either pass 'true' to activate PostCSS transforms and use the `postcss.config.js` | ||
*/ | ||
postcss: true, | ||
/** or pass an object with postcss plugins and their options directly. */ | ||
postcss: { | ||
plugins: [require('autoprefixer')({ browsers: 'last 2 versions' })], | ||
}, | ||
typescript: { | ||
/** | ||
* Optionally specify the directory to load the tsconfig from | ||
*/ | ||
tsconfigDirectory: './configs', | ||
/** | ||
* Optionally specify the full path to the tsconfig | ||
*/ | ||
tsconfigFile: './tsconfig.app.json', | ||
/** | ||
* Optionally specify compiler options. | ||
* These will be merged with options from the tsconfig if found. | ||
*/ | ||
compilerOptions: { | ||
module: 'es2015', | ||
}, | ||
}, | ||
/** Use a custom preprocess method by passing a function. */ | ||
pug({ content, filename }) { | ||
const code = pug.render(content) | ||
return { code, map: null } | ||
}, | ||
/** Add a custom language preprocessor */ | ||
customLanguage({ content, filename }) { | ||
const { code, map } = require('custom-language-compiler')(content) | ||
return { code, map } | ||
}, | ||
} | ||
svelte.preprocess(input, preprocess(options)) | ||
``` | ||
## Limitations | ||
@@ -378,0 +386,0 @@ |
@@ -158,5 +158,5 @@ const ts = require('typescript') | ||
const fileDirectory = options.tsconfigDirectory || dirname(filename) | ||
const tsconfigPath = | ||
options.tsconfigPath || ts.findConfigFile(fileDirectory, ts.sys.fileExists) | ||
const basePath = tsconfigPath ? dirname(tsconfigPath) : process.cwd() | ||
const tsconfigFile = | ||
options.tsconfigFile || ts.findConfigFile(fileDirectory, ts.sys.fileExists) | ||
const basePath = tsconfigFile ? dirname(tsconfigFile) : process.cwd() | ||
@@ -173,4 +173,4 @@ let compilerOptionsJSON = Object.assign( | ||
if (tsconfigPath) { | ||
const { error, config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile) | ||
if (tsconfigFile) { | ||
const { error, config } = ts.readConfigFile(tsconfigFile, ts.sys.readFile) | ||
if (error) { | ||
@@ -177,0 +177,0 @@ throw new Error(formatDiagnostics(error, basePath)) |
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
399
41127