Skip to content

Commit

Permalink
zero
Browse files Browse the repository at this point in the history
  • Loading branch information
leungwensen committed Jul 20, 2016
1 parent d0dd538 commit 5e6c54e
Show file tree
Hide file tree
Showing 766 changed files with 7,218 additions and 90 deletions.
8 changes: 3 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env node

'use strict';
const path = require('path');

const _ = require('underscore');
const lang = require('zero-lang');
const commander = require('commander');

const pkg = require(path.resolve(__dirname, '../package.json'));

function list(val) {
return _.map(val.split(','), (item) => _.trim(item));
return lang.map(val.split(','), (item) => lang.trim(item));
}

// version
Expand Down Expand Up @@ -54,4 +53,3 @@ commander.parse(process.argv);
if (process.argv.length === 2) {
commander.outputHelp();
}

11 changes: 6 additions & 5 deletions bin/sync-icons.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/usr/bin/env node

const _ = require('underscore');
'use strict';
const lang = require('zero-lang');
const shelljs = require('shelljs');

const iconsMetaByName = require('../lib/const/icons-meta-by-name');

const workingDir = './temp';
const dist = './svg-icons';
const dist = './dist/svg';

if (!shelljs.test('-d', workingDir)) {
shelljs.mkdir(workingDir);
}

function syncIcons(meta) {
const name = meta.name;
const prefix = meta.prefix.replace(/\-$/, '');
const cwd = `${workingDir}/${name}`;
console.log(`[syncing...] ${name}`);
if (!shelljs.test('-d', cwd)) {
Expand All @@ -24,7 +25,7 @@ function syncIcons(meta) {
shelljs.exec(`cd ${cwd} && git pull && cd ../../`)
}
console.log(`[separating...] ${name}`);
shelljs.exec(`./bin/cli.js separate -s ${name} -o ${dist}/${name} ${cwd}`);
shelljs.exec(`./bin/cli.js separate -s ${name} -o ${dist}/${prefix} ${cwd}`);
}

const argv = process.argv;
Expand All @@ -37,6 +38,6 @@ if (argv.length === 3) {
console.error(`"${name}" icons is not supported!`);
}
} else {
_.each(iconsMetaByName, syncIcons);
lang.forIn(iconsMetaByName, syncIcons);
}

1 change: 1 addition & 0 deletions dist/sprite/symbol/anticon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/sprite/symbol/ei.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/sprite/symbol/fa.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/sprite/symbol/fi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/sprite/symbol/md.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/sprite/symbol/oi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/3-list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/add-folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/agent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-middle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-2-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/align-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/analysis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/anchor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/app-dashboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/app-pai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/app-worksheet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/area-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-bottom-dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-bottom-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-down-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-down.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-left-d-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-left-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-left.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-minus.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-reduce.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-right-d-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-right-l.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-right-o.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-right.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-rise.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-top-dot.svg
1 change: 1 addition & 0 deletions dist/svg/zero/arrow-top-l.svg
Loading

0 comments on commit 5e6c54e

Please sign in to comment.