tools/isobuild/builder.js
// necessary. Throw an exception if the file already exists.
necessary. Throw an exception if the file already exists.
necessary . Throw an exception if the file already exists .
writeJson(relPath, data) {
    if (relPath.slice(-1) === files.pathSep) {
      relPath = relPath.slice(0, -1);
    }
    this._ensureDirectory(files.pathDirname(relPath));
    const absPath = files.pathJoin(this.buildPath, relPath);
    atomicallyRewriteFile(
      absPath,
      Buffer.from(JSON.stringify(data, null, 2), 'utf8'),
      {mode: 0o444});
    this.usedAsFile[relPath] = true;
  }
writeJson ( relPath , data ) { if ( relPath . slice ( - 1 ) === files . pathSep ) { relPath = relPath . slice ( 0 , - 1 ) ; } this . _ensureDirectory ( files . pathDirname ( relPath ) ) ; const absPath = files . pathJoin ( this . buildPath , relPath ) ; atomicallyRewriteFile ( absPath , Buffer . from ( JSON . stringify ( data , null , 2 ) , 'utf8' ) , { mode : 0o444 } ) ; this . usedAsFile [ relPath ] = true ; }
necessary.
necessary .
// Ensure no trailing slash