Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
var data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
var names = Object.keys(data.dependencies).filter(function(name) {
var packageData = require(name + '/package.json');
return packageData.jupyterlab !== undefined;
});
var extras = Build.ensureAssets({
packageNames: names,
output: './build'
});
module.exports = [
{
entry: ['whatwg-fetch', './index.js'],
output: {
path: __dirname + '/build',
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
var data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
var names = Object.keys(data.dependencies).filter(function(name) {
var packageData = require(name + '/package.json');
return packageData.jupyterlab !== undefined;
});
var extras = Build.ensureAssets({
packageNames: names,
output: './build'
});
module.exports = [
{
entry: ['whatwg-fetch', './index.js'],
output: {
path: __dirname + '/build',
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
var path = require('path');
var fs = require('fs-extra');
var Handlebars = require('handlebars');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
var Build = require('@jupyterlab/buildutils').Build;
var package_data = require('./package.json');
// Handle the extensions.
var jlab = package_data.jupyterlab;
var extensions = jlab.extensions;
var mimeExtensions = jlab.mimeExtensions;
Build.ensureAssets({
packageNames: Object.keys(mimeExtensions).concat(Object.keys(extensions)),
output: jlab.outputDir
});
fs.ensureDirSync('node_modules/codemirror/mode/prolog');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/prolog.js'), 'node_modules/codemirror/mode/prolog/prolog.js');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/meta.js'), 'node_modules/codemirror/mode/meta.js');
// Create the entry point file.
var webpack = require('webpack');
var path = require('path');
var fs = require('fs-extra');
var Handlebars = require('handlebars');
var crypto = require('crypto');
var package_data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
// Ensure a clear build directory.
var buildDir = './build';
if (fs.existsSync(buildDir)) {
fs.removeSync(buildDir);
}
fs.ensureDirSync(buildDir);
fs.copySync('./package.json', './build/package.json');
// Handle the extensions.
var jlab = package_data.jupyterlab;
var extensions = jlab.extensions;
var mimeExtensions = jlab.mimeExtensions;
Build.ensureAssets({
packageNames: Object.keys(mimeExtensions).concat(Object.keys(extensions)),
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
var data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
var names = Object.keys(data.dependencies).filter(function(name) {
var packageData = require(name + '/package.json');
return packageData.jupyterlab !== undefined;
});
var extras = Build.ensureAssets({
packageNames: names,
output: './build'
});
module.exports = [
{
entry: ['whatwg-fetch', './index.js'],
output: {
path: __dirname + '/build',
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
var path = require('path');
var fs = require('fs-extra');
var Handlebars = require('handlebars');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
var DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
var Visualizer = require('webpack-visualizer-plugin');
var Build = require('@jupyterlab/buildutils').Build;
var package_data = require('./package.json');
// Handle the extensions.
var jlab = package_data.jupyterlab;
var extensions = jlab.extensions;
var mimeExtensions = jlab.mimeExtensions;
var extraConfig = Build.ensureAssets({
packageNames: Object.keys(mimeExtensions).concat(Object.keys(extensions)),
output: jlab.outputDir
});
// Create the entry point file.
var source = fs.readFileSync('index.js').toString();
var template = Handlebars.compile(source);
var data = {
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
var plib = require('path');
var fs = require('fs-extra');
var Handlebars = require('handlebars');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
var DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
var Build = require('@jupyterlab/buildutils').Build;
var WPPlugin = require('@jupyterlab/buildutils').WPPlugin;
var package_data = require('./package.json');
// Handle the extensions.
var jlab = package_data.jupyterlab;
var extensions = jlab.extensions;
var mimeExtensions = jlab.mimeExtensions;
var packageNames = Object.keys(mimeExtensions).concat(Object.keys(extensions));
// Ensure a clear build directory.
var buildDir = plib.resolve(jlab.buildDir);
if (fs.existsSync(buildDir)) {
fs.removeSync(buildDir);
}
fs.ensureDirSync(buildDir);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
var data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
var names = Object.keys(data.dependencies).filter(function (name) {
var packageData = require(name + '/package.json');
return packageData.jupyterlab !== undefined;
});
var extras = Build.ensureAssets({
packageNames: names,
output: './build'
});
module.exports = [
{
entry: ['whatwg-fetch', './index.js'],
output: {
path: __dirname + '/build',
var data = require('./package.json');
var Build = require('@jupyterlab/buildutils').Build;
var names = Object.keys(data.dependencies).filter(function(name) {
var packageData = require(name + '/package.json');
return packageData.jupyterlab !== undefined;
});
Build.ensureAssets({
packageNames: names,
output: './build'
});
var childProcess = require('child_process');
var fs = require('fs-extra');
var glob = require('glob');
var path = require('path');
var sortPackageJson = require('sort-package-json');
var Build = require('@jupyterlab/buildutils').Build;
var corePackage = require('./package.json');
corePackage.jupyterlab.extensions = {};
corePackage.jupyterlab.mimeExtensions = {};
corePackage.dependencies = {};
var basePath = path.resolve('..');
var packages = glob.sync(path.join(basePath, 'packages/*'));
packages.forEach(function(packagePath) {
var dataPath = path.join(packagePath, 'package.json');
try {
var data = require(dataPath);
} catch (e) {
return;
}