Skip to content
Permalink
Browse files

Build: Added SVG placeholder icons

Closes gh-32
  • Loading branch information
MichaelArestad authored and arschmitz committed Jan 10, 2015
1 parent 92948f7 commit e5bb2ab771fe643f0eb501c8f17217cf2a2a7f34
Showing with 124 additions and 46 deletions.
  1. +2 −0 .gitignore
  2. +56 −0 Gruntfile.js
  3. +6 −0 icons/svg-source/circle.svg
  4. +6 −0 icons/svg-source/square.svg
  5. +6 −0 icons/svg-source/triangle.svg
  6. +48 −46 package.json
@@ -1,6 +1,8 @@
# Files
npm-debug.log
icons/icons.svg

# Folders
bower_components/
node_modules/
icons/svg-min/
@@ -3,6 +3,9 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks( "grunt-html" );
grunt.loadNpmTasks( "grunt-jscs" );
grunt.loadNpmTasks( "grunt-svgmin" );
grunt.loadNpmTasks( "grunt-svgstore" );
grunt.loadNpmTasks( "grunt-contrib-watch" );

grunt.initConfig({
jshint: {
@@ -13,6 +16,59 @@ grunt.initConfig({
},
jscs: {
all: [ "*.js" ]
},

// Minifies SVGs
svgmin: {
options: {
plugins: [
{
removeViewBox: false
}, {
removeUselessStrokeAndFill: false
}
]
},
dist: {
files: [ {
expand: true,
cwd: "icons/svg-source",
src: [ "*.svg" ],
dest: "icons/svg-min/",
ext: ".svg"
} ]
}
},

// Combines SVGs into single file
svgstore: {
defaults: {
options: {

// This will prefix each ID
prefix: "icon-",

// Adds attributes to the resulting SVG
svg: {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg"
},
cleanup: [ "style", "fill", "id" ]
},
files: {
"icons/icons.svg": [ "icons/svg-min/*.svg" ]
}
}
},

watch: {
svg: {
files: [ "svg-source/**/*.svg" ],
tasks: [ "svgmin", "svgstore" ],
options: {
spawn: false
}
}
}
});

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<circle cx="12" cy="12" r="10"/>
</svg>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<rect x="3" y="3" width="18" height="18"/>
</svg>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<polygon points="12,1.9 17.5,11.5 23,21 12,21 1,21 6.5,11.5 "/>
</svg>
@@ -1,48 +1,50 @@
{
"name": "css-chassis",
"title": "Chassis",
"description": "An attempt at creating open standards designed for CSS libraries, JavaScript UI libraries, and web developers in general",
"version": "0.0.1-pre",
"author": {
"name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/css-chassis/blob/master/AUTHORS.txt"
},
"maintainers": [
{
"name": "Sarah Frisk",
"email": "sarah@sarahfrisk.net",
"url": "http://sarahfrisk.net"
},
{
"name": "Alexander Schmitz",
"email": "arschmitz@gmail.com",
"url": "http://arschmitz.me"
},
{
"name": "Chris Bracco",
"email": "chris@cbracco.me",
"url": "http://cbracco.me"
}

],
"repository": {
"type": "git",
"url": "git://github.com/jquery/css-chassis.git"
},
"bugs": "http://github.com/jquery/css-chassis/issues/",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/jquery/css-chassis/blob/master/LICENSE.txt"
}
],
"dependencies": {},
"devDependencies": {
"commitplease": "2.0.0",
"grunt": "0.4.2",
"grunt-contrib-jshint": "0.10.0",
"grunt-git-authors": "2.0.0",
"grunt-jscs": "0.6.2"
},
"keywords": []
"name": "css-chassis",
"title": "Chassis",
"description": "An attempt at creating open standards designed for CSS libraries, JavaScript UI libraries, and web developers in general",
"version": "0.0.1-pre",
"author": {
"name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/css-chassis/blob/master/AUTHORS.txt"
},
"maintainers": [
{
"name": "Sarah Frisk",
"email": "sarah@sarahfrisk.net",
"url": "http://sarahfrisk.net"
},
{
"name": "Alexander Schmitz",
"email": "arschmitz@gmail.com",
"url": "http://arschmitz.me"
},
{
"name": "Chris Bracco",
"email": "chris@cbracco.me",
"url": "http://cbracco.me"
}
],
"repository": {
"type": "git",
"url": "git://github.com/jquery/css-chassis.git"
},
"bugs": "http://github.com/jquery/css-chassis/issues/",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/jquery/css-chassis/blob/master/LICENSE.txt"
}
],
"dependencies": {},
"devDependencies": {
"commitplease": "2.0.0",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-git-authors": "2.0.0",
"grunt-jscs": "0.6.2",
"grunt-svgmin": "^2.0.0",
"grunt-svgstore": "^0.5.0"
},
"keywords": []
}

0 comments on commit e5bb2ab

Please sign in to comment.
You can’t perform that action at this time.