Skip to content

Commit

Permalink
Merge pull request #356 from vidartf/npmignore
Browse files Browse the repository at this point in the history
Clean up the npm pack
  • Loading branch information
vidartf authored Feb 26, 2021
2 parents e595deb + f7566ae commit ea599af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions js/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
scripts
webpack.config.js
lab-dist
.eslintrc.js
9 changes: 6 additions & 3 deletions js/scripts/generate-wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module.exports = [
library: "jupyter-threejs",
libraryTarget: 'amd'
},
devtool: 'source-map',
externals: ['@jupyter-widgets/base'],
resolve: {
extensions: [ ".autogen.js", ".js" ]
Expand Down

0 comments on commit ea599af

Please sign in to comment.