Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/ipywidgets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
out
dist
**/node_modules
.nyc_output
npm-debug.log
bin/**
obj/**
tmp/**
6 changes: 3 additions & 3 deletions src/ipywidgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "npm run clean && tsc",
"buildx": "npm run clean && tsc && node scripts/copyfiles.js && webpack && npm run copyFile",
"clean": "rimraf out && rimraf tsconfig.tsbuildinfo && rimraf built",
"build": "npm run clean && tsc && node scripts/copyfiles.js && webpack --mode='production' && npm run copyFile && npm run clean",
"build:dev": "npm run clean && tsc && node scripts/copyfiles.js && webpack --mode='development' && npm run copyFile && npm run clean",
"clean": "rimraf out && rimraf tsconfig.tsbuildinfo && rimraf dist",
"lint": "tslint --project tsconfig.json",
"copyFile": "node scripts/copyBuild.js"
},
Expand Down
13 changes: 8 additions & 5 deletions src/ipywidgets/scripts/copyBuild.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

var fs = require('fs');
// TODO: To be fixed when integrating ipywidgets with extension.
// fs.copyFileSync('built/ipywidgets.js', '/Users/donjayamanne/.vscode-insiders/extensions/pythonVSCode/out/datascience-ui/native-editor/ipywidgets.js');
'use strict';

const fs = require('fs');
const path = require('path');

fs.copyFileSync(path.resolve(__dirname, '..', 'dist', 'ipywidgets', 'ipywidgets.js'), path.resolve(__dirname, '..', '..', '..', 'out', 'datascience-ui', 'native-editor', 'ipywidgets.js'));
6 changes: 4 additions & 2 deletions src/ipywidgets/scripts/copyfiles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

'use strict';

var fs = require('fs');
fs.copyFileSync('src/widgets.css', 'out/widgets.css');
2 changes: 1 addition & 1 deletion src/ipywidgets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
entry: './out/index.js',
output: {
filename: 'ipywidgets.js',
path: path.resolve(__dirname, '..', '..', 'out', 'ipywidgets'),
path: path.resolve(__dirname, 'dist', 'ipywidgets'),
publicPath: 'built/',
library: "vscIPyWidgets",
libraryTarget: "window"
Expand Down