Skip to content

Commit 67250b9

Browse files
committed
update node code to v7.6
1 parent 86e58ce commit 67250b9

File tree

49 files changed

+52
-185
lines changed

Some content is hidden

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

49 files changed

+52
-185
lines changed

samples/node/web/db/hello-sequelize/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/db/hello-sequelize/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "hello-sequelize",
33
"version": "1.0.0",
44
"description": "Hello Sequelize example with async",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"sequelize",
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"sequelize": "3.24.1",
2521
"mysql": "2.11.1"
2622
}

samples/node/web/db/hello-sequelize/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/db/model-sequelize/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/db/model-sequelize/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "model-sequelize",
33
"version": "1.0.0",
44
"description": "Sequelize best practice example with async",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"sequelize",
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"sequelize": "3.24.1",
2521
"mysql": "2.11.1"
2622
}

samples/node/web/db/model-sequelize/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/koa/hello-koa/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/koa/hello-koa/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"koa": "2.0.0"
2521
}
2622
}

samples/node/web/koa/hello-koa/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/koa/url-koa/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/koa/url-koa/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "url-koa",
33
"version": "1.0.0",
44
"description": "koa2 example with url route",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"koa",
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"koa": "2.0.0",
2521
"koa-bodyparser": "3.2.0",
2622
"koa-router": "7.0.0"

samples/node/web/koa/url-koa/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/koa/url2-koa/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/koa/url2-koa/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "url2-koa",
33
"version": "1.0.0",
44
"description": "koa 2 example with url route",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"koa",
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"koa": "2.0.0",
2521
"koa-bodyparser": "3.2.0",
2622
"koa-router": "7.0.0"

samples/node/web/koa/url2-koa/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/koa/use-nunjucks/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const nunjucks = require('nunjucks');
22

33
function createEnv(path, opts) {
44
var
5-
autoescape = opts.autoescape && true,
5+
autoescape = opts.autoescape === undefined ? true : opts.autoescape,
66
noCache = opts.noCache || false,
77
watch = opts.watch || false,
88
throwOnUndefined = opts.throwOnUndefined || false,

samples/node/web/koa/view-koa/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/koa/view-koa/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "view-koa",
33
"version": "1.0.0",
44
"description": "koa 2 example with nunjucks as view",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"koa",
@@ -18,10 +18,6 @@
1818
"url": "https://github.com/michaelliao/learn-javascript.git"
1919
},
2020
"dependencies": {
21-
"babel-core": "6.13.2",
22-
"babel-polyfill": "6.13.0",
23-
"babel-preset-es2015-node6": "0.3.0",
24-
"babel-preset-stage-3": "6.5.0",
2521
"koa": "2.0.0",
2622
"koa-bodyparser": "3.2.0",
2723
"koa-router": "7.0.0",

samples/node/web/koa/view-koa/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/koa/view-koa/templating.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const nunjucks = require('nunjucks');
22

33
function createEnv(path, opts) {
44
var
5-
autoescape = opts.autoescape && true,
5+
autoescape = opts.autoescape === undefined ? true : opts.autoescape,
66
noCache = opts.noCache || false,
77
watch = opts.watch || false,
88
throwOnUndefined = opts.throwOnUndefined || false,

samples/node/web/rest/rest-hello/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/rest/rest-hello/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "rest-koa",
33
"version": "1.0.0",
44
"description": "koa 2 example with rest api",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"koa",
@@ -18,10 +18,6 @@
1818
"url": "https://github.com/michaelliao/learn-javascript.git"
1919
},
2020
"dependencies": {
21-
"babel-core": "6.13.2",
22-
"babel-polyfill": "6.13.0",
23-
"babel-preset-es2015-node6": "0.3.0",
24-
"babel-preset-stage-3": "6.5.0",
2521
"koa": "2.0.0",
2622
"koa-bodyparser": "3.2.0",
2723
"koa-router": "7.0.0"

samples/node/web/rest/rest-hello/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/rest/rest-koa/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/rest/rest-koa/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "rest-koa",
33
"version": "1.0.0",
44
"description": "koa 2 example with rest api",
5-
"main": "start.js",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"koa",
@@ -18,10 +18,6 @@
1818
"url": "https://github.com/michaelliao/learn-javascript.git"
1919
},
2020
"dependencies": {
21-
"babel-core": "6.13.2",
22-
"babel-polyfill": "6.13.0",
23-
"babel-preset-es2015-node6": "0.3.0",
24-
"babel-preset-stage-3": "6.5.0",
2521
"koa": "2.0.0",
2622
"koa-bodyparser": "3.2.0",
2723
"koa-router": "7.0.0",

samples/node/web/rest/rest-koa/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/node/web/rest/rest-koa/templating.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const nunjucks = require('nunjucks');
22

33
function createEnv(path, opts) {
44
var
5-
autoescape = opts.autoescape && true,
5+
autoescape = opts.autoescape === undefined ? true : opts.autoescape,
66
noCache = opts.noCache || false,
77
watch = opts.watch || false,
88
throwOnUndefined = opts.throwOnUndefined || false,

samples/node/web/test/async-test/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"stopOnEntry": false,
1010
"args": [
1111
"--require",
12-
"hook"
12+
"hello"
1313
],
1414
"cwd": "${workspaceRoot}",
1515
"preLaunchTask": null,

samples/node/web/test/async-test/hook.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

samples/node/web/test/async-test/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "mocha-async-test",
33
"version": "1.0.0",
44
"description": "Mocha async test",
5-
"main": "app.js",
5+
"main": "hello.js",
66
"scripts": {
7-
"test": "mocha --require hook"
7+
"test": "mocha --require hello"
88
},
99
"keywords": [
1010
"mocha",
@@ -18,10 +18,6 @@
1818
"url": "https://github.com/michaelliao/learn-javascript.git"
1919
},
2020
"dependencies": {
21-
"babel-core": "6.13.2",
22-
"babel-polyfill": "6.13.0",
23-
"babel-preset-es2015-node6": "0.3.0",
24-
"babel-preset-stage-3": "6.5.0",
2521
"mz": "2.4.0"
2622
},
2723
"devDependencies": {

samples/node/web/vue/form-vue/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Start",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/start.js",
8+
"program": "${workspaceRoot}/app.js",
99
"stopOnEntry": false,
1010
"args": [],
1111
"cwd": "${workspaceRoot}",

samples/node/web/vue/form-vue/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "view-koa",
33
"version": "1.0.0",
4-
"description": "koa 2 example with nunjucks as view",
5-
"main": "start.js",
4+
"description": "form example with vue",
5+
"main": "app.js",
66
"scripts": {
7-
"start": "node --use_strict start.js"
7+
"start": "node --use_strict app.js"
88
},
99
"keywords": [
1010
"vue",
@@ -17,10 +17,6 @@
1717
"url": "https://github.com/michaelliao/learn-javascript.git"
1818
},
1919
"dependencies": {
20-
"babel-core": "6.13.2",
21-
"babel-polyfill": "6.13.0",
22-
"babel-preset-es2015-node6": "0.3.0",
23-
"babel-preset-stage-3": "6.5.0",
2420
"koa": "2.0.0",
2521
"mime": "1.3.4",
2622
"mz": "2.4.0"

samples/node/web/vue/form-vue/start.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)