Skip to content

Commit e4550a6

Browse files
committed
Move test mocks.json file to build dir
1 parent bdb23a8 commit e4550a6

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ build/*
66
!build/ploticon.js
77
!build/README.md
88

9-
devtools/test_dashboard/mocks.json
10-
119
npm-debug.log*

devtools/test_dashboard/server.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ var b = browserify(constants.pathToPlotlyIndex, {
2828
packageCache: {},
2929
plugin: [watchify]
3030
});
31-
b.on('update', bundleDevtools);
31+
b.on('update', bundlePlotly);
3232

3333
// Bundle devtools code
3434
var devtoolsPath = path.join(constants.pathToRoot, 'devtools/test_dashboard');
35-
var devtools = browserify(path.join(devtoolsPath, 'devtools.js'), {
36-
transform: [compress]
37-
});
35+
var devtools = browserify(path.join(devtoolsPath, 'devtools.js'), {});
3836

3937
var firstBundle = true;
4038

@@ -100,7 +98,7 @@ function createMocksList(files) {
10098
}
10199

102100
function saveToFile(mocksList) {
103-
var filePath = path.join(constants.pathToRoot, 'devtools/test_dashboard/mocks.json');
101+
var filePath = path.join(constants.pathToBuild, 'test_dashboard_mocks.json');
104102
var content = JSON.stringify(mocksList, null, 4);
105103

106104
return writeFilePromise(filePath, content);

tasks/util/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
pathToRoot: pathToRoot,
2020
pathToSrc: pathToSrc,
2121
pathToLib: pathToLib,
22+
pathToBuild: pathToBuild,
2223

2324
pathToPlotlyIndex: path.join(pathToLib, 'index.js'),
2425
pathToPlotlyCore: path.join(pathToSrc, 'core.js'),

0 commit comments

Comments
 (0)