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 15
15
* limitations under the License.
16
16
*/
17
17
'use strict' ;
18
- const fs = require ( 'fs' ) ;
19
- const path = require ( 'path' ) ;
20
18
const { getNativeImagePath, getFirstSupportedPlatform} = require ( './lib/utils' ) ;
21
19
const parseArgs = require ( 'minimist' ) ;
22
20
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
-
45
21
const compilerFlags = parseArgs ( process . argv . slice ( 2 ) ) ;
46
22
47
23
// 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