-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from isleofcode/feat-0.1
Feat 0.1
- Loading branch information
Showing
10 changed files
with
292 additions
and
138 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2016 Isle of Code Inc | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 +1,57 @@ | ||
#ALEX TODO WRITE ME PLS | ||
#Splicon (0.1) | ||
|
||
Splicon is a command tool for automagically generating icons & | ||
splash screens for Cordova applications from a single svg, and updating config.xml. | ||
|
||
There is a cli, but can be included in other libraries. It was | ||
originally built for use in [ember-cordova](https://github.com/isleofcode/ember-cordova). | ||
|
||
##Icons | ||
|
||
For an integration example, see [ember-cordovas make-icon command](https://github.com/isleofcode/ember-cordova/tree/master/lib/commands/make-icons.js). | ||
|
||
Using the cli, from your cordova project, simply run: | ||
|
||
``` | ||
splicon-icons | ||
``` | ||
|
||
This command will: | ||
|
||
1. Look for a file called 'icon.svg'; | ||
2. Resize the SVG for each required platform/icon combination; | ||
3. Move the icons to res/icons/platformName (and create the dir if it | ||
does not exist); | ||
4. Update your config.xml to represent the new icons & paths; | ||
5. Ensure there are no duplicate icon nodes in config.xml; | ||
|
||
By default, all platforms will be generated. You can pass the platforms | ||
you would like generated as arguments: | ||
|
||
``` | ||
splicon icons ios android windows | ||
``` | ||
|
||
For more granular control (such as setting the destination path), you | ||
will need to require lib/icon-task and run the function yourself. | ||
|
||
There is a TODO to enhance cli flag, but in most cases this is handled in [ember-cordova](https://github.com/isleofcode/ember-cordova). | ||
|
||
##Splash | ||
Not done yet, nearly there. | ||
|
||
##Testing | ||
A test suite is being implemented by Jordan Yee. | ||
|
||
##Contributing | ||
|
||
PRs are very welcome. You can read our style guides [here](https://github.com/isleofcode/style-guide). | ||
|
||
If you are unsure about your contribution idea, please feel free to | ||
open an Issue for feedback. | ||
|
||
##Credits | ||
|
||
ember-cordova is maintained by [Isle of Code](https://isleofcode.com). | ||
The library was written by Alex Blom, based on different half-baked | ||
build tools by Chris Thoburn and Alex Blom. |
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 |
---|---|---|
@@ -1,47 +1,59 @@ | ||
/* jshint node:true, esversion: 6 */ | ||
|
||
module.exports = { | ||
ios: [ | ||
{ size : 40, name : 'icon-40' }, | ||
{ size : 80, name : 'icon-40@2x' }, | ||
{ size : 120, name : 'icon-40@3x' }, | ||
{ size : 60, name : 'icon-60' }, | ||
{ size : 120, name : 'icon-60@2x' }, | ||
{ size : 180, name : 'icon-60@3x' }, | ||
{ size : 57, name : 'icon' }, | ||
{ size : 114, name : 'icon@2x' }, | ||
{ size : 29, name : 'icon-small' }, | ||
{ size : 58, name : 'icon-small@2x' }, | ||
{ size : 87, name : 'icon-small@3x' }, | ||
{ size : 152, name : 'icon-76@2x' }, | ||
{ size : 76, name : 'icon-76' }, | ||
{ size : 72, name : 'icon-72' }, | ||
{ size : 144, name : 'icon-72@2x' }, | ||
{ size : 50, name : 'icon-50' }, | ||
{ size : 100, name : 'icon-50@2x' } | ||
], | ||
ios: { | ||
itemKey: 'width', | ||
items: [ | ||
{ size : 40, name : 'icon-40' }, | ||
{ size : 80, name : 'icon-40@2x' }, | ||
{ size : 120, name : 'icon-40@3x' }, | ||
{ size : 60, name : 'icon-60' }, | ||
{ size : 120, name : 'icon-60@2x' }, | ||
{ size : 180, name : 'icon-60@3x' }, | ||
{ size : 57, name : 'icon' }, | ||
{ size : 114, name : 'icon@2x' }, | ||
{ size : 29, name : 'icon-small' }, | ||
{ size : 58, name : 'icon-small@2x' }, | ||
{ size : 87, name : 'icon-small@3x' }, | ||
{ size : 152, name : 'icon-76@2x' }, | ||
{ size : 76, name : 'icon-76' }, | ||
{ size : 72, name : 'icon-72' }, | ||
{ size : 144, name : 'icon-72@2x' }, | ||
{ size : 50, name : 'icon-50' }, | ||
{ size : 100, name : 'icon-50@2x' } | ||
] | ||
}, | ||
|
||
android: [ | ||
{ size : 36, name : 'ldpi' }, | ||
{ size : 48, name : 'mdpi' }, | ||
{ size : 72, name : 'hdpi' }, | ||
{ size : 96, name : 'xhdpi' }, | ||
{ size : 144, name : 'xxhdpi' }, | ||
{ size : 192, name : 'xxxhdpi' } | ||
], | ||
android: { | ||
itemKey: 'density', | ||
items: [ | ||
{ size : 36, name : 'ldpi' }, | ||
{ size : 48, name : 'mdpi' }, | ||
{ size : 72, name : 'hdpi' }, | ||
{ size : 96, name : 'xhdpi' }, | ||
{ size : 144, name : 'xxhdpi' }, | ||
{ size : 192, name : 'xxxhdpi' } | ||
] | ||
}, | ||
|
||
blackberry: [ | ||
{ size : 86, name : 'icon-86' }, | ||
{ size : 150, name : 'icon-150' }, | ||
], | ||
blackberry: { | ||
itemKey: 'src', | ||
items: [ | ||
{ size : 86, name : 'icon-86' }, | ||
{ size : 150, name : 'icon-150' } | ||
] | ||
}, | ||
|
||
windows: [ | ||
{ size : 50, name : 'StoreLogo' }, | ||
{ size : 30, name : 'smalllogo', attrs: { target : 'Square30x30Logo' }}, | ||
{ size : 44, name : 'Square44x44Logo' }, | ||
{ size : 70, name : 'Square70x70Logo' }, | ||
{ size : 71, name : 'Square71x71Logo' }, | ||
{ size : 150, name : 'Square150x150Logo' }, | ||
{ size : 310, name : 'Square310x310Logo' } | ||
] | ||
windows: { | ||
itemKey: 'width', | ||
items: [ | ||
{ size : 50, name : 'StoreLogo' }, | ||
{ size : 30, name : 'smalllogo', attrs: { target : 'Square30x30Logo' }}, | ||
{ size : 44, name : 'Square44x44Logo' }, | ||
{ size : 70, name : 'Square70x70Logo' }, | ||
{ size : 71, name : 'Square71x71Logo' }, | ||
{ size : 150, name : 'Square150x150Logo' }, | ||
{ size : 310, name : 'Square310x310Logo' } | ||
] | ||
} | ||
}; |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"bin": { | ||
"splicon": "bin/cordova-icons.js" | ||
"splicon-icons": "bin/splicon-icons.js" | ||
}, | ||
"keywords": [ | ||
"cordova", | ||
|
@@ -20,6 +20,17 @@ | |
"email": "[email protected]", | ||
"url": "https://isleofcode.com" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Chris Thoburn", | ||
"email": "[email protected]", | ||
"url": "https://isleofcode.com" | ||
}, { | ||
"name": "Jordan Yee", | ||
"email": "[email protected]", | ||
"url": "https://isleofcode.com" | ||
} | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"chalk": "^0.4.0", | ||
|
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
Oops, something went wrong.