This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
273 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"extends": "airbnb/legacy", | ||
"extends": "airbnb-base/legacy", | ||
"root": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.sublime-* | ||
.nyc_output | ||
coverage | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.sublime-* | ||
.eslintrc | ||
.gitignore | ||
.npmignore | ||
.nyc_output | ||
.travis.yml | ||
appveyor.yml | ||
coverage | ||
media | ||
npm-debug.log | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
# Change log | ||
|
||
## 4.2.0 | ||
**Features:** | ||
|
||
* Add `cache` option to cache resolved dimensions (https://github.com/borodean/postcss-assets/pull/73). | ||
|
||
## 4.1.0 | ||
**Features:** | ||
|
||
* `relative` option supports what `relativeTo` option did in 3.x: if a string is passed, paths are generated relatively to a path in that string. A behavior of relating to input files by passing `true` is kept untouched. | ||
|
||
**Under the hood:** | ||
|
||
* Code updated to match [Airbnb code style](https://github.com/airbnb/javascript). | ||
* Tests converted to ES6 syntax. | ||
|
||
## 4.0.1 | ||
**Bugfixes** | ||
- Works fine with no options provided (https://github.com/assetsjs/postcss-assets/issues/45). | ||
|
||
## 4.0.0 | ||
**Breaking** | ||
- Removes `relativeTo` option, introduces `relative` one. | ||
|
||
There is no need to specify a particular file to relate to anymore - set `relative` to `true` and Assets would resolve URLs relatively to the current CSS file. | ||
|
||
This solves the issue when you have stylesheets in different folders and want relative paths — previously there was an option to relate only to a single directory. | ||
|
||
(https://github.com/assetsjs/postcss-assets/issues/42) | ||
|
||
**Features** | ||
- Load paths now accept globs: | ||
|
||
```js | ||
var options = { loadPaths: ['images', 'assets/**/img'] }; | ||
``` | ||
|
||
(https://github.com/assetsjs/postcss-assets/issues/40) | ||
|
||
- Load paths now also accept single strings: | ||
|
||
```js | ||
var options = { loadPaths: 'assets/**/img' }; | ||
``` | ||
|
||
**Bugfixes** | ||
- Really fixes the SVG rendering on Internet Explorer. | ||
- SCSS flags are preserved (https://github.com/assetsjs/postcss-assets/issues/43). | ||
- No more funky file names in the repo to make Windows archiver happy (https://github.com/assetsjs/postcss-assets/issues/35). | ||
- Allows numbers to be returned from the cachebuster function. | ||
|
||
**Under the hood** | ||
- Coverage hits 100%. | ||
- Automated tests against the latest stable nodejs, v0.12 and v4. | ||
- Builds are automatically tested on Windows by [AppVeyor](https://ci.appveyor.com/project/borodean/postcss-assets). | ||
- Switches tests from Mocha to [AVA](https://github.com/sindresorhus/ava). | ||
- Uses [Calipers](https://github.com/calipersjs/calipers) for image measurement instead of image-size. | ||
- Replaces custom function mapper with [postcss-functions](https://github.com/andyjansson/postcss-functions). | ||
- Extracts assets processing logic to the [Assets](https://github.com/assetsjs/assets) module. | ||
- Cleans up dependencies. | ||
|
||
## 3.0.3 | ||
**Bugfixes** | ||
- no longer uses private `image-size` fork, so properly installs on Windows (https://github.com/borodean/postcss-assets/pull/30, https://github.com/borodean/postcss-assets/issues/32); | ||
- properly calculates dimensions of SVGs with percentage values of `width`/`height` attributes (https://github.com/borodean/postcss-assets/issues/33). | ||
|
||
## 3.0.2 | ||
**Bugfixes** | ||
* IE understands generated SVG (https://github.com/borodean/postcss-assets/issues/24). | ||
|
||
## 3.0.1 | ||
**Bugfixes** | ||
- Preserves Microsoft filters (https://github.com/borodean/postcss-assets/issues/27). | ||
|
||
**Under the hood** | ||
- Uses ESLint instead of JSHint/JSCS. | ||
|
||
## 3.0.0 | ||
**API updates** | ||
* better PostCSS 5.0 API conformance (https://github.com/borodean/postcss-assets/issues/25). | ||
|
||
## 2.1.4 | ||
Since private `image-size` fork was removed, releases 2.1.0—3.0.2 has stopped working. While 3.0.3 release fixes this for the 3.0.x versions, this release is fixing the same for the 2.1.x. | ||
|
||
**Bugfixes** | ||
- no longer uses private `image-size` fork (https://github.com/borodean/postcss-assets/issues/37) | ||
|
||
## 2.1.3 | ||
**Bugfixes** | ||
- better PostCSS plugin API conformance (https://github.com/borodean/postcss-assets/pull/21). This allows plugin to be used with Webpack. | ||
|
||
## 2.1.2 | ||
**Under the hood** | ||
* [PostCSS Plugin Guidelines](https://github.com/postcss/postcss/blob/master/docs/guidelines/plugin.md) conformance (https://github.com/borodean/postcss-assets/issues/20); | ||
* continious integration tests on both Node.js and io.js; | ||
* shows coverage statistics on the repository page. | ||
|
||
## 2.1.1 | ||
**Bugfixes** | ||
- fix path separator handling on Windows (https://github.com/borodean/postcss-assets/issues/19). | ||
|
||
**Under the hood** | ||
- covers 99% of the code; | ||
- explains code with comments. | ||
|
||
## 2.1.0 | ||
**API updates** | ||
- extends cachebuster to support modifying the filename (https://github.com/borodean/postcss-assets/pull/17, [docs](https://github.com/borodean/postcss-assets#cachebuster)). | ||
|
||
**Bugfixes** | ||
- uses [forked version of image-size](https://github.com/borodean/image-size) to support viewbox-only svgs; | ||
- properly encodes some tricky SVG files (https://github.com/borodean/postcss-assets/pull/18). | ||
|
||
**Under the hood** | ||
- uses [Gulp](http://gulpjs.com/) for development routines; | ||
- validates code style with [JSHint](http://jshint.com/) and [JSCS](http://jscs.info/). | ||
|
||
## 2.0.0 | ||
**API updates** | ||
- Renames `url()` function to `resolve()` https://github.com/borodean/postcss-assets/issues/13 | ||
- Resolves assets relative to the source file https://github.com/borodean/postcss-assets/issues/7 | ||
- Starts throwing errors instead of warnings https://github.com/borodean/postcss-assets/issues/8 | ||
- Fixes a bug when complex URL declarations were crashing Gonzales https://github.com/borodean/postcss-assets/issues/15 | ||
|
||
**Under the hood** | ||
- Tests with Mocha/Chai instead of Tape https://github.com/borodean/postcss-assets/issues/12 | ||
- Updates dependencies upto the latest versions | ||
|
||
## 1.1.4 | ||
Allows to use common PostCSS plugin API (https://github.com/borodean/postcss-assets/issues/6) | ||
Fixes quotes when inlining SVG (https://github.com/borodean/postcss-assets/pull/14) | ||
|
||
## 1.1.3 | ||
Base64-encodes with Buffer. | ||
|
||
## 1.1.2 | ||
Cachebuster recognizes resolved paths. | ||
|
||
## 1.1.1 | ||
Uses PostCSS 4.0. | ||
|
||
## 1.1.0 | ||
Introduces [cachebuster](https://github.com/borodean/postcss-assets#cachebuster). | ||
|
||
## 1.0.0 | ||
* [`width`, `height` and `size` functions][1] are introduced to measure image dimesions with high density pixels support; | ||
* [`inline` function][2] introduced to inline files; | ||
* `url` function automagic is removed; | ||
* `inline.maxSize` option is removed; | ||
* all modifiers are removed. | ||
[1]: https://github.com/borodean/postcss-assets/tree/3168ab2b07cf537240ecc20e0eb7688434987614#image-dimensions | ||
[2]: https://github.com/borodean/postcss-assets/tree/3168ab2b07cf537240ecc20e0eb7688434987614#inlining-files | ||
|
||
## 0.9.1 | ||
Inlines SVG as UTF-8, not Base64. | ||
|
||
## 0.9.0 | ||
Hello, world. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var fs = require('fs'); | ||
|
||
module.exports = function generateFileUniqueId(resolvedPath) { | ||
var mtime = fs.statSync(resolvedPath).mtime; | ||
return mtime.getTime().toString(16); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "postcss-assets", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "PostCSS plugin to manage assets", | ||
"keywords": [ | ||
"assets", | ||
|
@@ -13,29 +13,38 @@ | |
"size", | ||
"url" | ||
], | ||
"bugs": "https://github.com/assetsjs/assets/issues", | ||
"license": "MIT", | ||
"author": "Vadym Borodin <[email protected]> (http://borodean.com)", | ||
"contributors": [ | ||
"Alexey Plutalov <[email protected]> (https://twitter.com/demiazz)", | ||
"Andrey Sitnik <[email protected]> (http://sitnik.ru)", | ||
"Dave Clayton <[email protected]> (http://www.dave78.com)", | ||
"Alexey Plutalov (https://github.com/demiazz)", | ||
"Andrey Sitnik (https://github.com/ai)", | ||
"Dave Clayton (https://github.com/davedx)", | ||
"Ivan Vlasenko (https://github.com/avanes)", | ||
"Pascal Duez (http://pascalduez.me)" | ||
"Liucw (https://github.com/booxood)", | ||
"Pascal Duez (https://github.com/pascalduez)" | ||
], | ||
"main": "./lib", | ||
"repository": "assetsjs/postcss-assets", | ||
"scripts": { | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js" | ||
}, | ||
"dependencies": { | ||
"assets": "^2.0.0", | ||
"postcss": "^5.0.12", | ||
"assets": "^2.1.0", | ||
"bluebird": "^3.5.0", | ||
"postcss": "^5.2.0", | ||
"postcss-functions": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.13.0", | ||
"eslint": "^2.5.3", | ||
"eslint-config-airbnb": "^6.2.0", | ||
"nyc": "^6.1.1" | ||
"ava": "^0.16.0", | ||
"coveralls": "^2.11.13", | ||
"eslint": "^2.13.1", | ||
"eslint-config-airbnb-base": "^3.0.1", | ||
"eslint-plugin-import": "^1.7.0", | ||
"nyc": "^8.3.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"extends": "airbnb/base" | ||
"extends": "airbnb-base", | ||
"rules": { | ||
"import/no-extraneous-dependencies": "off" | ||
} | ||
} |
Oops, something went wrong.