File tree Expand file tree Collapse file tree 17 files changed +48
-27
lines changed Expand file tree Collapse file tree 17 files changed +48
-27
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version" : " 0.2.0" ,
6
+ "configurations" : [
7
+ {
8
+ "type" : " node" ,
9
+ "request" : " launch" ,
10
+ "name" : " Launch Unit Test" ,
11
+ "skipFiles" : [
12
+ " <node_internals>/**"
13
+ ],
14
+ "program" : " ${workspaceRoot}/src/node_modules/mocha/bin/_mocha" ,
15
+ "sourceMaps" : true ,
16
+ "autoAttachChildProcesses" : true ,
17
+ "cwd" : " ${workspaceRoot}/src" ,
18
+ "args" : [
19
+ " test/test.es5.js"
20
+ ]
21
+ }
22
+ ]
23
+ }
Original file line number Diff line number Diff line change @@ -222,11 +222,6 @@ const worker = new Worker("./worker-script");
222
222
223
223
```
224
224
225
- ## Demo apps
226
- For usage with NativeScript Angular, check out [ ` demo-angular ` ] ( ./demo-angular ) in this repo.
227
-
228
- For usage with NativeScript apps written in plain JavaScript, check out this repo: https://github.com/NativeScript/demo-workers .
229
-
230
225
## Related docs
231
226
232
227
1 . [ Workers in NativeScript] ( https://docs.nativescript.org/core-concepts/multithreading-model )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ module.exports.pitch = function pitch(request) {
71
71
} ;
72
72
73
73
const plugins = ( pluginOptions . plugins || [ ] ) . map ( plugin => {
74
- if ( typeof plugin !== ' string' ) {
74
+ if ( typeof plugin !== " string" ) {
75
75
return plugin ;
76
76
}
77
77
const found = compilerOptions . plugins . find ( p => p . constructor . name === plugin ) ;
@@ -109,7 +109,7 @@ module.exports.pitch = function pitch(request) {
109
109
if ( entries [ 0 ] ) {
110
110
const fileDeps = Array . from ( childCompilation . fileDependencies ) ;
111
111
this . clearDependencies ( ) ;
112
- fileDeps . map ( fileName => {
112
+ fileDeps . forEach ( fileName => {
113
113
this . addDependency ( fileName ) ;
114
114
} ) ;
115
115
/**
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"pretest" : " babel ./test/test.es6.js --out-file ./test/test.es5.js" ,
8
8
"test" : " mocha test/test.es5.js" ,
9
- "posttest" : " eslint ."
9
+ "posttest" : " eslint ." ,
10
+ "prepare" : " npm run test"
10
11
},
11
12
"eslintConfig" : {
12
13
"extends" : " webpack" ,
29
30
"functions" : " never"
30
31
}
31
32
],
33
+ "no-console" : 0 ,
32
34
"arrow-parens" : 0 ,
33
35
"func-names" : 0 ,
34
36
"import/no-extraneous-dependencies" : 0 ,
48
50
"babel-cli" : " ^6.26.0" ,
49
51
"babel-plugin-transform-async-to-generator" : " ^6.24.1" ,
50
52
"del" : " ^2.2.2" ,
51
- "eslint" : " ^3.16.0" ,
53
+ "eslint" : " ^6.6.0" ,
54
+ "webpack" : " ~4.27.0" ,
52
55
"eslint-config-webpack" : " ^1.0.0" ,
53
56
"eslint-plugin-import" : " ^2.2.0" ,
54
57
"mocha" : " ^5.2.0"
Original file line number Diff line number Diff line change 1
1
2
- const NATIVESCRIPT_WORKER_PLUGIN_SYMBOL = Symbol ( ' NATIVESCRIPT_WORKER_PLUGIN_SYMBOL' ) ;
2
+ const NATIVESCRIPT_WORKER_PLUGIN_SYMBOL = Symbol ( " NATIVESCRIPT_WORKER_PLUGIN_SYMBOL" ) ;
3
3
module . exports = NATIVESCRIPT_WORKER_PLUGIN_SYMBOL ;
Original file line number Diff line number Diff line change 1
- // w1 inlined with fallback
1
+ console . log ( " w1 inlined with fallback" ) ;
Original file line number Diff line number Diff line change 1
- // w2 inlined with fallback
1
+ console . log ( " w2 inlined with fallback" ) ;
Original file line number Diff line number Diff line change 1
- // w1 inlined via options
1
+ console . log ( " w1 inlined via options" ) ;
Original file line number Diff line number Diff line change 1
- // w2 inlined via options
1
+ console . log ( " w2 inlined via options" ) ;
Original file line number Diff line number Diff line change 1
- // inlined worker test mark
1
+ console . log ( " inlined worker test mark" ) ;
You can’t perform that action at this time.
0 commit comments