add project builder
This commit is contained in:
parent
03d4fcde8b
commit
2f6bcc81af
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
*.tmp
|
||||
.DS_Store
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
node_modules
|
||||
*.css
|
||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 ecomfe
|
||||
|
||||
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.
|
@ -1,2 +1,6 @@
|
||||
fonteditor
|
||||
fonteditor 在线ttf字体编辑器
|
||||
==========
|
||||
|
||||
## release log:
|
||||
|
||||
1. 2014-10-7 ttf管理器发布
|
35
css/bootstrap.css
vendored
35
css/bootstrap.css
vendored
@ -1,35 +0,0 @@
|
||||
.modal-dialog {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.modal-header {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
background: #327EC0;
|
||||
color: #FFF;
|
||||
}
|
||||
.modal-header .close {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.modal-header .modal-title {
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
}
|
||||
.modal-footer {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.modal-body {
|
||||
min-height: 100px;
|
||||
}
|
||||
.modal-content {
|
||||
border-color: rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
122
css/common.css
122
css/common.css
@ -1,122 +0,0 @@
|
||||
.modal-dialog {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.modal-header {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
background: #327EC0;
|
||||
color: #FFF;
|
||||
}
|
||||
.modal-header .close {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.modal-header .modal-title {
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
}
|
||||
.modal-footer {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.modal-body {
|
||||
min-height: 100px;
|
||||
}
|
||||
.modal-content {
|
||||
border-color: rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
height: 100%;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
::-webkit-scrollbar-track,
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 999px;
|
||||
border: 5px solid transparent;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
min-height: 20px;
|
||||
background-clip: content-box;
|
||||
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
|
||||
}
|
||||
::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
}
|
||||
.navbar .btn {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.navbar > .btn:first-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
#export-btn {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
#export-btn .btn {
|
||||
margin: 0;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
width: 200px;
|
||||
top: 50px;
|
||||
bottom: 0;
|
||||
background: #FCFCFC;
|
||||
padding: 4px;
|
||||
border-right: 1px solid #DDD;
|
||||
}
|
||||
.main {
|
||||
margin-left: 200px;
|
||||
padding: 4px;
|
||||
padding-top: 50px;
|
||||
height: 100%;
|
||||
}
|
||||
.loading {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 30%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
.selection-range {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
border: 1px solid #CCC;
|
||||
background: rgba(222, 222, 222, 0.5);
|
||||
pointer-events: none;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
// fontface
|
||||
@font-face {
|
||||
font-family: 'fonteditor';
|
||||
src: url('../font/iconfont.ttf') format('truetype');
|
||||
src: url('../../font/iconfont.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.i-edit,
|
24
css/ico.css
24
css/ico.css
@ -1,24 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'fonteditor';
|
||||
src: url('../font/iconfont.ttf') format('truetype');
|
||||
}
|
||||
.i-edit,
|
||||
.i-del {
|
||||
display: inline-block;
|
||||
font-family: 'fonteditor';
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.1px;
|
||||
}
|
||||
.i-edit:hover,
|
||||
.i-del:hover {
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
}
|
||||
.i-edit:before {
|
||||
content: '\e605';
|
||||
}
|
||||
.i-del:before {
|
||||
content: '\e611';
|
||||
}
|
233
css/ttf.css
233
css/ttf.css
@ -1,233 +0,0 @@
|
||||
.modal-dialog {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.modal-header {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
background: #327EC0;
|
||||
color: #FFF;
|
||||
}
|
||||
.modal-header .close {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.modal-header .modal-title {
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
}
|
||||
.modal-footer {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.modal-body {
|
||||
min-height: 100px;
|
||||
}
|
||||
.modal-content {
|
||||
border-color: rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
.dropdown-menu a {
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
height: 100%;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
::-webkit-scrollbar-track,
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 999px;
|
||||
border: 5px solid transparent;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
min-height: 20px;
|
||||
background-clip: content-box;
|
||||
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
|
||||
}
|
||||
::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
}
|
||||
.navbar .btn {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.navbar > .btn:first-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
#export-btn {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
#export-btn .btn {
|
||||
margin: 0;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
width: 200px;
|
||||
top: 50px;
|
||||
bottom: 0;
|
||||
background: #FCFCFC;
|
||||
padding: 4px;
|
||||
border-right: 1px solid #DDD;
|
||||
}
|
||||
.main {
|
||||
margin-left: 200px;
|
||||
padding: 4px;
|
||||
padding-top: 50px;
|
||||
height: 100%;
|
||||
}
|
||||
.loading {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 30%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
.selection-range {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
border: 1px solid #CCC;
|
||||
background: rgba(222, 222, 222, 0.5);
|
||||
pointer-events: none;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fonteditor';
|
||||
src: url('../font/iconfont.ttf') format('truetype');
|
||||
}
|
||||
.i-edit,
|
||||
.i-del {
|
||||
display: inline-block;
|
||||
font-family: 'fonteditor';
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.1px;
|
||||
}
|
||||
.i-edit:hover,
|
||||
.i-del:hover {
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
}
|
||||
.i-edit:before {
|
||||
content: '\e605';
|
||||
}
|
||||
.i-del:before {
|
||||
content: '\e611';
|
||||
}
|
||||
.project .project-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.project .project-list {
|
||||
line-height: 24px;
|
||||
}
|
||||
.project .project-list div {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.project .project-list div:hover {
|
||||
background: #EFEFEF;
|
||||
}
|
||||
.project .project-list div:hover .i-del {
|
||||
display: block;
|
||||
}
|
||||
.project .project-list .i-del {
|
||||
float: right;
|
||||
display: none;
|
||||
}
|
||||
.glyf-list {
|
||||
padding-bottom: 1000000px;
|
||||
margin-bottom: -1000000px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.glyf-list > .glyf-item {
|
||||
float: left;
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
width: 86px;
|
||||
border: 1px solid #CCC;
|
||||
box-shadow: 1px 1px 1px #EEE;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.glyf-list > .glyf-item .unicode,
|
||||
.glyf-list > .glyf-item .name {
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
padding-left: 4px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.glyf-list > .glyf-item .unicode {
|
||||
color: green;
|
||||
border-top: 1px solid #CCC;
|
||||
}
|
||||
.glyf-list > .glyf-item .glyf {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin: 10px;
|
||||
}
|
||||
.glyf-list > .glyf-item .glyf .path {
|
||||
fill: green;
|
||||
}
|
||||
.glyf-list > .glyf-item .i-del,
|
||||
.glyf-list > .glyf-item .i-edit {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
display: none;
|
||||
}
|
||||
.glyf-list > .glyf-item .i-edit {
|
||||
right: 20px;
|
||||
}
|
||||
.glyf-list > .glyf-item:hover {
|
||||
background: #EFEFEF;
|
||||
}
|
||||
.glyf-list > .glyf-item:hover .path {
|
||||
fill: darkgreen;
|
||||
}
|
||||
.glyf-list > .glyf-item:hover .i-del,
|
||||
.glyf-list > .glyf-item:hover .i-edit {
|
||||
display: block;
|
||||
}
|
||||
.glyf-list > .compound .path {
|
||||
fill: lightgreen!important;
|
||||
}
|
||||
.glyf-list > .new .path {
|
||||
fill: blue!important;
|
||||
}
|
||||
.glyf-list > .selected {
|
||||
background: #EBFFC2!important;
|
||||
}
|
||||
.glyf-list.no-hover .glyf-item {
|
||||
pointer-events: none;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
@import './common.less';
|
||||
@import './util.less';
|
||||
@import './ico.less';
|
||||
@import './common/common.less';
|
||||
@import './common/util.less';
|
||||
@import './common/ico.less';
|
||||
|
||||
|
||||
.project {
|
||||
|
73
edp-build-config.js
Normal file
73
edp-build-config.js
Normal file
@ -0,0 +1,73 @@
|
||||
var path = require( 'path' );
|
||||
|
||||
exports.input = __dirname;
|
||||
exports.output = path.resolve(__dirname, './release');
|
||||
|
||||
|
||||
exports.getProcessors = function () {
|
||||
|
||||
|
||||
return [
|
||||
new LessCompiler( {
|
||||
files: ['css/ttf.less']
|
||||
}),
|
||||
|
||||
new CssCompressor({
|
||||
files: ['css/ttf.less'],
|
||||
compressOptions: {
|
||||
keepBreaks: false
|
||||
}
|
||||
}),
|
||||
|
||||
new ModuleCompiler( {
|
||||
configFile: './module.conf'
|
||||
}),
|
||||
|
||||
new JsCompressor({
|
||||
files: ['src/fonteditor/ttf/main.js']
|
||||
}),
|
||||
|
||||
// 清除冗余文件,比如`less`
|
||||
new OutputCleaner({
|
||||
files: [
|
||||
'css/common/*',
|
||||
'src/common/*',
|
||||
'src/editor/*',
|
||||
'src/editor/*/*',
|
||||
'src/editor/*/*/*',
|
||||
'src/graphics/*',
|
||||
'src/math/*',
|
||||
'src/render/*',
|
||||
'src/render/*/*',
|
||||
'src/render/*/*/*',
|
||||
'src/ttf/*',
|
||||
'src/ttf/*/*',
|
||||
'src/ttf/*/*/*',
|
||||
'src/fonteditor/dialog/*',
|
||||
'src/fonteditor/widget/*'
|
||||
]
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
exports.exclude = [
|
||||
".svn",
|
||||
"*.conf",
|
||||
"*.sh",
|
||||
"*.bat",
|
||||
"*.md",
|
||||
"demo",
|
||||
"agent/*",
|
||||
"mock",
|
||||
"test/*",
|
||||
"edp-*",
|
||||
"output",
|
||||
".DS_Store"
|
||||
];
|
||||
|
||||
exports.injectProcessor = function ( processors ) {
|
||||
for ( var key in processors ) {
|
||||
global[ key ] = processors[ key ];
|
||||
}
|
||||
};
|
||||
|
BIN
font/arial.ttf
BIN
font/arial.ttf
Binary file not shown.
BIN
font/icomoon.ttf
BIN
font/icomoon.ttf
Binary file not shown.
Binary file not shown.
8
module.conf
Normal file
8
module.conf
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"baseUrl": "src",
|
||||
"packages": [
|
||||
],
|
||||
"combine": {
|
||||
"fonteditor/ttf/main": 1
|
||||
}
|
||||
}
|
24
package.json
Normal file
24
package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "fonteditor",
|
||||
"version": "0.0.1",
|
||||
"description": "ttf font editor",
|
||||
"dependencies": {
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/kekee000/fonteditor.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kekee000/fonteditor/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "kekee000",
|
||||
"email": "kekee000@163.com"
|
||||
}
|
||||
],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
}
|
||||
}
|
@ -15,9 +15,10 @@ define(
|
||||
var project = require('../widget/project');
|
||||
var ProjectViewer = require('../widget/projectviewer');
|
||||
var TTFManager = require('../widget/ttfmanager');
|
||||
var program = require('../program');
|
||||
var string = require('common/string');
|
||||
var program = require('../widget/program');
|
||||
var clipboard = require('../widget/clipboard');
|
||||
|
||||
var string = require('common/string');
|
||||
|
||||
|
||||
var setting = {
|
||||
|
@ -19,7 +19,7 @@ define(
|
||||
*/
|
||||
data: {},
|
||||
|
||||
loading: require('./widget/loading')
|
||||
loading: require('./loading')
|
||||
};
|
||||
|
||||
return program;
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Loading…
x
Reference in New Issue
Block a user