forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 43d30fd. For #3429
- Loading branch information
1 parent
6e8add6
commit 17f55f5
Showing
15 changed files
with
7,690 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 180, | ||
tabWidth: 4 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": true, | ||
"**/*.pyc": true, | ||
".nyc_output": true, | ||
"obj": true, | ||
"bin": true, | ||
"**/__pycache__": true, | ||
"**/node_modules": true, | ||
".vscode test": false, | ||
".vscode-test": false, | ||
"**/.mypy_cache/**": true, | ||
"**/.ropeproject/**": true | ||
}, | ||
"search.exclude": { | ||
"out": true, | ||
"**/node_modules": true, | ||
"coverage": true, | ||
"languageServer*/**": true, | ||
".vscode-test": true, | ||
".vscode test": true | ||
}, | ||
"[python]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescript]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"typescript.preferences.quoteStyle": "single", | ||
"javascript.preferences.quoteStyle": "single", | ||
"typescriptHero.imports.stringQuoteStyle": "'", | ||
"cucumberautocomplete.skipDocStringsFormat": true, | ||
"[javascript]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.fixAll.tslint": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This folder is based off the the sample `web3` from https://github.com/jupyter-widgets/ipywidgets/blob/master/examples/web3 | ||
|
||
* We have built a custom solution based on `web3` sample to host ipywidgets outside of `Jupyter Notebook`. | ||
|
||
# Solution for IPywidgets | ||
|
||
* IPywidgets traditionally use [requirejs](https://requirejs.org). | ||
* `traditionally` as there seems to be some ongoing work to use `commonjs2`, though unsure how this will work with 3rd party widgets. | ||
* Using 3rd party widgets require: | ||
* [requirejs](https://requirejs.org) to be available in the current browser context (i.e. `window`) | ||
* Base `IPywidgets` to be defined using `define` in [requirejs](https://requirejs.org). | ||
* Rather than bundling using `amd` or `umd` its easier to just import everything using `commonjs2`, then export for `requirejs` using `define` by hand. | ||
* `define('xyz', () => 'a')` is a simple way of declaring a named `xyz` module with the value `a` (using `requirejs`). | ||
* This is generally done using tools, however we'll hand craft this as it works better and easier. | ||
* `amd` is not what we want, as out `react ui` doesn't use `amd`. | ||
* `umd` is does not work as we have multiple `entry points` in `webpack`. | ||
* Heres' the solution `define('@jupyter-widgets/controls', () => widgets);` |
Oops, something went wrong.