This repository was archived by the owner on Sep 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
packages/google-closure-compiler Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717'use strict' ;
18- const fs = require ( 'fs' ) ;
19- const path = require ( 'path' ) ;
2018const { getNativeImagePath, getFirstSupportedPlatform} = require ( './lib/utils' ) ;
2119const parseArgs = require ( 'minimist' ) ;
2220
23- /** @see https://stackoverflow.com/a/40686853/1211524 */
24- function mkDirByPathSync ( targetDir , { isRelativeToScript = false } = { } ) {
25- const sep = path . sep ;
26- const initDir = path . isAbsolute ( targetDir ) ? sep : '' ;
27- const baseDir = isRelativeToScript ? __dirname : '.' ;
28-
29- targetDir . split ( sep ) . reduce ( ( parentDir , childDir ) => {
30- const curDir = path . resolve ( baseDir , parentDir , childDir ) ;
31- try {
32- if ( ! fs . existsSync ( curDir ) ) {
33- fs . mkdirSync ( curDir ) ;
34- }
35- } catch ( err ) {
36- if ( err . code !== 'EEXIST' ) {
37- throw err ;
38- }
39- }
40-
41- return curDir ;
42- } , initDir ) ;
43- }
44-
4521const compilerFlags = parseArgs ( process . argv . slice ( 2 ) ) ;
4622
4723// The platform flag is only used by this cli script - it is not natively supported by any compiler version.
You can’t perform that action at this time.
0 commit comments