From 5019e6be66889b06ac385d8980cd486a54fdae67 Mon Sep 17 00:00:00 2001 From: Sam Hellawell Date: Sat, 16 Jan 2021 02:25:30 +0000 Subject: [PATCH] Build adjustments Signed-off-by: Sam Hellawell --- .gitignore | 1 + .npmignore | 3 +-- gulpfile.babel.js | 2 +- index.js | 3 --- package.json | 6 +++--- webpack.config.js | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 index.js diff --git a/.gitignore b/.gitignore index fa53ac2..26e0520 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ yarn.lock package-lock.json dist lib +index.js diff --git a/.npmignore b/.npmignore index 6e92ac0..ed868aa 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,2 @@ -src test -webpack.config.js \ No newline at end of file +webpack.config.js diff --git a/gulpfile.babel.js b/gulpfile.babel.js index e9902fb..a3c45e7 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -59,7 +59,7 @@ gulp.task('lint-fix', () => // Clean folder gulp.task('clean', () => - del([`${libFolder}/**/*`]) + del([`dist/**/*`, './index.js']) ); // Webpack helper diff --git a/index.js b/index.js deleted file mode 100644 index 6572211..0000000 --- a/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var pkg = require('./package.json'); -var libFile = pkg.library['bundle-node'] ? pkg.library['dist-node'] : pkg.library['entry']; -module.exports = require('./lib/' + libFile); \ No newline at end of file diff --git a/package.json b/package.json index 352be75..74e4013 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "3d-dungeon-generator", - "version": "1.0.0", + "version": "1.0.2", "description": "3D dungeon generator supporting shafts and staircases", "main": "./index.js", "scripts": { @@ -45,7 +45,7 @@ "LICENSE", "README.md", "index.js", - "lib", + "src", "dist" ], "homepage": "https://github.com/SamHellawell/3d-dungeon-generator", @@ -80,7 +80,7 @@ "entry": "index.js", "dist-node": "index.js", "dist-web": "index.web.js", - "bundle-node": false + "bundle-node": true }, "dependencies": { "delaunay": "^0.4.0", diff --git a/webpack.config.js b/webpack.config.js index dac69f3..45b7c77 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,7 +17,7 @@ module.exports = function getConfig(options){ // determine output file name var outputName = buildLibraryOutputName(libraryDesc, isWeb, isProd); - var outputFolder = isWeb ? 'dist' : 'lib'; + var outputFolder = isWeb ? 'dist' : './'; // get base config var config;