-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix some bug
- Loading branch information
Showing
27 changed files
with
372 additions
and
164 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,5 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "4.3.1" | ||
- "4.0.0" | ||
after_success: | ||
- npm run cover |
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
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,12 +1,11 @@ | ||
const rimraf = require('rimraf'); | ||
const async = require('async'); | ||
|
||
module.exports = function (config) { | ||
module.exports = function (config, callback) { | ||
callback = callback || function() {}; | ||
|
||
async.each([ | ||
config.dest, | ||
config.server.dir | ||
], rimraf, function (err) { | ||
if (err) return console.log(err); | ||
console.log('[DONE] clear.'); | ||
}); | ||
config._DEST_ROOT, | ||
config._SERVER_ROOT | ||
], rimraf, callback); | ||
}; |
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,3 @@ | ||
module.exports = function(config) { | ||
console.log('release processor'); | ||
return 'to be done.'; | ||
}; |
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
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,6 +1,6 @@ | ||
{ | ||
"name": "wooo", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "keelii <[email protected]>", | ||
"description": "FE Build tool with easy cli.", | ||
"license": "MIT", | ||
|
@@ -12,10 +12,13 @@ | |
"bin": { | ||
"wo": "index.js" | ||
}, | ||
"engines": { | ||
"node": ">=4.0.0" | ||
}, | ||
"scripts": { | ||
"prepublish": "", | ||
"cover": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && ./node_modules/.bin/codecov", | ||
"test": "./node_modules/.bin/mocha test/main.js --reporter spec" | ||
"test": "./node_modules/.bin/mocha test/test.js --reporter spec" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -36,14 +39,15 @@ | |
"nunjucks": "^2.3.0", | ||
"rimraf": "^2.5.2", | ||
"spritesmith": "^3.1.0", | ||
"static-http-server": "0.0.4", | ||
"static-http-server": "0.0.5", | ||
"uglify-js": "^2.6.1", | ||
"vinyl-fs": "^2.3.1", | ||
"vinyl-ftp": "^0.4.5" | ||
}, | ||
"devDependencies": { | ||
"codecov": "^1.0.1", | ||
"istanbul": "^0.4.2", | ||
"mocha": "^2.4.5" | ||
"mocha": "^2.4.5", | ||
"request": "^2.69.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
.sprite-1 { | ||
width: 21px; | ||
height: 21px; | ||
background-image: url(i/__sprite.png); | ||
background-position: -0px -0px; | ||
} | ||
.sprite-2 { | ||
width: 21px; | ||
height: 21px; | ||
background-image: url(i/__sprite.png); | ||
background-position: -21px -0px; | ||
} | ||
.sprite-3 { | ||
width: 21px; | ||
height: 21px; | ||
background-image: url(i/__sprite.png); | ||
background-position: -0px -21px; | ||
} |
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,103 @@ | ||
/* | ||
SCSS variables are information about icon's compiled state, stored under its original file name | ||
.icon-home { | ||
width: $icon-home-width; | ||
} | ||
The large array-like variables contain all information about a single icon | ||
$icon-home: x y offset_x offset_y width height total_width total_height image_path; | ||
At the bottom of this section, we provide information about the spritesheet itself | ||
$spritesheet: width height image $spritesheet-sprites; | ||
*/ | ||
$sprite-1-name: 'sprite-1'; | ||
$sprite-1-x: 0px; | ||
$sprite-1-y: 0px; | ||
$sprite-1-offset-x: 0px; | ||
$sprite-1-offset-y: 0px; | ||
$sprite-1-width: 21px; | ||
$sprite-1-height: 21px; | ||
$sprite-1-total-width: 42px; | ||
$sprite-1-total-height: 42px; | ||
$sprite-1-image: 'i/_sprite.png'; | ||
$sprite-1: (0px, 0px, 0px, 0px, 21px, 21px, 42px, 42px, 'i/_sprite.png', 'sprite-1', ); | ||
$sprite-2-name: 'sprite-2'; | ||
$sprite-2-x: 21px; | ||
$sprite-2-y: 0px; | ||
$sprite-2-offset-x: -21px; | ||
$sprite-2-offset-y: 0px; | ||
$sprite-2-width: 21px; | ||
$sprite-2-height: 21px; | ||
$sprite-2-total-width: 42px; | ||
$sprite-2-total-height: 42px; | ||
$sprite-2-image: 'i/_sprite.png'; | ||
$sprite-2: (21px, 0px, -21px, 0px, 21px, 21px, 42px, 42px, 'i/_sprite.png', 'sprite-2', ); | ||
$sprite-3-name: 'sprite-3'; | ||
$sprite-3-x: 0px; | ||
$sprite-3-y: 21px; | ||
$sprite-3-offset-x: 0px; | ||
$sprite-3-offset-y: -21px; | ||
$sprite-3-width: 21px; | ||
$sprite-3-height: 21px; | ||
$sprite-3-total-width: 42px; | ||
$sprite-3-total-height: 42px; | ||
$sprite-3-image: 'i/_sprite.png'; | ||
$sprite-3: (0px, 21px, 0px, -21px, 21px, 21px, 42px, 42px, 'i/_sprite.png', 'sprite-3', ); | ||
$spritesheet-width: 42px; | ||
$spritesheet-height: 42px; | ||
$spritesheet-image: 'i/_sprite.png'; | ||
$spritesheet-sprites: ($sprite-1, $sprite-2, $sprite-3, ); | ||
$spritesheet: (42px, 42px, 'i/_sprite.png', $spritesheet-sprites, ); | ||
|
||
/* | ||
The provided mixins are intended to be used with the array-like variables | ||
.icon-home { | ||
@include sprite-width($icon-home); | ||
} | ||
.icon-email { | ||
@include sprite($icon-email); | ||
} | ||
*/ | ||
@mixin sprite-width($sprite) { | ||
width: nth($sprite, 5); | ||
} | ||
|
||
@mixin sprite-height($sprite) { | ||
height: nth($sprite, 6); | ||
} | ||
|
||
@mixin sprite-position($sprite) { | ||
$sprite-offset-x: nth($sprite, 3); | ||
$sprite-offset-y: nth($sprite, 4); | ||
background-position: $sprite-offset-x $sprite-offset-y; | ||
} | ||
|
||
@mixin sprite-image($sprite) { | ||
$sprite-image: nth($sprite, 9); | ||
background-image: url(#{$sprite-image}); | ||
} | ||
|
||
@mixin sprite($sprite) { | ||
@include sprite-image($sprite); | ||
@include sprite-position($sprite); | ||
@include sprite-width($sprite); | ||
@include sprite-height($sprite); | ||
} | ||
|
||
/* | ||
The `sprites` mixin generates identical output to the CSS template | ||
but can be overridden inside of SCSS | ||
@include sprites($spritesheet-sprites); | ||
*/ | ||
@mixin sprites($sprites) { | ||
@each $sprite in $sprites { | ||
$sprite-name: nth($sprite, 10); | ||
.#{$sprite-name} { | ||
@include sprite($sprite); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.