Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-pack
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-pack
Commits
f13ae869
Commit
f13ae869
authored
Mar 27, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
压缩代码抛出错误
parent
4d6d677e
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
19 deletions
+27
-19
index.es.js
dist/index.es.js
+6
-4
index.es.js.map
dist/index.es.js.map
+1
-1
index.js
dist/index.js
+6
-4
index.js.map
dist/index.js.map
+1
-1
index.umd.js
dist/index.umd.js
+6
-4
index.umd.js.map
dist/index.umd.js.map
+1
-1
code-process.js
src/code-process.js
+6
-4
No files found.
dist/index.es.js
View file @
f13ae869
...
@@ -8,9 +8,9 @@ import { generateLibraryScriptEl, generateJsScriptEl, fillTemplate } from 'zeroi
...
@@ -8,9 +8,9 @@ import { generateLibraryScriptEl, generateJsScriptEl, fillTemplate } from 'zeroi
*/
*/
async
function
compile
(
source
,
debug
=
false
)
{
async
function
compile
(
source
,
debug
=
false
)
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{}
}
});
});
const
result
=
{
const
result
=
{
code
:
output
.
outputText
,
code
:
output
.
outputText
,
...
@@ -23,7 +23,9 @@ async function compile(source, debug = false) {
...
@@ -23,7 +23,9 @@ async function compile(source, debug = false) {
function
uglify
(
source
)
{
function
uglify
(
source
)
{
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
if
(
!
uglifyResult
.
error
)
{
if
(
uglifyResult
.
error
)
{
throw
new
Error
(
uglifyResult
.
error
);
}
else
{
return
uglifyResult
.
code
;
return
uglifyResult
.
code
;
}
}
}
}
...
...
dist/index.es.js.map
View file @
f13ae869
This diff is collapsed.
Click to expand it.
dist/index.js
View file @
f13ae869
...
@@ -14,9 +14,9 @@ var zeroingTemplateFill = require('zeroing-template-fill');
...
@@ -14,9 +14,9 @@ var zeroingTemplateFill = require('zeroing-template-fill');
*/
*/
async
function
compile
(
source
,
debug
=
false
)
{
async
function
compile
(
source
,
debug
=
false
)
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{}
}
});
});
const
result
=
{
const
result
=
{
code
:
output
.
outputText
,
code
:
output
.
outputText
,
...
@@ -29,7 +29,9 @@ async function compile(source, debug = false) {
...
@@ -29,7 +29,9 @@ async function compile(source, debug = false) {
function
uglify
(
source
)
{
function
uglify
(
source
)
{
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
if
(
!
uglifyResult
.
error
)
{
if
(
uglifyResult
.
error
)
{
throw
new
Error
(
uglifyResult
.
error
);
}
else
{
return
uglifyResult
.
code
;
return
uglifyResult
.
code
;
}
}
}
}
...
...
dist/index.js.map
View file @
f13ae869
This diff is collapsed.
Click to expand it.
dist/index.umd.js
View file @
f13ae869
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
*/
*/
async
function
compile
(
source
,
debug
=
false
)
{
async
function
compile
(
source
,
debug
=
false
)
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{}
}
});
});
const
result
=
{
const
result
=
{
code
:
output
.
outputText
,
code
:
output
.
outputText
,
...
@@ -27,7 +27,9 @@
...
@@ -27,7 +27,9 @@
function
uglify
(
source
)
{
function
uglify
(
source
)
{
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
if
(
!
uglifyResult
.
error
)
{
if
(
uglifyResult
.
error
)
{
throw
new
Error
(
uglifyResult
.
error
);
}
else
{
return
uglifyResult
.
code
;
return
uglifyResult
.
code
;
}
}
}
}
...
...
dist/index.umd.js.map
View file @
f13ae869
This diff is collapsed.
Click to expand it.
src/code-process.js
View file @
f13ae869
...
@@ -6,9 +6,9 @@ import ts from 'typescript';
...
@@ -6,9 +6,9 @@ import ts from 'typescript';
import
UglifyJS
from
'uglify-js'
;
import
UglifyJS
from
'uglify-js'
;
export
async
function
compile
(
source
,
debug
=
false
)
{
export
async
function
compile
(
source
,
debug
=
false
)
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{
let
output
=
ts
.
transpileModule
(
source
,
{
compilerOptions
:
{}
}
});
});
const
result
=
{
const
result
=
{
code
:
output
.
outputText
,
code
:
output
.
outputText
,
...
@@ -21,7 +21,9 @@ export async function compile(source, debug = false) {
...
@@ -21,7 +21,9 @@ export async function compile(source, debug = false) {
export
function
uglify
(
source
)
{
export
function
uglify
(
source
)
{
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
const
uglifyResult
=
UglifyJS
.
minify
(
source
,
{});
if
(
!
uglifyResult
.
error
)
{
if
(
uglifyResult
.
error
)
{
throw
new
Error
(
uglifyResult
.
error
);
}
else
{
return
uglifyResult
.
code
;
return
uglifyResult
.
code
;
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment