jeresig / i18n-node-2

Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
MIT License
507 stars 79 forks source link

Change to fix webpack compile error on import #108

Closed annelorraineuy closed 7 years ago

annelorraineuy commented 7 years ago

Change 0755 fs write mode to 0o755 which is the standard way to write the permissions as an octal for node js.

Reference: https://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options

Additional: https://stackoverflow.com/questions/39850133/node-js-how-to-create-file-with-755-permissions-with-fs-createwritestream

Otherwise leaving this unchaged causes a Webpack compile issue.

ERROR in ./node_modules/i18n-2/i18n.js
Module build failed: SyntaxError: Invalid number (422:32)

420 |                  }
421 |                   fs.mkdirSync(this.directory, 0755);
    |
423 |         }
424 |
425 |         // Initialize the locale if didn't exist already
screen shot 2017-08-03 at 3 20 38 pm
gjuchault commented 7 years ago

Thanks for the PR, released