miijs 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/miijs.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miijs",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Work with Mii characters in every possible way needed for your project.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/patch-ffl.js CHANGED
@@ -1,13 +1,18 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- const fflPath = path.join(__dirname, './node_modules/ffl.js/ffl.js');
5
-
6
- console.log('Patching ffl.js to have CJS Exports...');
7
-
8
- if (!fs.existsSync(fflPath)) {
9
- console.error('ffl.js not found at', fflPath);
10
- process.exit(1);
4
+ var fflPath;
5
+ const fflPaths = [path.join(__dirname, './node_modules/ffl.js/ffl.js'),path.join(__dirname, '../node_modules/ffl.js/ffl.js'),path.join(__dirname, '../../node_modules/ffl.js/ffl.js'),path.join(__dirname, './ffl.js'),path.join(__dirname, '../ffl.js')];
6
+ for(var i=0;i<fflPaths.length;i++){
7
+ if (!fs.existsSync(fflPaths[i])) {
8
+ continue;
9
+ }
10
+ fflPath=fflPaths[i];
11
+ i=fflPaths.length;
12
+ }
13
+ if(fflPath===null||fflPath===undefined){
14
+ console.warn("Couldn't find ffl.js. It still needs to be patched to have CJS exports.");
15
+ process.exit(0);
11
16
  }
12
17
 
13
18
  let content = fs.readFileSync(fflPath, 'utf8');