Created
March 12, 2020 16:12
-
-
Save motorro/ba9e7aeb902111d754c7f9cce7fe605e to your computer and use it in GitHub Desktop.
Pre-populating gulp task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* City population | |
*/ | |
exports.cities = async () => { | |
const options: Args = minimist<Args>( | |
process.argv.slice(2), | |
{ | |
string: ["dataDir"], | |
default: { dataDir: "_data"} | |
} | |
); | |
// 1. Create database | |
const pathToNewDb = await cities(SCHEMA_PATH, options.dataDir); | |
// 2. Copy to assets | |
fs.copyFileSync(pathToNewDb, DST_PATH); | |
// 3. Increment version | |
incrementDatabaseVersion(VERSION_PATH, VERSION_KEY); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment