Skip to content

Commit 1ffd0ed

Browse files
author
Your Name
committed
修复节点编译失败问题
1 parent 57b7754 commit 1ffd0ed

File tree

2,979 files changed

+790348
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,979 files changed

+790348
-149
lines changed

build/console/static/.bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory":"bower_components"
3+
}

build/console/static/app.conf.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"development": {
3+
"serverUrl": "/",
4+
"nodeServerUrl":"/nodeHttpServer/",
5+
"isDebug":true,
6+
"assetUrl":"app/",
7+
"PRODUCT_TYPE":"online",
8+
"COOKIE_CONFIG":{
9+
"path":"/",
10+
"domain":"localhost"
11+
},
12+
"WEBSOCKET_PORT":11204
13+
},
14+
"production": {
15+
"serverUrl": "../",
16+
"nodeServerUrl":"../nodeHttpServer/",
17+
"isDebug":false,
18+
"assetUrl":"",
19+
"PRODUCT_TYPE":"online",
20+
"COOKIE_CONFIG":{
21+
"path":"/",
22+
"domain":".eolinker.com"
23+
},
24+
"WEBSOCKET_PORT":1204
25+
},
26+
"test": {
27+
"serverUrl": "../",
28+
"nodeServerUrl":"../nodeHttpServer/",
29+
"isDebug":false,
30+
"assetUrl":"",
31+
"PRODUCT_TYPE":"online",
32+
"COOKIE_CONFIG":{
33+
"path":"/",
34+
"domain":".eolinker.com"
35+
},
36+
"WEBSOCKET_PORT":11204
37+
}
38+
}

build/console/static/bower.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "goku",
3+
"version": "1.0.0",
4+
"authors": [
5+
"广州银云信息科技有限公司 "
6+
],
7+
"description": "",
8+
"main": "",
9+
"moduleType": [],
10+
"license": "MIT",
11+
"homepage": "",
12+
"ignore": [
13+
"**/.*",
14+
"node_modules",
15+
"bower_components",
16+
"test",
17+
"tests"
18+
],
19+
"dependencies": {
20+
"angular-ui-router": "^0.4.0",
21+
"angular-resource": "^1.5.0",
22+
"oclazyload": "^1.0.9",
23+
"angular-md5": "^0.1.10"
24+
},
25+
"overrides": {}
26+
}

build/console/static/config.rb

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
require 'compass/import-once/activate'
2+
3+
4+
Encoding.default_external = Encoding.find('utf-8')
5+
# Require any additional compass plugins here.
6+
# bootstrap 已经包含normalize
7+
# require 'compass-normalize'
8+
# Set this to the root of your project when deployed:
9+
http_path = "/"
10+
# project_path = ""
11+
css_dir = ".tmp/serve/app"
12+
sass_dir = "src/app"
13+
images_dir = "src/assets/images"
14+
javascripts_dir = "src/app/"
15+
sprite_load_path = ["src/assets/images/sprite"]
16+
# You can select your preferred output style here (can be overridden via the command line):
17+
# output_style = :expanded or :nested or :compact or :compressed
18+
# output_style = :expanded
19+
# To enable relative paths to assets via compass helper functions. Uncomment:
20+
# relative_assets = true
21+
22+
# To disable debugging comments that display the original location of your selectors. Uncomment:
23+
# line_comments = false
24+
25+
26+
# If you prefer the indented syntax, you might want to regenerate this
27+
# project again passing --syntax sass, or you can uncomment this:
28+
# preferred_syntax = :sass
29+
# and then run:
30+
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
31+
sourcemap = true
32+
# 使用绝对路径方便调试http://sass-lang.com/documentation/file.SASS_REFERENCE.html#options
33+
sass_options = {:sourcemap => :file}

build/console/static/gulp/common.js

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
var gulp = require('gulp'),
2+
argv = require('minimist'),
3+
path = require('path'),
4+
config = require('./config'),
5+
$ = require('gulp-load-plugins')({
6+
pattern: ['gulp-*', 'event-stream', 'main-bower-files', 'uglify-save-license', 'del']
7+
}),
8+
gulpsync = $.sync(gulp),
9+
sass = require('gulp-sass'),
10+
replace = require('gulp-replace');
11+
let eoSetPointSrc = () => {
12+
let pointLangIsEn = argv(process.argv.slice(2)).en;
13+
if(pointLangIsEn){
14+
config.paths.src = '.tmp/enApp';
15+
config.vendor.base.dest='.tmp/enApp/app'
16+
}
17+
}
18+
gulp.task('dev-config', function () {
19+
eoSetPointSrc();
20+
return gulp.src('app.conf.json')
21+
.pipe($.ngConfig(config.modules.ConstantModuleName, {
22+
environment: 'development',
23+
createModule: false,
24+
wrap: true
25+
}))
26+
.pipe(gulp.dest(path.join(config.paths.src, '/app'))) //join() 方法用于把数组中的所有元素放入一个字符串。
27+
});
28+
gulp.task('prod-config', function () {
29+
eoSetPointSrc();
30+
return gulp.src('app.conf.json')
31+
.pipe($.ngConfig(config.modules.ConstantModuleName, {
32+
environment: 'production',
33+
createModule: false,
34+
wrap: true //生成闭包
35+
}))
36+
.pipe(gulp.dest(path.join(config.paths.src, '/app')))
37+
});
38+
gulp.task('test-config', function () {
39+
eoSetPointSrc();
40+
return gulp.src('app.conf.json')
41+
.pipe($.ngConfig(config.modules.ConstantModuleName, {
42+
environment: 'test',
43+
createModule: false,
44+
wrap: true //生成闭包
45+
}))
46+
.pipe(gulp.dest(path.join(config.paths.src, '/app')))
47+
});
48+
gulp.task('clean:dist', function () {
49+
$.del([path.join(config.paths.dist, '/')]);
50+
});
51+
52+
/**
53+
* [清理DIST,TEMP文件夹]
54+
*/
55+
56+
gulp.task('clean', function () {
57+
$.del([path.join(config.paths.dist, '/'), path.join(config.paths.tmp, '/')]);
58+
});
59+
60+
gulp.task('vendor', gulpsync.sync(['vendor:base']));
61+
62+
/**
63+
* [复制依赖文件]
64+
*/
65+
66+
gulp.task('vendor:base', function () {
67+
var jsFilter = $.filter('**/*.js', {
68+
restore: true
69+
}),
70+
cssFilter = $.filter('**/*.css', {
71+
restore: true
72+
});
73+
return gulp.src(config.vendor.base.source)
74+
.pipe($.expectFile(config.vendor.base.source))
75+
.pipe(jsFilter)
76+
.pipe($.concat(config.vendor.base.name + '.js'))
77+
.pipe(jsFilter.restore)
78+
.pipe(cssFilter)
79+
.pipe($.concat(config.vendor.base.name + '.scss'))
80+
.pipe(cssFilter.restore)
81+
.pipe(gulp.dest(config.vendor.base.dest));
82+
});
83+
84+
gulp.task('vendor:app', function () {
85+
86+
var jsFilter = $.filter('*.js', {
87+
restore: true
88+
}),
89+
cssFilter = $.filter('*.css', {
90+
restore: true
91+
});
92+
93+
return gulp.src(config.vendor.app.source, {
94+
base: 'bower_components'
95+
})
96+
.pipe($.expectFile(config.vendor.app.source))
97+
.pipe(jsFilter)
98+
.pipe(jsFilter.restore)
99+
.pipe(cssFilter)
100+
.pipe(cssFilter.restore)
101+
.pipe(gulp.dest(config.vendor.app.dest));
102+
103+
});
104+
105+
/**
106+
* [图片压缩]
107+
*/
108+
gulp.task('images', function () {
109+
return gulp.src([
110+
path.join(config.paths.src, '/assets/images/**/*'),
111+
path.join('!' + config.paths.src, '/assets/images/sprite/**/*')
112+
])
113+
.pipe($.imagemin({
114+
progressive: true,
115+
svgoPlugins: [{
116+
removeViewBox: false
117+
}],
118+
use: [$.imageminPngquant()]
119+
}))
120+
.pipe(gulp.dest(path.join(config.paths.dist, '/assets/images')));
121+
});
122+
123+
gulp.task('fonts', function () {
124+
125+
return gulp.src(config.vendor.base.source, {
126+
base: 'bower_components'
127+
})
128+
.pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}'))
129+
.pipe($.flatten())
130+
.pipe(gulp.dest(path.join(config.paths.dist, '/fonts/')));
131+
});
132+
133+
/**
134+
* [复制文件] 前端依赖库以及静态文件
135+
*/
136+
gulp.task('other:vendor', function () {
137+
return gulp.src([
138+
path.join(config.paths.src, '/vendor/**/*'),
139+
])
140+
.pipe($.filter(function (file) {
141+
return file.stat.isFile();
142+
}))
143+
.pipe(gulp.dest(path.join(config.paths.dist, '/vendor')));
144+
});
145+
gulp.task('other:libs:js', function () {
146+
return gulp.src([
147+
path.join(config.paths.src, '/libs/**/*.js')
148+
])
149+
.pipe($.filter(function (file) {
150+
return file.stat.isFile();
151+
}))
152+
// .pipe($.babel())
153+
.pipe($.stripDebug())
154+
.pipe($.uglify())
155+
.pipe(gulp.dest(path.join(config.paths.dist, '/libs')));
156+
});
157+
gulp.task('other:libs', ['other:libs:js'], function () {
158+
return gulp.src([
159+
path.join(config.paths.src, '/libs/**/*'),
160+
path.join('!' + config.paths.src, '/libs/**/*.js')
161+
])
162+
.pipe($.filter(function (file) {
163+
return file.stat.isFile();
164+
}))
165+
.pipe(gulp.dest(path.join(config.paths.dist, '/libs')));
166+
});
167+
gulp.task('other:assets', function () {
168+
return gulp.src([
169+
path.join(config.paths.src, '/app/assets/**/*')
170+
])
171+
.pipe($.filter(function (file) {
172+
return file.stat.isFile();
173+
}))
174+
.pipe(gulp.dest(path.join(config.paths.dist, '/assets')));
175+
});
176+
177+
178+
gulp.task('version:scar', function () {
179+
gulp.src([
180+
path.join(config.paths.src, '../version/*.md'),
181+
])
182+
.pipe(replace(/(position\s)([^\u4e00-\u9fa5].*)/g, function (match) {
183+
return match.replace(/position\s/, "position " + config.version.scar).replace(/\\/g, "/");
184+
}))
185+
.pipe(gulp.dest(path.join(config.paths.version, '/file')));
186+
});
187+
gulp.task('version:lethe', function () {
188+
gulp.src([
189+
path.join(config.paths.src, '../version/*.md'),
190+
])
191+
.pipe(replace(/(position\s)([^\u4e00-\u9fa5].*)/g, function (match) {
192+
return match.replace(/position\s/, "position " + config.version.lethe).replace(/\\/g, "/");
193+
}))
194+
.pipe(gulp.dest(path.join(config.paths.version, '/file')));
195+
});

build/console/static/gulp/config.js

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
'use strict';
2+
3+
var gutil = require('gulp-util');// node require 动态加载gulp-util
4+
5+
exports.paths = {//node export/module.exports(m.e优先级最高) 将函数、变量等导出,以使其它JavaScript脚本通过require()函数引入并使用
6+
src: 'src',
7+
enTmp:'.tmp/enApp',
8+
dist: 'dist',
9+
tmp: '.tmp',
10+
e2e: 'test_e2e',
11+
env:{
12+
13+
},
14+
version:'version'
15+
};
16+
exports.modules={
17+
ConstantModuleName:'eolinker',
18+
templateModuleName:'eolinker'
19+
}
20+
21+
/**
22+
* [依赖配置]
23+
*/
24+
exports.vendor = {
25+
// 程序启动依赖模块
26+
base: {
27+
source: require('../vendor.base.json'),
28+
dest: 'src/app',
29+
name: 'vendor'
30+
},
31+
32+
// 按需加载模块
33+
app: {
34+
source: require('../vendor.json'),
35+
dest: 'src/vendor'
36+
}
37+
};
38+
/**
39+
* [版本配置]
40+
*/
41+
exports.version = {
42+
scar:"file:///C:/eoLinker/cn-eo-ams",//scar
43+
lethe: "file:///F:/git/am_fe" //lethe
44+
};
45+
/**
46+
* 错误处理
47+
*/
48+
exports.errorHandler = function() {
49+
return function (err) {
50+
gutil.beep();/*# 发出滴声提示*/
51+
gutil.log(err.toString());/*# 输出错误信息*/
52+
}
53+
};
54+

0 commit comments

Comments
 (0)