mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
9 lines
259 B
JavaScript
9 lines
259 B
JavaScript
const glob = require( 'glob' );
|
|
const fs = require( 'fs' );
|
|
|
|
glob.sync( 'src/**/*.js' ).forEach( file => {
|
|
console.log( file );
|
|
const js = fs.readFileSync( file, 'utf-8' );
|
|
fs.writeFileSync( file.replace( /\.js$/, '.ts' ), js );
|
|
fs.unlinkSync( file );
|
|
}); |