Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ParaEncode
Project
Project
Details
Activity
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
Linshizhi
ParaEncode
Commits
6ea847cb
Commit
6ea847cb
authored
Apr 21, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
09e3099b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
19 deletions
+30
-19
karma.conf.js
karma.conf.js
+7
-15
specs.js
specs.js
+2
-0
webpack.conf.js
webpack.conf.js
+21
-4
No files found.
karma.conf.js
View file @
6ea847cb
...
@@ -2,14 +2,12 @@
...
@@ -2,14 +2,12 @@
// Generated on Tue Apr 19 2022 21:54:47 GMT+0800 (China Standard Time)
// Generated on Tue Apr 19 2022 21:54:47 GMT+0800 (China Standard Time)
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
os
=
require
(
'os'
);
const
webpack_path
=
path
.
resolve
(
__dirname
,
'dist'
);
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
)
{
config
.
set
({
config
.
set
({
// base path that will be used to resolve all patterns (eg. files, exclude)
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath
:
'
/home/linshizhi/Codebase/ParaEncode
'
,
basePath
:
''
,
// frameworks to use
// frameworks to use
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
...
@@ -18,10 +16,8 @@ module.exports = function(config) {
...
@@ -18,10 +16,8 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
// list of files / patterns to load in the browser
files
:
[
files
:
[
{
pattern
:
webpack_path
+
'/*.js'
,
included
:
true
,
served
:
true
},
{
pattern
:
'tmp/spec_bundle.js'
,
included
:
true
},
{
pattern
:
'src/**/*.js'
,
included
:
true
},
{
pattern
:
'src/**/*.js'
,
included
:
false
,
served
:
true
},
{
pattern
:
'tests/**/*.spec.js'
,
included
:
true
},
{
pattern
:
'tests/**/*.js'
,
included
:
true
}
],
],
// list of files / patterns to exclude
// list of files / patterns to exclude
...
@@ -35,18 +31,14 @@ module.exports = function(config) {
...
@@ -35,18 +31,14 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// preprocess matching files before serving them to the browser
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors
:
{
preprocessors
:
{},
"resources/**/*.js"
:
[
"webpack"
],
"src/**/*.js"
:
[
"webpack"
],
"tests/**/*.spec.js"
:
[
"webpack"
],
"tests/**/*.js"
:
[
"webpack"
]
},
webpack
:
{
webpack
:
{
entry
:
'./specs.js'
,
mode
:
'development'
,
mode
:
'development'
,
output
:
{
output
:
{
filename
:
'
[name]
.js'
,
filename
:
'
spec_bundle
.js'
,
path
:
webpack_path
,
path
:
path
.
resolve
(
__dirname
,
'tmp'
)
,
},
},
},
},
...
...
specs.js
0 → 100644
View file @
6ea847cb
const
testsContext
=
require
.
context
(
'./tests'
,
true
,
/.spec.js$/
);
testsContext
.
keys
().
forEach
(
testsContext
);
webpack.conf.js
View file @
6ea847cb
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
webpack
=
require
(
"webpack"
);
module
.
exports
=
{
module
.
exports
=
{
entry
:
'./
index
.js'
,
entry
:
'./
specs
.js'
,
mode
:
'development'
,
mode
:
'development'
,
output
:
{
output
:
{
publicPath
:
'dist/'
,
filename
:
'spec_bundle.js'
,
filename
:
'bundle.js'
,
path
:
path
.
resolve
(
__dirname
,
'tmp'
),
path
:
path
.
resolve
(
__dirname
,
'dist'
),
},
},
mode
:
'development'
,
module
:
{
rules
:
[
{
test
:
/
\.(
js|jsx
)
$/
,
exclude
:
/node_modules/
,
use
:
{
loader
:
"babel-loader"
}
}
]
},
plugins
:
[
new
webpack
.
ProvidePlugin
({
process
:
'process/browser'
,
})
]
};
};
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