Skip to content

Commit f102532

Browse files
Refactor debug dashboard (#226)
* Refactor debug dashboard
1 parent 725f520 commit f102532

17 files changed

+1440
-992
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"env": {
3+
"plugins": [
4+
"dynamic-import-node",
5+
"syntax-dynamic-import"
6+
],
37
"test": {
48
"presets": [
59
"env",

.eslintrc.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
module.exports = {
2-
extends: [
3-
'eslint-config-airbnb-base',
4-
'eslint-config-airbnb-base/rules/strict'
5-
].map(
6-
require.resolve
7-
),
2+
extends: ['airbnb'],
83
rules: {
94
'comma-dangle': 0,
105
'func-names': 0,
@@ -14,11 +9,16 @@ module.exports = {
149
'no-plusplus': 0,
1510
'no-underscore-dangle': 0,
1611
'no-unused-expressions': 0,
17-
'no-use-before-define': 0
12+
'no-use-before-define': 0,
13+
'import/no-named-as-default': 0,
14+
'import/no-named-as-default-member': 0
1815
},
1916
env: {
2017
browser: true,
2118
node: true,
22-
jasmine: true
23-
}
19+
jasmine: true,
20+
es6: true
21+
},
22+
plugins: ['import', 'react'],
23+
parser: 'babel-eslint'
2424
};

Gruntfile.js

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module.exports = function (grunt) {
8484
dist: {
8585
options: {
8686
sourceMap: false,
87-
plugins: [],
87+
plugins: ['dynamic-import-node', 'syntax-dynamic-import'],
8888
presets: [
8989
[
9090
'env',
@@ -109,6 +109,7 @@ module.exports = function (grunt) {
109109
'dist-es': {
110110
options: {
111111
sourceMap: false,
112+
plugins: ['dynamic-import-node', 'syntax-dynamic-import'],
112113
presets: [
113114
[
114115
'env',
@@ -135,10 +136,25 @@ module.exports = function (grunt) {
135136
]
136137
},
137138
functional: {
139+
options: {
140+
sourceMap: false,
141+
plugins: ['dynamic-import-node', 'syntax-dynamic-import'],
142+
presets: [
143+
[
144+
'env',
145+
{
146+
loose: true
147+
}
148+
],
149+
'react'
150+
]
151+
},
138152
files: [
139153
{
140154
expand: true,
141-
src: ['<%= project.functional %>/**/*.jsx'],
155+
cwd: '<%= project.functional %>',
156+
src: ['**/*.jsx'],
157+
dest: '<%= project.functional %>/',
142158
extDot: 'last',
143159
ext: '.js'
144160
}
@@ -170,7 +186,7 @@ module.exports = function (grunt) {
170186
main: './<%= project.functional %>/bootstrap.js'
171187
},
172188
output: {
173-
path: './<%= project.functional %>/'
189+
path: path.resolve(process.cwd(), projectConfig.functional)
174190
},
175191
module: {
176192
rules: [
@@ -209,6 +225,10 @@ module.exports = function (grunt) {
209225
'saucelabs-mocha': {
210226
all: {
211227
options: {
228+
// this is apply for open source project https://saucelabs.com/open-source
229+
username: 'roderick.hsiao',
230+
key: () => 'a7c8994f-a04b-4d04-808f-1090f5148079',
231+
212232
testname: 'react-i13n func test',
213233
urls: ['http://127.0.0.1:9999/tests/functional/page.html'],
214234

@@ -220,36 +240,31 @@ module.exports = function (grunt) {
220240
},
221241
throttled: 3,
222242
browsers: [
223-
{
224-
browserName: 'internet explorer',
225-
platform: 'Windows 7',
226-
version: '9'
227-
},
228-
{
229-
browserName: 'internet explorer',
230-
platform: 'Windows 8',
231-
version: '10'
232-
},
233-
{
234-
browserName: 'internet explorer',
235-
platform: 'Windows 8.1',
236-
version: '11'
237-
},
243+
// {
244+
// browserName: 'edge',
245+
// platform: 'Windows 10',
246+
// version: '16.16299'
247+
// },
248+
// {
249+
// browserName: 'internet explorer',
250+
// platform: 'Windows 10',
251+
// version: '11.285'
252+
// },
238253
{
239254
browserName: 'chrome',
240255
platform: 'Windows 10',
241-
version: '49'
256+
version: '73'
242257
},
243258
{
244259
browserName: 'firefox',
245260
platform: 'Windows 7',
246-
version: '50'
247-
},
248-
{
249-
browserName: 'safari',
250-
platform: 'OS X 10.11',
251-
version: '10.0'
261+
version: '66'
252262
}
263+
// {
264+
// browserName: 'safari',
265+
// platform: 'macOS 10.14',
266+
// version: '12.0'
267+
// }
253268
]
254269
}
255270
}

0 commit comments

Comments
 (0)