texture_packer 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +10 -0
- data/lib/texture_packer/cli.rb +9 -7
- data/lib/texture_packer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4d2065f08c050b935e3e281bec79ef9c400f7ac09ab5f6165315cf92ad3301f
|
4
|
+
data.tar.gz: 8d652598b712fa0e6cc4c1b0cf4f4b48487e768ce1baa8cfcabd36844e0a8f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73f25630b2c54b98a320cbf73b17a84c31040622f4e8410ed6eb6508d985d32638f9b6ef24470c1bdbbafe1e08794994fb6ca7ba0d8176eaa81aadec881167c7
|
7
|
+
data.tar.gz: b98c8fbfda82ad0075bde66a5710edd19b3c1aa079316cefd864285b21a5f09f015ebab55b1196e6ca6c3fb0e2f3fd23092d284e32150ef97ce17afc56b16ae8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## Change Log
|
2
2
|
|
3
|
+
### [v1.7.0](https://github.com/khiav223577/texture_packer/compare/v1.6.3...v1.7.0) 2020/04/17
|
4
|
+
- [#20](https://github.com/khiav223577/texture_packer/pull/20) Make sure some selector ordered as specified (@khiav223577)
|
5
|
+
|
6
|
+
### [v1.6.3](https://github.com/khiav223577/texture_packer/compare/v1.6.2...v1.6.3) 2020/04/17
|
7
|
+
- [#19](https://github.com/khiav223577/texture_packer/pull/19) Fix: It will generate wrong scss where there is an image named `xxx-disabled-m` (@khiav223577)
|
8
|
+
|
3
9
|
### [v1.6.2](https://github.com/khiav223577/texture_packer/compare/v1.6.1...v1.6.2) 2020/04/14
|
4
10
|
- [#18](https://github.com/khiav223577/texture_packer/pull/18) Fix: it needs global mixins when split type is by i18n + mobile (@khiav223577)
|
5
11
|
|
data/README.md
CHANGED
@@ -5,3 +5,13 @@
|
|
5
5
|
[](https://rubygems.org/gems/texture_packer)
|
6
6
|
[](https://codeclimate.com/github/khiav223577/texture_packer)
|
7
7
|
[](https://codeclimate.com/github/khiav223577/texture_packer/coverage)
|
8
|
+
|
9
|
+
|
10
|
+
### Usage:
|
11
|
+
|
12
|
+
```
|
13
|
+
pack_scss [options]
|
14
|
+
-v, --version show the version number
|
15
|
+
-h, --help Prints this help
|
16
|
+
-p, --project_dir=PATH Copy the generated scss files / images to specified project
|
17
|
+
```
|
data/lib/texture_packer/cli.rb
CHANGED
@@ -37,18 +37,20 @@ class TexturePacker::Cli
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
def calculate_split_type
|
41
|
+
case
|
42
|
+
when File.exist?('packed_tw_m.css') ; return TexturePacker::SPLIT_BY_I18N_AND_MOBILE
|
43
|
+
when File.exist?('packed_m.css') ; return TexturePacker::SPLIT_BY_MOBILE
|
44
|
+
when File.exist?('packed_tw.css') ; return TexturePacker::SPLIT_BY_I18N
|
45
|
+
end
|
46
|
+
end
|
46
47
|
|
48
|
+
def create_packer
|
47
49
|
# 由路徑計算 class 名字
|
48
50
|
dir_name = File.expand_path(Dir.pwd).gsub(%r{.*/Texture-Packer/.*?/(.*)}, '\1')
|
49
51
|
|
50
52
|
content = output_paths_mapping.map{|_, path| File.read("#{path}.css") }.join
|
51
|
-
return TexturePacker.new(dir_name, output_paths_mapping, content,
|
53
|
+
return TexturePacker.new(dir_name, output_paths_mapping, content, calculate_split_type)
|
52
54
|
end
|
53
55
|
|
54
56
|
def output_paths_mapping
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texture_packer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khiav reoy
|
8
8
|
autorequire:
|
9
9
|
bindir: executables
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|