diff --git a/js/.npmignore b/js/.npmignore new file mode 100644 index 00000000..7cc8b59f --- /dev/null +++ b/js/.npmignore @@ -0,0 +1,4 @@ +scripts +webpack.config.js +lab-dist +.eslintrc.js diff --git a/js/scripts/generate-wrappers.js b/js/scripts/generate-wrappers.js index 37ec50c6..01d03ef0 100644 --- a/js/scripts/generate-wrappers.js +++ b/js/scripts/generate-wrappers.js @@ -590,12 +590,15 @@ function writeJavascriptIndexFiles() { console.log('Writing javascript indices...'); + const dotSlash = '.' + path.sep; + const excludes = [ /\.swp$/, /\.DS_Store$/, /index\.js$/, - './embed.js', - './extension.js', + dotSlash + 'embed.js', + dotSlash + 'extension.js', + dotSlash + path.join('examples', '.eslintrc.js'), ]; // Regexp's @@ -610,7 +613,7 @@ function writeJavascriptIndexFiles() { // get proper relative path for file dirFiles = dirFiles.map(filename => { - return './' + path.join(dirPath, filename); + return dotSlash + path.join(dirPath, filename); }); // filter excluded files diff --git a/js/webpack.config.js b/js/webpack.config.js index aa465539..fd56695a 100644 --- a/js/webpack.config.js +++ b/js/webpack.config.js @@ -39,7 +39,6 @@ module.exports = [ library: "jupyter-threejs", libraryTarget: 'amd' }, - devtool: 'source-map', externals: ['@jupyter-widgets/base'], resolve: { extensions: [ ".autogen.js", ".js" ]