Browse Source

Revert "Examples: Convert jsm examples to use bare three import only before publish (#21654)" (#23256)

This reverts commit 53e3b99dfe8737187db6cb1bce68f7cb1f5d5441.
Marco Fugaro 3 years ago
parent
commit
53481a459c
2 changed files with 1 additions and 14 deletions
  1. 1 2
      package.json
  2. 0 12
      utils/prepublish.js

+ 1 - 2
package.json

@@ -87,8 +87,7 @@
     "test-e2e": "node test/e2e/puppeteer.js",
     "test-e2e-cov": "node test/e2e/check-coverage.js",
     "test-treeshake": "rollup -c test/rollup.treeshake.config.js",
-    "make-screenshot": "node test/e2e/puppeteer.js --make",
-    "prepublishOnly": "node utils/prepublish.js"
+    "make-screenshot": "node test/e2e/puppeteer.js --make"
   },
   "keywords": [
     "three",

+ 0 - 12
utils/prepublish.js

@@ -1,12 +0,0 @@
-const fs = require( 'fs' );
-const path = require( 'path' );
-const glob = require( 'glob' );
-
-const paths = glob.sync( path.resolve( __dirname, '../examples/jsm/**/*.js' ) );
-paths.forEach( p => {
-
-	const content = fs.readFileSync( p, { encoding: 'utf8' } );
-	const bareContent = content.replace( /(\.\.\/){2,}build\/three.module.js/g, 'three' );
-	fs.writeFileSync( p, bareContent, { encoding: 'utf8' } );
-
-} );